:root {
    --amvm-header-bg: #d1e2f3;
    --amvm-header-text: #5b708b;
    --amvm-active-tab: #a9ccee;
    --amvm-green: #67a759;
    --amvm-green-hover: #568e4a;
    --amvm-text: #333;
    --amvm-bg: #fff;
    --amvm-border: #eee;
    --amvm-text-secondary: #444;
    --amvm-hover-bg: #f0f7ff;
}

/* Dark theme (inherits from Kadence or other dark themes) */
.site-container.site-header-dark .film-container,
.entry-content-wrap[style*="color"] .film-container,
body.flavor-dark .film-container,
.film-container.amvm-dark {
    --amvm-header-bg: #2a3a4d;
    --amvm-header-text: #b0c4de;
    --amvm-active-tab: #3d5a80;
    --amvm-text: #e0e0e0;
    --amvm-bg: transparent;
    --amvm-border: rgba(255, 255, 255, 0.1);
    --amvm-text-secondary: #ccc;
    --amvm-hover-bg: rgba(255, 255, 255, 0.05);
}

/* --- CONTAINER --- */
.film-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--amvm-text);
    line-height: 1.6;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--amvm-bg);
}

/* --- TABS HEADER --- */
.film-tabs {
    display: flex;
    background-color: var(--amvm-header-bg);
    margin-bottom: 30px;
}

.film-tab-btn {
    flex: 1;
    padding: 15px 0;
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--amvm-header-text);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.film-tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--amvm-text);
}

.film-tab-btn.active {
    background-color: var(--amvm-active-tab);
    color: var(--amvm-text);
}

/* --- CONTENT AREAS --- */
.film-tab-content {
    display: none;
    padding: 0 10px;
}

.film-tab-content.active {
    display: block;
}

/* --- GREEN PILL BUTTON --- */
.timestamp-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--amvm-green);
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
    min-width: 75px;
    line-height: 1;
    margin-right: 12px;
    flex-shrink: 0;
}

.timestamp-pill:hover {
    background-color: var(--amvm-green-hover);
    text-decoration: none;
}

.timestamp-pill::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='white'%3E%3Cpath d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* --- TAB 1: SUMMARY (Image + Text) --- */
.summary-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--amvm-border);
    align-items: flex-start;
}

.summary-thumb {
    width: 220px;
    flex-shrink: 0;
}

.summary-thumb img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.summary-thumb img:hover {
    transform: scale(1.02);
}

.summary-content {
    flex: 1;
}

.summary-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.summary-text {
    font-size: 16px;
    color: var(--amvm-text-secondary);
}

/* --- TAB 2: TIMELINE (Compact List) --- */
.timeline-item {
    display: flex;
    align-items: baseline;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--amvm-border);
}

.timeline-text {
    flex: 1;
    font-size: 16px;
    color: var(--amvm-text);
}

/* --- TAB 3: TRANSCRIPT (Text Blob) --- */
.transcript-container {
    max-width: 800px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
    color: var(--amvm-text);
}

.transcript-segment {
    margin-bottom: 20px;
    display: block;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.transcript-segment:hover {
    background-color: var(--amvm-hover-bg);
}

.transcript-time {
    color: var(--amvm-green);
    font-size: 14px;
    font-weight: 700;
    margin-right: 8px;
    user-select: none;
}

/* Responsive */
@media (max-width: 600px) {
    .summary-item {
        flex-direction: column;
    }

    .summary-thumb {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Modal */
.amvm-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
}

.amvm-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.amvm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.amvm-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.amvm-close {
    position: absolute;
    top: -35px;
    right: 0;
    color: #fff;
    font-size: 30px;
    border: none;
    background: none;
    cursor: pointer;
}

.amvm-content {
    width: 100%;
    height: 100%;
}

.amvm-content iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
/* [film_gallery] — simple CSS-grid replacement for the 10Web lightbox.
   Each tile is a click-to-play trigger that opens the existing acfmvm modal. */
.film-gallery {
    display: grid;
    grid-template-columns: repeat(var(--film-gallery-cols, 4), 1fr);
    gap: 8px;
    max-width: 1100px;
    margin: 1.5em auto;
}
.film-gallery__tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    background: #000;
    aspect-ratio: 16 / 9;
}
.film-gallery__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.film-gallery__tile:hover .film-gallery__img {
    transform: scale(1.04);
    opacity: 0.85;
}
@media (max-width: 700px) {
    .film-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* Image lightbox state — when a tile in [film_gallery] is clicked, the modal
   shows the enlarged image with a Play-video button overlaid bottom-center. */
.amvm-modal.is-image .amvm-container {
    aspect-ratio: auto;
    width: auto;
    max-width: 92vw;
    max-height: 92vh;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.amvm-image-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 92vh;
}
.amvm-image-stage__img {
    display: block;
    max-width: 100%;
    max-height: 92vh;
    width: auto;
    height: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.amvm-image-play {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 26px;
    font: 700 17px/1 system-ui, -apple-system, sans-serif;
    color: #fff;
    background: #e85d04;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}
.amvm-image-play:hover {
    background: #f48c1f;
    transform: translateX(-50%) scale(1.04);
}
