/* Stage 4.9 — pre-content-review technical cleanup */

/* One audio system everywhere */
[data-hor-ui][data-hor-ui] .hor-audio-player.hor-audio-compact{
  padding:16px!important;
  margin:16px 0 4px!important;
}
[data-hor-ui][data-hor-ui] .hor-audio-controls{
  display:grid!important;
  grid-template-columns:52px minmax(0,1fr) auto;
  align-items:center!important;
  gap:10px!important;
  min-width:0;
}
[data-hor-ui][data-hor-ui] button.hor-audio-play{
  display:inline-grid!important;
  place-items:center!important;
  width:52px!important;
  min-width:52px!important;
  height:52px!important;
  min-height:52px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  background:var(--hor-navy,#202867)!important;
  color:#fff!important;
}
[data-hor-ui][data-hor-ui] .hor-audio-play svg{
  width:23px!important;
  height:23px!important;
  fill:currentColor!important;
}
[data-hor-ui][data-hor-ui] .hor-audio-track{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  min-height:52px!important;
  padding:0 12px!important;
  background:#F7F8FC!important;
  border-radius:16px!important;
}
[data-hor-ui][data-hor-ui] [data-audio-time]{
  flex:0 0 auto;
  font-size:13px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  color:var(--hor-navy,#202867);
}
[data-hor-ui][data-hor-ui] [data-audio-seek]{
  appearance:none;
  -webkit-appearance:none;
  flex:1 1 auto;
  min-width:70px;
  height:44px;
  margin:0;
  border:0;
  background:transparent;
  cursor:pointer;
  accent-color:var(--hor-navy,#202867);
}
[data-hor-ui][data-hor-ui] [data-audio-seek]::-webkit-slider-runnable-track{
  height:6px;
  border-radius:4px;
  background:linear-gradient(to right,var(--hor-navy,#202867) var(--audio-progress,0%),#DDE2F0 var(--audio-progress,0%));
}
[data-hor-ui][data-hor-ui] [data-audio-seek]::-webkit-slider-thumb{
  appearance:none;
  -webkit-appearance:none;
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--hor-navy,#202867);
  margin-top:-5px;
}
[data-hor-ui][data-hor-ui] [data-audio-seek]::-moz-range-track{
  height:6px;
  border-radius:4px;
  background:#DDE2F0;
}
[data-hor-ui][data-hor-ui] [data-audio-seek]::-moz-range-progress{
  height:6px;
  border-radius:4px;
  background:var(--hor-navy,#202867);
}
[data-hor-ui][data-hor-ui] [data-audio-seek]::-moz-range-thumb{
  width:16px;
  height:16px;
  border:0;
  border-radius:50%;
  background:var(--hor-navy,#202867);
}
[data-hor-ui][data-hor-ui] .hor-audio-controls [data-rate]{
  width:68px!important;
  min-width:68px!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0 6px!important;
  text-align:center!important;
  text-align-last:center!important;
  border:1px solid var(--hor-border,#DDE2F0)!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--hor-navy,#202867)!important;
  font:600 14px Roboto,Arial,sans-serif!important;
}
[data-hor-ui][data-hor-ui] .hor-audio-tools{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  margin-top:10px!important;
}
[data-hor-ui][data-hor-ui] .hor-audio-tools button{
  min-height:44px;
}

/* Transcript translation is opt-in in listening contexts */
[data-hor-ui][data-hor-ui] details.hor-transcript-translation-ready:not(.hor-show-translations) .hor-translation{
  display:none!important;
}
[data-hor-ui][data-hor-ui] .hor-audio-translation-toggle{
  margin:10px 0 6px;
}

/* A one-answer source key becomes typed recall, not a fake one-option dropdown. */
[data-hor-ui][data-hor-ui] .hor-fill-recall input[data-fill-input]{
  display:block;
  width:min(100%,520px);
  min-height:48px;
  margin:8px 0 0;
  padding:10px 12px;
  border:1px solid var(--hor-border,#DDE2F0);
  border-radius:12px;
  background:#fff;
  color:var(--hor-navy,#202867);
  font:inherit;
}
[data-hor-ui][data-hor-ui] .hor-fill-recall input[data-fill-input]:focus-visible{
  outline:3px solid var(--hor-yellow,#FFCF3F);
  outline-offset:2px;
}

/* Self-assessment must use the same button geometry as the rest of the course. */
[data-hor-ui][data-hor-ui] button.hor-self-save{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:190px!important;
  max-width:100%!important;
  min-height:48px!important;
  padding:11px 22px!important;
  margin:0!important;
  border:1px solid var(--hor-yellow,#FFCF3F)!important;
  border-radius:14px!important;
  background:var(--hor-yellow,#FFCF3F)!important;
  color:var(--hor-navy,#202867)!important;
  font:700 16px/1.2 Roboto,Arial,sans-serif!important;
  white-space:normal!important;
  text-align:center!important;
  box-sizing:border-box!important;
  cursor:pointer!important;
}
[data-hor-ui][data-hor-ui] .hor-lesson-self-actions,
[data-hor-ui][data-hor-ui] .hor-self-choice{
  align-items:center!important;
  gap:12px!important;
}

/* Do not let stale site-wide cookie UI cover the standalone course after the user dismissed it. */
.hor-course-body [aria-hidden="true"].cky-consent-container,
.hor-course-body [aria-hidden="true"]#cookie-law-info-bar,
.hor-course-body [aria-hidden="true"].cmplz-cookiebanner,
.hor-course-body [aria-hidden="true"]#cookie-notice,
.hor-course-body [aria-hidden="true"].cc-window,
.hor-course-body [aria-hidden="true"]#moove_gdpr_cookie_info_bar{
  display:none!important;
}

@media(max-width:780px){
  [data-hor-ui][data-hor-ui] .hor-audio-controls{
    grid-template-columns:48px minmax(0,1fr)!important;
  }
  [data-hor-ui][data-hor-ui] .hor-audio-controls [data-rate]{
    grid-column:2;
    width:82px!important;
    justify-self:end;
  }
  [data-hor-ui][data-hor-ui] button.hor-audio-play{
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
  }
  [data-hor-ui][data-hor-ui] .hor-audio-track{
    min-height:48px!important;
    padding:0 8px!important;
    gap:7px!important;
  }
}

[data-hor-ui][data-hor-ui] [data-hor-checkpoint] .hor-self-choice{
  grid-template-columns:minmax(0,1fr) minmax(190px,240px)!important;
  max-width:100%!important;
}
[data-hor-ui][data-hor-ui] [data-hor-checkpoint] .hor-self-choice .hor-self-save{
  width:100%!important;
  min-width:0!important;
}
@media(max-width:780px){
  [data-hor-ui][data-hor-ui] [data-hor-checkpoint] .hor-self-choice{
    grid-template-columns:1fr!important;
  }
}
