.bwtv-live-widget {
  position: fixed;
  right: var(--bwtv-live-widget-right, max(14px, env(safe-area-inset-right)));
  bottom: var(--bwtv-live-widget-bottom, max(74px, env(safe-area-inset-bottom)));
  z-index: 9990;
  width: min(340px, calc(100vw - 28px));
  overflow: hidden;
  color: #fff;
  background: #050505;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,.36);
  font-family: var(--bwtv-font, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  contain: layout paint style;
  transition: width .2s ease, transform .2s ease;
}

body.has-mobile-bb .bwtv-live-widget {
  bottom: calc(var(--mobile-bb, 64px) + 12px);
}

.bwtv-live-widget.is-hidden {
  display: none;
}

.bwtv-live-widget.is-mini {
  width: min(238px, calc(100vw - 28px));
}

.bwtv-live-widget.is-mini .blw-volume {
  display: none;
}

.bwtv-live-theater-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9989;
  border: 0;
  background: rgba(0,0,0,.78);
  cursor: pointer;
}

.bwtv-live-widget.is-theater {
  left: 50%;
  right: auto;
  top: 50%;
  bottom: auto !important;
  z-index: 9990;
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  transform: translate(-50%, -50%);
  contain: layout style;
}

.bwtv-live-widget.is-theater .blw-stage {
  max-height: calc(100vh - 150px);
}

body.bwtv-live-theater-open {
  overflow: hidden;
}

.bwtv-live-widget.is-collapsed {
  width: 190px;
}

.bwtv-live-widget.is-collapsed .blw-body {
  display: none;
}

.blw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.bwtv-live-widget.is-collapsed .blw-head {
  border-bottom: 0;
}

.blw-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.blw-brand:hover {
  color: #fcc600;
  text-decoration: none;
}

.blw-dot {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: #ff2b2b;
  box-shadow: 0 0 0 3px rgba(255,43,43,.18);
}

.blw-title {
  display: block;
  overflow: hidden;
  font-family: var(--bwtv-font-headings, inherit);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.blw-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.blw-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  color: #fff;
  background: rgba(255,255,255,.06);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.blw-icon-btn:hover,
.blw-icon-btn:focus-visible {
  border-color: rgba(252,198,0,.72);
  color: #fcc600;
  outline: 0;
}

.blw-body {
  display: block;
}

.blw-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101010;
}

.blw-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.blw-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 116px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 6px;
  color: #000;
  background: #fcc600;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.3);
}

.blw-play:hover,
.blw-play:focus-visible {
  background: #fff;
  outline: 0;
}

.bwtv-live-widget.is-loading .blw-play,
.bwtv-live-widget.is-playing .blw-play {
  display: none;
}

.blw-play-icon {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.blw-status {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  min-height: 16px;
  overflow: hidden;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

.bwtv-live-widget.is-playing .blw-status {
  color: rgba(255,255,255,.64);
}

.blw-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  background: #0b0b0b;
}

.blw-toggle,
.blw-sound,
.blw-mini,
.blw-theater,
.blw-pip,
.blw-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.blw-toggle,
.blw-sound,
.blw-mini,
.blw-theater,
.blw-pip,
.blw-fullscreen {
  flex: 0 0 34px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}

.blw-fullscreen {
  background: rgba(255,255,255,.08);
}

.blw-mini[aria-pressed="true"],
.blw-theater[aria-pressed="true"],
.blw-pip[aria-pressed="true"] {
  border-color: #fcc600;
  color: #fcc600;
  background: rgba(252,198,0,.13);
}

.blw-ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blw-toggle .blw-icon-pause,
.blw-toggle.is-paused .blw-icon-play,
.blw-sound .blw-icon-muted,
.blw-sound.is-muted .blw-icon-unmuted {
  display: none;
}

.blw-toggle.is-paused .blw-icon-pause,
.blw-sound.is-muted .blw-icon-muted {
  display: block;
}

.blw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.blw-volume {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  flex: 1 1 60px;
  min-width: 50px;
  min-height: 34px;
  padding: 0 5px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  color: #fff;
  background: rgba(255,255,255,.05);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.blw-volume-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.9);
}

.blw-volume .blw-ui-icon {
  width: 16px;
  height: 16px;
}

.blw-volume input {
  width: 100%;
  min-width: 0;
  accent-color: #fcc600;
  cursor: pointer;
}

.blw-toggle:hover,
.blw-sound:hover,
.blw-mini:hover,
.blw-theater:hover,
.blw-pip:hover,
.blw-fullscreen:hover,
.blw-toggle:focus-visible,
.blw-sound:focus-visible,
.blw-mini:focus-visible,
.blw-theater:focus-visible,
.blw-pip:focus-visible,
.blw-fullscreen:focus-visible {
  border-color: rgba(252,198,0,.72);
  color: #fcc600;
  outline: 0;
}

@media (max-width: 640px) {
  .bwtv-live-widget {
    right: var(--bwtv-live-widget-right, 10px);
    bottom: var(--bwtv-live-widget-bottom, max(162px, env(safe-area-inset-bottom)));
    width: min(216px, calc(100vw - 20px));
  }

  body.has-mobile-bb .bwtv-live-widget {
    bottom: calc(var(--mobile-bb, 64px) + 10px);
  }

  .bwtv-live-widget.is-collapsed {
    width: 164px;
  }

  .bwtv-live-widget.is-mini {
    width: min(190px, calc(100vw - 20px));
  }

  .bwtv-live-widget.is-theater {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .blw-head {
    min-height: 38px;
    padding-left: 10px;
  }

  .blw-icon-btn {
    width: 26px;
    height: 26px;
  }

  .blw-actions {
    gap: 4px;
    padding: 5px;
  }

  .blw-toggle,
  .blw-sound,
  .blw-mini,
  .blw-theater,
  .blw-pip,
  .blw-fullscreen {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 32px;
    font-size: 12px;
  }

  .blw-volume {
    display: none;
  }
}
