/**
 * Responsive Styles
 */

@media (max-width: 768px) {
    .mvt-movie-hero {
        grid-template-columns: 1fr;
    }
    
    .mvt-movie-poster {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .mvt-movie-title {
        font-size: 2rem;
    }
    
    .mvt-movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .mvt-videos-grid {
        grid-template-columns: 1fr;
    }
    
    .mvt-slider-wrapper {
        padding: 0 40px;
    }
    
    .mvt-slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Narrow the card — the photo uses width:100% so it follows automatically.
       No explicit photo width/height needed here at all. */
    .mvt-person-card {
        width: 110px;
    }
}

/* Hide slider arrows on mobile - enable swipe */
@media (max-width: 768px) {
    .mvt-slider-arrow {
        display: none !important;
    }
    
    .mvt-slider-wrapper {
        padding: 0 !important;
    }
    
    /* Enable smooth touch scrolling */
    .mvt-crew-slider,
    .mvt-cast-slider,
    .mvt-filmography-slider,
    .mvt-videos-slider {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    /* Snap to cards */
    .mvt-person-card,
    .mvt-video-card,
    .mvt-movie-card {
        scroll-snap-align: start;
    }
}

/* Streaming Sources Mobile */
@media (max-width: 768px) {
    .mvt-streaming-details {
        padding-left: 0;
        padding-top: 10px;
    }
    
    .mvt-streaming-header {
        flex-direction: row;
        align-items: center;
    }
    
    .mvt-streaming-box {
        padding: 12px;
    }
    
    .mvt-streaming-detail {
        font-size: 0.85rem;
    }
    
    .mvt-critic-review {
        padding: 15px;
    }
    
    .mvt-review-excerpt {
        font-size: 1rem;
    }
}

/* Better scroll snap on mobile */
@media (max-width: 768px) {
    .mvt-similar-movies-slider,
    .mvt-filmography-slider {
        scroll-snap-type: x mandatory;
        scroll-padding: 0 20px;
    }
    
    .mvt-similar-movies-slider .mvt-movie-card,
    .mvt-filmography-slider .mvt-movie-card {
        scroll-snap-align: start;
    }
}

/* ════════════════════════════════════════════════════════════════════════
   Mobile / Tablet Bottom Bar — visible only on ≤1024px
   Promotes Watchlist + Explore Movies on movie/video/person pages.
════════════════════════════════════════════════════════════════════════ */

.mvt-bottom-bar {
    display: none; /* hidden on desktop */
}

@media ( max-width: 1024px ) {

    .mvt-bottom-bar {
        display: flex;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        padding: 10px 12px 10px 12px;
        gap: 10px;
        /* safe area inset for notched phones */
        padding-bottom: calc( 10px + env( safe-area-inset-bottom, 0px ) );
        border-top: 1px solid rgba(255,255,255,0.06);
        box-shadow: 0 -4px 24px rgba(0,0,0,0.45);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        transition: transform .3s ease, opacity .3s ease;
    }

    /* Dark theme */
    .mvt-theme-dark  .mvt-bottom-bar,
    body:not(.mvt-theme-light) .mvt-bottom-bar {
        background: rgba(20, 20, 20, 0.92);
    }
    /* Light theme */
    .mvt-theme-light .mvt-bottom-bar {
        background: rgba(255, 255, 255, 0.93);
        border-top-color: rgba(0,0,0,0.09);
        box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    }

    /* Slide out when dismissed */
    .mvt-bottom-bar.mvt-bbb-hidden {
        transform: translateY( 110% );
        opacity: 0;
        pointer-events: none;
    }

    /* ── Buttons ── */
    .mvt-bottom-bar-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 11px 10px;
        border-radius: 10px;
        text-decoration: none;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        transition: opacity .15s, transform .15s;
        -webkit-tap-highlight-color: transparent;
    }
    .mvt-bottom-bar-btn:active {
        transform: scale( 0.97 );
        opacity: 0.85;
    }

    /* Explore Movies — outlined */
    .mvt-bbb-explore {
        background: transparent;
        border: 1.5px solid #e50914;
        color: #e50914;
    }
    .mvt-theme-light .mvt-bbb-explore {
        color: #c20812;
        border-color: #c20812;
    }

    /* My Watchlist — filled */
    .mvt-bbb-watchlist {
        background: #e50914;
        border: 1.5px solid #e50914;
        color: #ffffff;
    }
    .mvt-bbb-watchlist:hover,
    .mvt-bbb-watchlist:focus {
        background: #b0070f;
        border-color: #b0070f;
    }

    .mvt-bbb-icon {
        font-size: 1rem;
        line-height: 1;
    }

    /* ── Close button ── */
    .mvt-bbb-close {
        flex: none;
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 0.75rem;
        padding: 8px 6px;
        border-radius: 6px;
        line-height: 1;
        transition: opacity .15s;
        -webkit-tap-highlight-color: transparent;
    }
    .mvt-theme-dark  .mvt-bbb-close,
    body:not(.mvt-theme-light) .mvt-bbb-close { color: #777777; }
    .mvt-theme-light .mvt-bbb-close           { color: #aaaaaa; }
    .mvt-bbb-close:hover { opacity: 0.6; }

    /* Push page content up so the bar doesn't cover the footer */
    body.mvt-has-bottom-bar {
        padding-bottom: calc( 76px + env( safe-area-inset-bottom, 0px ) );
    }
}
