﻿main {
    overflow: hidden;
}

.gallery_container { 
    margin: 10px 3% auto 3%;
    text-align: left;
}

.tile {
    border: 1px solid lightgrey;
    display: inline-block;
    margin: 5px;
    text-align: left;
}

.image {
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.tile-helper {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    overflow: hidden;
}

.overlay {
    background-color: black;
    opacity: 0;
    width: 100%;
    position: relative;
    cursor: pointer;
}

.overlay:hover {
    opacity: 0.8;
}

.tile-caption {
    bottom: 0;
    position: absolute;
    text-align: center;
    word-wrap: break-word;
    width: 100%;
    color: white;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

    .tile-caption label {
        width: 100%;
        font-size: 1vw;
        margin-bottom: 0;
        cursor: pointer;
    }

.animate {
    transition: all .35s ease-out;
    -moz-transition: all .35s ease-out;
    -webkit-transition: all .35s ease-out;
    -o-transition: all .35s ease-out;
}

.overlay:hover > .tile-caption {
    bottom: 30%;
}

.inner-triangle {
    border-left: 20px solid #049cdb;
    border-right: 20px solid transparent;
    border-bottom: 20px solid transparent;
    height: 0;
    width: 0;
    position: absolute;
    left: 0;
}

#gridSlider, #gridSlider-affix {
    position: absolute;
    float: right;
    right: 8%;
    margin-bottom: 60px;
}

    #gridSlider .slider-selection, #gridSlider-affix .slider-selection {
        background: #BABABA;
    }


.grid-size-panel {
    display: inline-block;
    width: 100%;
    height: auto;
    background-color: transparent;
    padding-top: 10px;
    padding-bottom: 10px;
    position: absolute;
    margin-top: -30px; /* was -45px (Bootstrap 4 breadcrumb height); Bootstrap 5 breadcrumb is shorter, slider hid under the menu bar (2026-11-14) */
    background-color: transparent;
}

@media (max-width: 750px) {
    .grid-size-panel {
        position: relative;
        margin-top: 0;
        background-color: white;
        height: 40px;
    }
}

.grid-loading-circle {
    margin-left: 50%;
    margin-top: 15px;
}

.no-results {
    font-size: 1.17em;
    margin: 1em 0;
    font-weight: bold;
}
/* Video badge on grid tiles: play icon + duration, bottom left (2026-11-14) */
.video-badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 4px;
    background-color: rgba(60, 60, 60, 0.92);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
}

.video-badge-play {
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 15px solid #fff;
}


/* ==========================================================================
   UI / usability review (2026-11-16)
   Titles are always visible on result tiles (they only appeared on hover, so
   touch users never saw them, and at rest the text was white on white).
   At rest: a dark strip along the bottom with the title (two lines).
   On hover or keyboard focus: the whole tile dims and the caption is added.
   ========================================================================== */
.overlay {
    background-color: transparent;
    opacity: 1;
}

    .overlay:hover,
    a.tile-link:focus-visible .overlay {
        background-color: rgba(0, 0, 0, 0.72);
        opacity: 1;
    }

.tile-caption {
    display: block;
    box-sizing: border-box;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.62);
    text-align: left;
}

.tile-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

    .tile-title:empty {
        display: none;
    }

.tile-subtitle {
    display: none;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 6px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
}

.overlay:hover > .tile-caption,
a.tile-link:focus-visible .tile-caption {
    background-color: transparent;
    bottom: 50%;
    transform: translateY(50%);
}

.overlay:hover .tile-title,
a.tile-link:focus-visible .tile-title {
    -webkit-line-clamp: 4;
}

.overlay:hover .tile-subtitle:not(:empty),
a.tile-link:focus-visible .tile-subtitle:not(:empty) {
    display: -webkit-box;
}

/* The focus ring would be clipped by the tile, so draw it on the tile. */
.image.tile:has(a.tile-link:focus-visible) {
    outline: 4px solid #ffbf47;
    outline-offset: 2px;
    box-shadow: 0 0 0 8px rgba(11, 12, 12, 0.85);
    z-index: 2;
}

a.tile-link:focus-visible {
    outline: none;
    box-shadow: none;
}

/* The video badge moves to the top so it does not sit on the title strip. */
.video-badge {
    top: 12px;
    bottom: auto;
    left: 12px;
}

/* Result count under the breadcrumb */
.results-count {
    margin: 8px 8.5% 0;
    font-size: 15px;
    color: #333;
}

/* Thumbnail-size slider: labelled, and placed in the breadcrumb row (.results-bar, site.css) rather than
   absolutely positioned over it. Absolutely positioned, it floated over the tiles in the sticky header
   because that copy of the row had no background (2026-11-17). */
.grid-size-panel {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    position: static;
    width: auto;
    margin-top: 0;
    padding: 6px 8% 6px 0;
    box-sizing: border-box;
}

.grid-size-label {
    display: inline;
    font-size: 13px;
    color: #333;
}

#gridSlider, #gridSlider-affix {
    position: relative; /* not static: the slider track is positioned against it */
    right: auto;
    float: none;
    margin-bottom: 0;
}

/* On phones the grid is one column whatever the size, so the slider is noise. */
@media (max-width: 750px) {
    .grid-size-panel {
        display: none;
    }

    .results-count {
        margin: 8px 4% 0;
    }
}

/* Empty state */
.no-results {
    margin: 24px 5.5%;
    font-size: 16px;
    font-weight: normal;
    max-width: 640px;
}

    .no-results .no-results-title {
        font-size: 1.4rem;
        font-weight: 700;
    }

    .no-results a {
        text-decoration: underline;
    }
