/**
 * Theme Name: GNAT Blocksy Child
 * Description: GNAT's child theme containing the code for the cablecast video library and underwriter ads.
 * Author: Owen McCostis
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================================
   Sliders Styles
   ========================================================================== */

/* --- General Wrapper & Breakout Logic --- */

.slider-wrapper {
    position: relative;
    margin-bottom: 3rem;
}

.slider-full-width-breakout {
    width: 100vw !important;
    max-width: 100vw !important;
    
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    
    box-sizing: border-box;
}

/* Prevent horizontal scrollbar caused by 100vw including scrollbar width */
body {
    overflow-x: hidden;
}

/* --- Arrow Styling --- */

.slider-wrapper .splide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(33, 156, 171, 0.85);
    border: none;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show arrows on hover */
.slider-wrapper:hover .splide__arrow { opacity: 1; }

.slider-wrapper .splide__arrow:hover:not(:disabled) { background: rgba(33, 156, 171, 1); }
.slider-wrapper .splide__arrow:disabled { opacity: 0; cursor: default; }
.slider-wrapper .splide__arrow svg { fill: #ffffff; width: 1.5rem; height: 1.5rem; }

/* --- Arrows inside the track --- */
.slider-wrapper .splide__arrow--prev { left: 1.5rem; }
.slider-wrapper .splide__arrow--next { right: 1.5rem; }

/* --- Base Slide Styling --- */
.slider-wrapper .splide__list { align-items: stretch; }
.slider-wrapper .splide__slide {
    display: flex; flex-direction: column; height: auto; padding: 0;
    opacity: 1 !important;
}

.slider-wrapper .splide__slide a { text-decoration: none; color: inherit; }

/* --- Thumbnail Loading & Aspect Ratios --- */

.slider-wrapper .slide-thumbnail { 
    background-color: #e5e5e5; 
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Show Slider (16:9) */
.slider-wrapper .show-slider .slide-thumbnail {
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
}

/* Series Slider (3:4) */
.slider-wrapper .series-slider .slide-thumbnail {
    aspect-ratio: 3 / 4;
    margin-bottom: 0.75rem;
}

.slider-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1 !important;
}

/* --- Content Styling --- */

/* Series Slider Text */
.slider-wrapper .series-slider .slide-title {
    font-size: 1.1rem; font-weight: 600; text-align: center; padding: 0 5px;
}
.slider-wrapper .slide-poster-fallback {
    display: flex; align-items: center; justify-content: center; text-align: center;
    width: 100%; height: 100%; color: #555; font-weight: 600;
}

/* Show Slider Text */
.slider-wrapper .show-slider .slide-meta {
    text-align: left; display: flex; flex-direction: column; flex-grow: 1; padding: 0 0.5rem;
}
.slider-wrapper .show-slider .slide-meta-series {
    font-size: 0.8rem; font-weight: 700; color: #219cab;
    text-transform: uppercase; margin-bottom: 0.25rem; min-height: 1.5em;
}
.slider-wrapper .show-slider .slide-title {
    font-size: 1.2rem; font-weight: 600; margin: 0 0 0.5rem 0;
    line-height: 1.3; min-height: 3.9em; flex-grow: 1;
}
.slider-wrapper .show-slider .slide-meta-date {
    font-size: 0.9rem; margin-top: auto;
}

/* ==========================================================================
   Video Player Styling
   ========================================================================== */

/* Shared base rule for both the VOD and Live player wrappers */
.responsive-video-container {
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
}

/* Target iframe inside both wrappers to remove phantom padding */
.responsive-video-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}


/* --- DESKTOP SIZING RULES --- */
/* A single, powerful, unified rule that targets both player types */
.type-cablecast_show .entry-content .responsive-video-container,
.responsive-video-container {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}


/* --- MOBILE FULL-WIDTH STYLING --- */
/* Applies to both players on mobile. */
@media (max-width: 767px) {
    .responsive-video-container {
        max-width: 100vw;
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }
}

/* Remove the Live Stream's Group block's padding */
.live-stream-container > .ct-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}