.br-rvw {
  position: relative;
  display: block;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  clear: both;
  box-sizing: border-box;
}

.br-rvw__stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #111;
  box-sizing: border-box;
  isolation: isolate;
}

.br-rvw__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  object-fit: cover;
  background: #111;
  border: 0;
  z-index: 5;
  pointer-events: auto;
}

/* The play control is centered by the entire stage, not by the video's intrinsic box.
   Using inset + auto margins prevents mobile Safari/theme styles from moving it downward. */
.br-rvw__play {
  position: absolute !important;
  inset: 0 !important;
  z-index: 20 !important;
  display: grid !important;
  width: var(--br-rvw-play-size, 82px) !important;
  height: var(--br-rvw-play-size, 82px) !important;
  min-width: var(--br-rvw-play-size, 82px) !important;
  min-height: var(--br-rvw-play-size, 82px) !important;
  max-width: var(--br-rvw-play-size, 82px) !important;
  max-height: var(--br-rvw-play-size, 82px) !important;
  margin: auto !important;
  padding: 0 !important;
  place-items: center !important;
  transform: none !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  line-height: 0 !important;
  appearance: none !important;
  text-align: center !important;
  font-size: 0 !important;
  float: none !important;
}

.br-rvw__play:focus,
.br-rvw__play:hover,
.br-rvw__play:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.br-rvw__play:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 5px;
}

.br-rvw__center-icon {
  display: block !important;
  width: var(--br-rvw-play-size, 82px) !important;
  height: var(--br-rvw-play-size, 82px) !important;
  min-width: var(--br-rvw-play-size, 82px) !important;
  min-height: var(--br-rvw-play-size, 82px) !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  pointer-events: none !important;
  transform: none !important;
}

.br-rvw__fallback-play {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .58);
}

.br-rvw__fallback-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid #fff;
  transform: translate(-50%, -50%);
}

.br-rvw__overlay {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
  gap: 9px;
  min-height: 105px;
  padding: 18px;
  color: #fff;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 45%);
  opacity: 1;
  visibility: visible;
}

.br-rvw__account-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
}

.br-rvw__overlay-copy {
  min-width: 0;
  padding-top: 1px;
}

.br-rvw__heading,
.br-rvw__account {
  overflow: hidden;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
}

.br-rvw__heading {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.br-rvw__account {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: .94;
}

.br-rvw__source {
  position: absolute !important;
  z-index: 25 !important;
  right: 14px !important;
  bottom: 64px !important;
  display: grid !important;
  width: var(--br-rvw-source-size, 30px) !important;
  height: var(--br-rvw-source-size, 30px) !important;
  min-width: var(--br-rvw-source-size, 30px) !important;
  min-height: var(--br-rvw-source-size, 30px) !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center !important;
  border-radius: 8px;
  line-height: 0;
  text-decoration: none;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease;
}

.br-rvw__source:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.br-rvw__source-icon {
  display: block !important;
  width: var(--br-rvw-source-size, 30px) !important;
  height: var(--br-rvw-source-size, 30px) !important;
  min-width: var(--br-rvw-source-size, 30px) !important;
  min-height: var(--br-rvw-source-size, 30px) !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .65));
}

/* Hard hide the center control during playback. This is display:none, not opacity,
   so it cannot leave a clipped/partial icon on iPhone. */
.br-rvw--playing .br-rvw__play {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.br-rvw--playing .br-rvw__source {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.br-rvw__video::-webkit-media-controls-panel {
  min-height: 45px;
}

.br-rvw__empty {
  display: grid;
  min-height: 240px;
  padding: 30px;
  place-items: center;
  box-sizing: border-box;
  border: 1px dashed #aaa;
  background: #f6f6f6;
  color: #555;
  text-align: center;
}

.br-rvw--empty {
  max-width: 100%;
}

@media (max-width: 767px) {
  .br-rvw {
    max-width: 100%;
  }

  .br-rvw__stage {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .br-rvw__overlay {
    min-height: 90px;
    padding: 14px;
  }

  .br-rvw__heading {
    font-size: 14px;
  }

  .br-rvw__account {
    font-size: 10px;
  }

  .br-rvw__account-logo {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .br-rvw__source {
    right: 10px !important;
    bottom: 58px !important;
  }
}

/* Dedicated touch control for mobile browsers. It supplements the native
   controls and never replaces the working desktop behavior. */
.br-rvw__mobile-toggle {
  display: none;
  position: absolute !important;
  left: 12px !important;
  bottom: 58px !important;
  z-index: 30 !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, .68) !important;
  box-shadow: none !important;
  appearance: none !important;
  cursor: pointer;
  line-height: 0 !important;
}

.br-rvw__mobile-toggle-pause,
.br-rvw__mobile-toggle-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 16px;
}

.br-rvw__mobile-toggle-pause::before,
.br-rvw__mobile-toggle-pause::after {
  content: '';
  position: absolute;
  top: 0;
  width: 4px;
  height: 16px;
  border-radius: 1px;
  background: #fff;
}

.br-rvw__mobile-toggle-pause::before { left: 1px; }
.br-rvw__mobile-toggle-pause::after { right: 1px; }

.br-rvw__mobile-toggle-play {
  display: none;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
  transform: translateX(2px);
}

.br-rvw__mobile-toggle--paused .br-rvw__mobile-toggle-pause { display: none; }
.br-rvw__mobile-toggle--paused .br-rvw__mobile-toggle-play { display: block; }

.br-rvw__mobile-toggle:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .br-rvw--playing .br-rvw__mobile-toggle {
    display: block !important;
  }
}
