/*
  Brightcove Gallery Custom CSS
  =============================
  Paste this whole file into the Gallery experience's Custom CSS
  (Gallery -> [Experience] -> Edit -> Appearance and Behavior -> Custom -> CSS),
  on each of the three Galleries: icelearningcenter, icevideolibrary, videocourses.

  The first rule was already live on 2026-11-24. The rest are WCAG 2.1 AA fixes
  for ice-systems-knowledge#108 (wcag-check run, 2026-11-24). Contrast ratios
  are computed against the background the Gallery theme actually renders.
*/

.video-grid-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* The phone-width colour rules below use !important because the theme's own
   phone rules are more specific (e.g. ".search-results .results-bar-mobile
   .results-count", a five-class selector for durations) and won without it.
   Checked in a 375px / 320px same-origin iframe, 2026-11-24. */

/* 1.4.3 - mobile results bar: #333333 on #007690 is 2.4:1; white is 5.26:1. */
.results-bar-mobile .results-count,
.results-bar-mobile .search-count {
    color: #ffffff !important;
}

@media (max-width: 650px) {
    /* 1.4.3 - phone-width durations: #9d3398 on black is 3.36:1; #C77DC3 is
       7.15:1. Scoped to phones because the desktop grid is on white. */
    .video-grid-info .video-grid-duration,
    .video-grid-duration {
        color: #C77DC3 !important;
    }

    /* 1.4.3 - mobile carousel caption: #9d3398 over a gradient that fades to
       transparent on the poster, so it fails even at the dark end (3.36:1).
       Darker overlay (85% -> 75% black) plus a light tint of the brand purple:
       6.56:1 at the worst case, a pure-white poster under the 75% end. */
    .home-carousel-info-mobile {
        background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.75)) !important;
    }
    .home-carousel-info-mobile .home-carousel-category,
    .home-carousel-info-mobile .home-carousel-title {
        color: #E6C3E4 !important;
    }

    /* 1.3.1 - the theme hides the homepage section headings ("Popular
       Videos") with display:none at phone width, which also removes them
       from screen readers, so the outline jumps from h1 to h3. Keep them
       hidden on screen but readable (the standard sr-only pattern). */
    h2.section-title {
        display: block !important;
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

/* 2.4.1 - skip link added by the footer script: off-screen until it has
   keyboard focus. White on #005f73 is 7.28:1. */
.ice-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 8px 16px;
    background: #005f73;
    color: #ffffff;
    font-weight: bold;
}
.ice-skip-link:focus {
    left: 8px;
    top: 8px;
    color: #ffffff;
    outline: 3px solid #ffffff;
    box-shadow: 0 0 0 5px #005f73;
}
/* The skip target gets focus programmatically; no ring around the whole page. */
#ice-main:focus {
    outline: none;
}

/* 2.4.7 - the carousel's mobile caption link has nothing visible at desktop
   width (the theme hides its contents at min-width 650px) but still took
   keyboard focus. Same breakpoint as the theme. */
@media (min-width: 650px) {
    .home-carousel-slide > a {
        display: none;
    }
}

/* 2.4.7 - the carousel arrows and dots show no focus. Two-tone ring so it
   reads on both the white page and dark poster images (7.28:1 each way). */
.slick-arrow:focus-visible,
.slick-dots li button:focus-visible,
.home-carousel-slide a:focus-visible,
.home-carousel-slide button:focus-visible,
.trigger-dropdown:focus-visible,
.bc-search-button-mobile:focus-visible,
.results-pagination a:focus-visible,
.pagination-current:focus {
    outline: 3px solid #005f73;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #ffffff;
}
