/* Play/pause + sound under the header. Colors follow the section
   behind the controls (IntersectionObserver / scroll check at the
   button position — not pixel sampling of the moving video). On blue
   or video: orange #FF7800 with white icons. On orange or white: blue
   #003CD5 with white icons. ~200ms color transition, no flicker, no
   purple visited/tap defaults. v4. Bump the filename rather than
   editing v3 in place. */

.d-hero .vid-ctrls,
.d-hero .vid-sound,
.d-hero .ai-play{
  display: none !important;
}

.hero-av-btns{
  all: initial;
  position: fixed;
  top: calc(var(--co-head, 69px) + 8px);
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 46;
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  pointer-events: none;
  isolation: isolate;
  mix-blend-mode: normal;
  filter: none;
  -webkit-filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-av-btn,
.hero-av-btn:link,
.hero-av-btn:visited,
.hero-av-btn:hover,
.hero-av-btn:focus,
.hero-av-btn:focus-visible,
.hero-av-btn:focus-within,
.hero-av-btn:active,
.hero-av-btn:target,
.hero-av-btn[aria-pressed],
.hero-av-btn[aria-pressed="true"],
.hero-av-btn[aria-pressed="false"],
.hero-av-btn.is-on,
.hero-av-btn.is-playing,
.hero-av-btns.is-over-blue .hero-av-btn,
.hero-av-btns.is-over-video .hero-av-btn,
.hero-av-btns.is-over-other .hero-av-btn,
.hero-av-btns.is-over-blue .hero-av-btn:hover,
.hero-av-btns.is-over-video .hero-av-btn:hover,
.hero-av-btns.is-over-other .hero-av-btn:hover,
.hero-av-btns.is-over-blue .hero-av-btn:visited,
.hero-av-btns.is-over-video .hero-av-btn:visited,
.hero-av-btns.is-over-other .hero-av-btn:visited,
.hero-av-btns.is-over-blue .hero-av-btn:focus,
.hero-av-btns.is-over-video .hero-av-btn:focus,
.hero-av-btns.is-over-other .hero-av-btn:focus,
.hero-av-btns.is-over-blue .hero-av-btn:active,
.hero-av-btns.is-over-video .hero-av-btn:active,
.hero-av-btns.is-over-other .hero-av-btn:active{
  all: unset;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  margin: 0;
  padding: 0;
  border: 0 solid transparent;
  border-radius: 999px;
  background: #FF7800 !important;
  background-color: #FF7800 !important;
  background-image: none !important;
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff !important;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
  pointer-events: auto;
  isolation: isolate;
  mix-blend-mode: normal !important;
  background-blend-mode: normal !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  transform: none;
  transition: background-color 200ms ease, background 200ms ease !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  outline: none;
}

.hero-av-btns.is-over-orange .hero-av-btn,
.hero-av-btns.is-over-orange .hero-av-btn:link,
.hero-av-btns.is-over-orange .hero-av-btn:visited,
.hero-av-btns.is-over-orange .hero-av-btn:hover,
.hero-av-btns.is-over-orange .hero-av-btn:focus,
.hero-av-btns.is-over-orange .hero-av-btn:focus-visible,
.hero-av-btns.is-over-orange .hero-av-btn:focus-within,
.hero-av-btns.is-over-orange .hero-av-btn:active,
.hero-av-btns.is-over-orange .hero-av-btn[aria-pressed],
.hero-av-btns.is-over-orange .hero-av-btn[aria-pressed="true"],
.hero-av-btns.is-over-orange .hero-av-btn[aria-pressed="false"],
.hero-av-btns.is-over-orange .hero-av-btn.is-on,
.hero-av-btns.is-over-orange .hero-av-btn.is-playing,
.hero-av-btns.is-over-white .hero-av-btn,
.hero-av-btns.is-over-white .hero-av-btn:link,
.hero-av-btns.is-over-white .hero-av-btn:visited,
.hero-av-btns.is-over-white .hero-av-btn:hover,
.hero-av-btns.is-over-white .hero-av-btn:focus,
.hero-av-btns.is-over-white .hero-av-btn:focus-visible,
.hero-av-btns.is-over-white .hero-av-btn:focus-within,
.hero-av-btns.is-over-white .hero-av-btn:active,
.hero-av-btns.is-over-white .hero-av-btn[aria-pressed],
.hero-av-btns.is-over-white .hero-av-btn[aria-pressed="true"],
.hero-av-btns.is-over-white .hero-av-btn[aria-pressed="false"],
.hero-av-btns.is-over-white .hero-av-btn.is-on,
.hero-av-btns.is-over-white .hero-av-btn.is-playing{
  background: #003CD5 !important;
  background-color: #003CD5 !important;
  background-image: none !important;
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff !important;
  -webkit-text-fill-color: #fff !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  -webkit-tap-highlight-color: transparent;
}

.hero-av-btn:focus-visible{
  outline: 2px solid #fff !important;
  outline-offset: 2px;
}

.hero-av-btn svg{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  margin: auto;
  display: block;
  pointer-events: none;
  overflow: visible;
  fill: #fff !important;
  stroke: currentColor !important;
  color: #fff !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1;
  transform: none;
  transition: none !important;
}

.hero-av-play .hero-av-ico-pause,
.hero-av-sound .hero-av-ico-on{
  opacity: 0 !important;
  visibility: hidden;
}
.hero-av-play.is-playing .hero-av-ico-pause,
.hero-av-sound.is-on .hero-av-ico-on{
  opacity: 1 !important;
  visibility: visible;
}
.hero-av-play.is-playing .hero-av-ico-play,
.hero-av-sound.is-on .hero-av-ico-off{
  opacity: 0 !important;
  visibility: hidden;
}

body.menu-open .hero-av-btns,
html.reg-modal-open .hero-av-btns,
html.menu-open .hero-av-btns{
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 799px){
  .hero-av-btns{
    top: calc(var(--co-head, 69px) + 6px);
    left: max(10px, env(safe-area-inset-left, 0px));
    gap: 6px;
  }
  .hero-av-btn,
  .hero-av-btn:link,
  .hero-av-btn:visited,
  .hero-av-btn:hover,
  .hero-av-btn:focus,
  .hero-av-btn:focus-visible,
  .hero-av-btn:focus-within,
  .hero-av-btn:active,
  .hero-av-btn[aria-pressed],
  .hero-av-btn[aria-pressed="true"],
  .hero-av-btn[aria-pressed="false"],
  .hero-av-btn.is-on,
  .hero-av-btn.is-playing,
  .hero-av-btns.is-over-orange .hero-av-btn,
  .hero-av-btns.is-over-white .hero-av-btn,
  .hero-av-btns.is-over-blue .hero-av-btn,
  .hero-av-btns.is-over-video .hero-av-btn,
  .hero-av-btns.is-over-other .hero-av-btn{
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    max-width: 34px;
    max-height: 34px;
  }
  .hero-av-btn svg{
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce){
  .hero-av-btn,
  .hero-av-btns.is-over-orange .hero-av-btn,
  .hero-av-btns.is-over-white .hero-av-btn,
  .hero-av-btns.is-over-blue .hero-av-btn,
  .hero-av-btns.is-over-video .hero-av-btn,
  .hero-av-btns.is-over-other .hero-av-btn{
    transition: none !important;
  }
}
