
/* =========================================================
   SCOTT PRICE MEDIA
   UNIVERSAL VIDEO GALLERY
========================================================= */

.spm-video-gallery {
    background: var(--bs-body-bg);
    color: var(--spm-body-color);
}
/* =========================================================
   SECTION HEADER
========================================================= */
.spm-section-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.65;
}
/* =========================================================
   CATEGORY RAIL + PROGRESSIVE LOADING
========================================================= */
.spm-video-categories {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
}
.spm-category-viewport {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
}
.spm-category-viewport::-webkit-scrollbar {
    display: none;
}
.spm-category-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.65rem;
    width: max-content;
    padding: 0.25rem;
}
.spm-category-track .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
}
.spm-category-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid var(--spm-nav-pill-border-color);
    border-radius: 50%;
    background: var(--spm-nav-pill-bg);
    color: var(--spm-nav-pill-text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.spm-category-arrow[hidden],
.spm-load-more[hidden] {
    display: none;
}
.spm-category-arrow:hover,
.spm-category-arrow:focus-visible {
    background: var(--spm-nav-pill-hover-bg);
    color: var(--spm-nav-pill-hover-color);
}
.spm-category-arrow:focus-visible,
.spm-load-more:focus-visible {
    outline: 3px solid var(--spm-nav-focus-color);
    outline-offset: 3px;
}
.spm-load-more {
    min-width: 170px;
    min-height: 48px;
    border: 2px solid #6610f2;
    border-radius: 50px;
    background: #6610f2;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}
.spm-load-more:hover,
.spm-load-more:focus-visible {
    border-color: #4e0bb8;
    background: #4e0bb8;
    color: #fff;
}
/* =========================================================
   VIDEO CARD
========================================================= */
.spm-video-card {
    background:
        rgba(255,255,255,0.045);
    border:
        1px solid rgba(255,255,255,0.08);
    border-radius:
        1rem;
    overflow:
        hidden;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}
.spm-video-card:hover {
    transform:
        translateY(-6px);
    border-color:
        rgba(255,255,255,0.18);
    box-shadow:
        0 20px 50px rgba(0,0,0,0.4);
}
/* =========================================================
   THUMBNAIL
========================================================= */
.spm-video-thumbnail {
    position:
        relative;
    width:
        100%;
    aspect-ratio:
        16 / 9;
    overflow:
        hidden;
    background:
        #111;
}
.spm-video-thumbnail img {
    width:
        100%;
    height:
        100%;
    object-fit:
        cover;
    display:
        block;
    transition:
        transform 0.65s cubic-bezier(.2,.7,.2,1);
}
.spm-video-card:hover
.spm-video-thumbnail img {
    transform:
        scale(1.10);
}
/* =========================================================
   THUMBNAIL OVERLAY
========================================================= */
.spm-thumbnail-overlay {
    position:
        absolute;
    inset:
        0;
    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,0.05),
            rgba(0,0,0,0.55)
        );
    transition:
        opacity 0.35s ease;
}
.spm-video-card:hover
.spm-thumbnail-overlay {
    opacity:
        0.9;
}
/* =========================================================
   PLAY BUTTON
========================================================= */
.spm-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.96);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 10px 35px rgba(0,0,0,0.5);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}
[data-bs-theme=light]
.spm-play-button:hover {
    transform:
        translate(-50%, -50%)
        scale(1.13);
    background: var(--spm-strong-color);
    color: #fff;
    box-shadow: 0 15px 45px rgba(0,0,0,0.65);
    }
[data-bs-theme=dark]
.spm-play-button:hover {
    transform:
        translate(-50%, -50%)
        scale(1.13);
    background: var(--spm-strong-color);
    color: #000;
    box-shadow: 0 15px 45px rgba(0,0,0,0.65);
    }
.spm-play-icon {
    font-size:
        2.0rem;
    line-height: 1;
    margin-left: 4px;
}
/* =========================================================
   VIDEO INFORMATION
========================================================= */

.spm-video-info {
    padding:
        1.35rem 1.4rem 1.5rem;
}
.spm-video-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--spm-body-color)!important;
    margin-bottom: 0.55rem;
}
.spm-video-description {
    margin: 0;
    color: var(--spm-body-color)!important;
    font-size: 0.95rem;
    line-height: 1.65;
}
/* =========================================================
   FULL-SCREEN PLAYER
========================================================= */
.spm-video-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0,0,0,0.90);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.spm-video-modal.active {
    opacity: 1;
    visibility: visible;
}
/* =========================================================
   MODAL INNER
========================================================= */
.spm-video-modal-inner {
    position: relative;
    width: min(1200px, 95vw);
    transform: scale(0.94);
    transition: transform 0.35s ease;
}
.spm-video-modal.active
.spm-video-modal-inner {
    transform: scale(1);
}
/* =========================================================
   PLAYER CONTAINER
========================================================= */
.spm-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0,0,0,0.75);
}

/* IFRAME */
.spm-player-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
/* MP4 VIDEO */
.spm-player-container video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}
/* =========================================================
   TITLE
========================================================= */
.spm-modal-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
/* =========================================================
   CLOSE BUTTON
========================================================= */
.spm-video-close {
    position: fixed;
    top: -12px;
    right: 20px;
    width: 48px;
    height: 48px; 
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100001;
    font-size: 1.1rem;
    transition: background 0.25s ease, transform 0.25s ease;
}
.spm-video-close:hover {
    background: rgba(255,255,255,0.15);
    transform: rotate(90deg);
}

/* =========================================================
   TABLET
========================================================= */
@media (max-width: 991.98px) {
    .spm-video-modal {
        padding:
            1.5rem;
    }
}
/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 767.98px) {
    .spm-video-gallery {
        padding-left:
            0.75rem;
        padding-right:
            0.75rem;
    }
    .spm-play-button {
        width: 62px;
        height: 62px;
    }
    .spm-play-icon {
        font-size: 1.7rem;
    }
    .spm-video-modal {
        padding: 1rem;
    }
    .spm-video-close {
        top: -10px;
        right: 10px;
        width: 42px!important;
        height: 42px!important;
        padding: 0;
    }
    .spm-modal-title {
        font-size: 1.5rem;
    }
    .spm-video-categories {
        gap: 0.25rem;
    }
    .spm-category-track .nav-link {
        padding: 8px 18px;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spm-category-viewport {
        scroll-behavior: auto;
    }
    .spm-video-card,
    .spm-video-thumbnail img,
    .spm-play-button {
        transition: none;
    }
}

/* Video Finder: theme-aware search and visible keyboard focus. */
.spm-video-finder { max-width: 760px; }
.spm-video-finder .form-control { min-width: 0; min-height: 44px; font-size: 1rem; }
.spm-video-finder .input-group-text { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.spm-video-finder button { min-height: 44px; }
.spm-video-finder :is(input, button):focus-visible,
#spmVideoSearchAll:focus-visible { outline: 3px solid var(--bs-emphasis-color); outline-offset: 3px; }
#spmVideoEmpty[hidden], #spmVideoSearchAll[hidden] { display: none !important; }

/* Playlist glass treatment, scoped to this page. */
.spm-video-gallery { background: radial-gradient(ellipse at top, rgba(102,16,242,.14), transparent 65%); }
.spm-video-gallery .container { max-width:1440px; }
.spm-video-card { background:rgba(255,255,255,.82); border:1px solid rgba(102,16,242,.22); border-radius:20px; backdrop-filter:blur(16px); box-shadow:0 12px 32px rgba(25,8,50,.08); }
[data-bs-theme="dark"] .spm-video-card { background:rgba(24,12,45,.88); border-color:rgba(175,135,255,.35); }
.spm-playlist-intro { padding:2rem; border:1px solid rgba(102,16,242,.2); border-radius:24px; background:rgba(255,255,255,.7); backdrop-filter:blur(16px); }
[data-bs-theme="dark"] .spm-playlist-intro { background:rgba(24,12,45,.85); }
.spm-video-description { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
@media (prefers-reduced-motion:reduce) { .spm-video-card { transition:none; } }
