.sn-casting {
  position: absolute;
  z-index: 6;
  top: calc(76px + env(safe-area-inset-top));
  right: 28px;
  font-family: inherit;
}

.sn-player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sn-cast-toggle,
.sn-fullscreen-toggle,
.sn-cast-panel button,
.sn-cast-dock button {
  font: inherit;
}

.sn-cast-toggle,
.sn-fullscreen-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 14, 20, .82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  cursor: pointer;
}

.sn-fullscreen-toggle {
  width: 48px;
  padding: 10px;
  justify-content: center;
}

.sn-cast-toggle:hover,
.sn-cast-toggle:focus-visible,
.sn-cast-toggle.active,
.sn-fullscreen-toggle:hover,
.sn-fullscreen-toggle:focus-visible,
.sn-fullscreen-toggle.active {
  border-color: rgba(80, 229, 151, .78);
  background: rgba(19, 64, 45, .9);
  outline: none;
}

.sn-fullscreen-toggle.error {
  border-color: rgba(255, 116, 122, .82);
  color: #ffb2b5;
}

.sn-cast-toggle svg,
.sn-fullscreen-toggle svg,
.sn-cast-dock svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sn-fullscreen-toggle .sn-fullscreen-exit,
.sn-fullscreen-toggle[aria-pressed="true"] .sn-fullscreen-enter {
  display: none;
}

.sn-fullscreen-toggle[aria-pressed="true"] .sn-fullscreen-exit {
  display: block;
}

.sn-cast-panel {
  width: min(430px, calc(100vw - 32px));
  max-height: min(690px, calc(100vh - 145px));
  margin-top: 10px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 22px;
  padding: 18px;
  color: #f7fbff;
  background: linear-gradient(160deg, rgba(22, 27, 35, .98), rgba(7, 10, 15, .98));
  box-shadow: 0 28px 70px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .09);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.sn-cast-panel[hidden] {
  display: none;
}

.sn-cast-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.sn-cast-panel > header p {
  margin: 0 0 3px;
  color: #4ee093;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.sn-cast-panel > header h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.sn-cast-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sn-cast-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, .055);
  cursor: pointer;
}

.sn-cast-option {
  min-height: 70px;
  padding: 12px 14px;
}

.sn-cast-option:hover:not(:disabled),
.sn-cast-option:focus-visible {
  border-color: rgba(78, 224, 147, .58);
  background: rgba(78, 224, 147, .1);
  outline: none;
}

.sn-cast-option:disabled {
  cursor: default;
  opacity: .5;
}

.sn-cast-option.active {
  border-color: rgba(78, 224, 147, .75);
  background: rgba(78, 224, 147, .13);
}

.sn-cast-option > span:last-child {
  min-width: 0;
}

.sn-cast-option strong,
.sn-cast-option small {
  display: block;
}

.sn-cast-option strong {
  font-size: .96rem;
}

.sn-cast-option small {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(232, 239, 247, .7);
  font-size: .78rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.sn-cast-option-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #51e398;
  background: rgba(78, 224, 147, .11);
}

.sn-cast-option-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sn-cast-status[data-kind="error"] {
  color: #ff9e9e;
}

.sn-cast-status {
  min-height: 20px;
  margin: 13px 2px 0;
  color: rgba(232, 239, 247, .76);
  font-size: .78rem;
  line-height: 1.4;
}

.sn-cast-status[data-kind="success"] {
  color: #68eba7;
}

.sn-cast-dock {
  position: fixed;
  z-index: 160;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: min(460px, calc(100vw - 36px));
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 11px 10px 14px;
  border: 1px solid rgba(80, 229, 151, .5);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, rgba(17, 70, 48, .97), rgba(7, 19, 15, .98));
  box-shadow: 0 20px 55px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sn-cast-dock-icon {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #63eaa6;
  background: rgba(255, 255, 255, .08);
}

.sn-cast-dock-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.sn-cast-dock-copy strong,
.sn-cast-dock-copy small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sn-cast-dock-copy strong {
  font-size: .9rem;
}

.sn-cast-dock-copy small {
  margin-top: 3px;
  color: rgba(232, 255, 243, .72);
  font-size: .76rem;
}

.sn-cast-dock button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .09);
  cursor: pointer;
}

@media (max-width: 640px) {
  .sn-casting {
    top: calc(68px + env(safe-area-inset-top));
    right: 12px;
  }

  .sn-cast-toggle {
    width: 44px;
    padding: 10px;
    justify-content: center;
  }

  .sn-fullscreen-toggle {
    width: 44px;
  }

  .sn-cast-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .sn-cast-panel {
    max-height: calc(100vh - 132px - env(safe-area-inset-top));
    padding: 15px;
    border-radius: 19px;
  }

  .sn-cast-dock {
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sn-cast-toggle,
  .sn-fullscreen-toggle,
  .sn-cast-panel,
  .sn-cast-dock {
    transition: none !important;
  }
}

/* STREAMNEST_V292_CAST_GLASS_START */
.sn-cast-toggle,
.sn-fullscreen-toggle,
.sn-cast-panel,
.sn-cast-dock {
  border-color: var(--sn-glass-border, rgba(255, 255, 255, .3));
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .025) 31%, transparent 51%),
    linear-gradient(180deg, rgba(46, 51, 62, .97) 0%, rgba(25, 29, 37, .98) 52%, rgba(15, 18, 24, .99) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 0 -1px 0 rgba(0, 0, 0, .38),
    0 18px 46px rgba(0, 0, 0, .48);
  backdrop-filter: blur(22px) saturate(1.28);
  -webkit-backdrop-filter: blur(22px) saturate(1.28);
}

.sn-cast-toggle:hover,
.sn-cast-toggle:focus-visible,
.sn-cast-toggle.active,
.sn-fullscreen-toggle:hover,
.sn-fullscreen-toggle:focus-visible,
.sn-fullscreen-toggle.active {
  border-color: rgba(88, 237, 145, .68);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .1), transparent 48%),
    linear-gradient(180deg, rgba(38, 72, 58, .98), rgba(17, 40, 30, .99));
}

.sn-cast-close,
.sn-cast-option,
.sn-cast-dock button,
.sn-cast-option-icon,
.sn-cast-dock-icon {
  border-color: rgba(255, 255, 255, .25);
  background:
    linear-gradient(180deg, rgba(55, 61, 73, .955), rgba(25, 29, 37, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .2), inset 0 -1px rgba(0, 0, 0, .3);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.sn-cast-option:hover:not(:disabled),
.sn-cast-option:focus-visible,
.sn-cast-option.active,
.sn-cast-dock button:hover,
.sn-cast-close:hover {
  border-color: rgba(88, 237, 145, .58);
  background:
    linear-gradient(180deg, rgba(46, 83, 67, .97), rgba(19, 46, 34, .99));
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sn-cast-toggle,
  .sn-fullscreen-toggle,
  .sn-cast-panel,
  .sn-cast-dock,
  .sn-cast-close,
  .sn-cast-option,
  .sn-cast-dock button,
  .sn-cast-option-icon,
  .sn-cast-dock-icon {
    background-color: #181c24;
  }
}
/* STREAMNEST_V292_CAST_GLASS_END */
