.vuebox-pwa-status {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2147482500;
  min-width: min(420px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(8,8,10,.94);
  color: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,.5);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.vuebox-pwa-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.vuebox-pwa-status.is-online {
  background: rgba(8,32,22,.94);
}

.vuebox-pwa-status.is-offline {
  background: rgba(35,15,15,.95);
}

.player-cast-btn[hidden],
.livetv-player-cast[hidden] {
  display: none !important;
}

.player-cast-btn {
  position: relative;
  color: currentColor;
}

.player-cast-img {
  display: block;
  width: 1.55em;
  height: 1.55em;
  object-fit: contain;
  pointer-events: none;
}

.player-cast-btn:focus .player-cast-img,
.player-cast-btn:hover .player-cast-img {
  filter: invert(1);
}

.livetv-player-cast {
  position: absolute;
  left: calc(4vw + 8.2vh);
  top: 4vh;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7vh;
  min-width: 7vh;
  height: 7vh;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 2.35vh;
  outline: none;
  cursor: pointer;
}

.livetv-player-cast:focus,
.livetv-player-cast:hover {
  background: #fff;
  color: #111;
}

.vuebox-offline-action {
  margin-left: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
}

.vuebox-download-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vuebox-action-confirm {
  position: fixed;
  inset: 0;
  z-index: 2147482700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6vh 5vw;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.vuebox-action-confirm.is-open {
  display: flex;
}

.vuebox-action-confirm-box {
  width: min(560px, 86vw);
  padding: clamp(24px, 3.2vh, 36px) clamp(22px, 2.4vw, 34px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(12,12,14,.96);
  box-shadow: 0 28px 80px rgba(0,0,0,.58);
}

.vuebox-action-confirm-title {
  margin: 0 0 11px;
  font-size: clamp(1.7rem, 3vh, 2.25rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.vuebox-action-confirm-copy {
  margin: 0 0 26px;
  color: rgba(255,255,255,.68);
  font-size: clamp(1rem, 2vh, 1.18rem);
  line-height: 1.35;
}

.vuebox-action-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.vuebox-action-confirm-btn {
  min-width: 150px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 26px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font: 900 1rem/1 Arial, Helvetica, sans-serif;
  outline: none;
}

.vuebox-action-confirm-btn.is-danger {
  border-color: rgba(242,59,70,.72);
  background: rgba(242,59,70,.88);
}

.vuebox-action-confirm-btn:focus,
.vuebox-action-confirm-btn:hover {
  background: #fff;
  color: #111;
}

.vuebox-download-indicator {
  position: fixed;
  top: max(5.2vh, calc(env(safe-area-inset-top) + 16px));
  right: max(4vh, calc(env(safe-area-inset-right) + 24px));
  z-index: 2147482450;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6.2vh;
  height: 6.2vh;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(12,12,14,.76);
  color: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.vuebox-download-indicator[hidden] {
  display: none !important;
}

.vuebox-download-indicator:focus,
.vuebox-download-indicator:hover {
  outline: 3px solid rgba(255,255,255,.9);
  outline-offset: 4px;
  background: rgba(242,59,70,.92);
}

.vuebox-download-indicator-icon {
  position: relative;
  display: block;
  width: 2.4vh;
  height: 2.6vh;
  min-width: 20px;
  min-height: 22px;
}

.vuebox-download-indicator-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: .48vh;
  min-width: 4px;
  height: 1.55vh;
  min-height: 13px;
  border-radius: 99px;
  background: currentColor;
  transform: translateX(-50%);
}

.vuebox-download-indicator-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .15vh;
  width: 1.55vh;
  min-width: 13px;
  height: 1.55vh;
  min-height: 13px;
  border-right: .48vh solid currentColor;
  border-bottom: .48vh solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.vuebox-download-badge {
  position: absolute;
  right: -.42vh;
  top: -.42vh;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8vh;
  height: 2.8vh;
  padding: 0 .55vh;
  border: 2px solid #050505;
  border-radius: 99px;
  background: #f23b46;
  color: #fff;
  font: 800 1.45vh/1 Arial, Helvetica, sans-serif;
}

.vuebox-download-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.vuebox-download-overlay[hidden] {
  display: none !important;
}

.vuebox-download-panel {
  width: min(720px, 92vw);
  max-height: 88vh;
  overflow: hidden;
  padding: clamp(22px, 4vh, 40px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(10,10,12,.96);
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
}

.vuebox-download-panel:focus {
  outline: none;
}

.vuebox-download-manager .vuebox-download-panel {
  width: min(760px, 92vw);
  padding: clamp(20px, 3vh, 34px);
}

.vuebox-download-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.vuebox-download-manager .vuebox-download-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4.2vh, 3rem);
}

.vuebox-download-manager .vuebox-download-meta {
  min-height: auto;
  margin: 0;
  color: rgba(255,255,255,.68);
}

.vuebox-download-close,
.vuebox-download-cancel {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: 800 .95rem/1 Arial, Helvetica, sans-serif;
}

.vuebox-download-cancel {
  border-color: rgba(242,59,70,.66);
  background: rgba(242,59,70,.18);
}

.vuebox-download-close:focus,
.vuebox-download-close:hover,
.vuebox-download-cancel:focus,
.vuebox-download-cancel:hover {
  outline: 3px solid rgba(255,255,255,.9);
  outline-offset: 4px;
}

.vuebox-download-kicker {
  margin-bottom: 11px;
  color: #f23b46;
  font-size: clamp(.82rem, 1.8vh, 1rem);
  font-weight: 800;
  text-transform: uppercase;
}

.vuebox-download-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vh, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.vuebox-download-meta {
  min-height: 1.4em;
  margin-bottom: 22px;
  color: rgba(255,255,255,.74);
  font-size: clamp(1rem, 2.25vh, 1.22rem);
  line-height: 1.35;
}

.vuebox-download-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,.13);
}

.vuebox-download-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f23b46, #ff7a45);
  transition: width .18s ease;
}

.vuebox-download-status {
  min-height: 1.45em;
  margin-top: 12px;
  color: rgba(255,255,255,.76);
  font-size: clamp(.92rem, 2vh, 1.05rem);
}

.vuebox-download-list {
  max-height: min(54vh, 520px);
  margin: 18px 0 20px;
  overflow: hidden auto;
  color: rgba(255,255,255,.56);
  font-size: .86rem;
  line-height: 1.35;
}

.vuebox-download-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}

.vuebox-download-row + .vuebox-download-row {
  margin-top: 12px;
}

.vuebox-download-row-title {
  overflow: hidden;
  color: #fff;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vuebox-download-row-meta {
  margin-top: 6px;
  overflow: hidden;
  color: rgba(255,255,255,.62);
  font-size: .9rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vuebox-download-row-bar {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.14);
}

.vuebox-download-row-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #f23b46;
  transition: width .18s ease;
}

.vuebox-download-row-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vuebox-download-row-percent {
  min-width: 52px;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  text-align: right;
}

.vuebox-download-empty {
  padding: 22px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.vuebox-download-file {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vuebox-download-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.vuebox-download-button {
  min-width: 160px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-weight: 800;
}

.vuebox-download-button.is-primary {
  border-color: #f23b46;
  background: #f23b46;
}

.vuebox-download-button:focus,
.vuebox-download-button:hover {
  outline: 3px solid rgba(255,255,255,.9);
  outline-offset: 4px;
}

@media (max-width: 720px) {
  .vuebox-pwa-status {
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 12px 14px;
    font-size: .9rem;
  }

  .vuebox-download-overlay {
    align-items: stretch;
    padding: 18px;
  }

  .vuebox-download-panel {
    align-self: center;
    width: 100%;
    padding: 24px;
  }

  .vuebox-download-button {
    width: 100%;
  }

  .vuebox-download-indicator {
    top: max(58px, calc(env(safe-area-inset-top) + 12px));
    right: max(16px, calc(env(safe-area-inset-right) + 16px));
  }

  .vuebox-download-manager-head,
  .vuebox-download-row,
  .vuebox-download-row-side {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .vuebox-download-manager-head,
  .vuebox-download-row-side {
    display: grid;
  }

  .vuebox-download-row-percent {
    text-align: left;
  }

  .vuebox-download-close,
  .vuebox-download-cancel {
    width: 100%;
  }
}
