/**
 * ══════════════════════════════════════════════════════════════════════════
 * AVA - Media Viewer Styles
 * Cinema-style professional popup for viewing documents, photos, and videos
 * Professional Film/Cinema Design with Type-specific Accents
 * ══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════
   CSS Variables for Type-specific Theming
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    /* Photo theme - Cyan/Teal */
    --media-photo-primary: #06b6d4;
    --media-photo-secondary: #0891b2;
    --media-photo-glow: rgba(6, 182, 212, 0.3);

    /* Document theme - Purple/Violet */
    --media-doc-primary: #8b5cf6;
    --media-doc-secondary: #7c3aed;
    --media-doc-glow: rgba(139, 92, 246, 0.3);

    /* Video theme - Orange/Gold */
    --media-video-primary: #f59e0b;
    --media-video-secondary: #d97706;
    --media-video-glow: rgba(245, 158, 11, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════
   Overlay & Backdrop
   ═══════════════════════════════════════════════════════════════════════ */
.media-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-viewer-overlay.visible {
    opacity: 1;
}

.media-viewer-overlay.closing {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* Backdrop with blur and vignette effect */
.media-viewer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.98) 100%);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
}

/* Film grain overlay for cinematic effect */
.media-viewer-film-grain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════════════════════════════════
   Main Container - Cinema Style
   ═══════════════════════════════════════════════════════════════════════ */
/* ขยายขอบจอให้เต็มมากขึ้น (ลด margin ดำรอบๆ) */
.media-viewer-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 96vw;
    height: 96vh;
    max-width: 1920px;
    max-height: 1000px;
    background: linear-gradient(165deg,
            rgba(25, 25, 35, 0.98) 0%,
            rgba(15, 15, 22, 0.99) 50%,
            rgba(10, 10, 15, 1) 100%);
    border-radius: 24px;
    box-shadow:
        0 50px 150px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: viewerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes viewerSlideIn {
    from {
        transform: scale(0.85) translateY(60px);
        opacity: 0;
        filter: blur(10px);
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

/* Letterbox borders for cinematic aspect */
.media-viewer-letterbox {
    height: 6px;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.8) 20%,
            rgba(0, 0, 0, 0.8) 80%,
            rgba(0, 0, 0, 0) 100%);
    flex-shrink: 0;
}

/* Type-specific glow on container */
.media-type-photo .media-viewer-container {
    box-shadow:
        0 50px 150px rgba(0, 0, 0, 0.9),
        0 0 100px var(--media-photo-glow),
        0 0 0 1px rgba(6, 182, 212, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.media-type-document .media-viewer-container {
    box-shadow:
        0 50px 150px rgba(0, 0, 0, 0.9),
        0 0 100px var(--media-doc-glow),
        0 0 0 1px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.media-type-video .media-viewer-container {
    box-shadow:
        0 50px 150px rgba(0, 0, 0, 0.9),
        0 0 100px var(--media-video-glow),
        0 0 0 1px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════
   Header - Premium Glass Style
   ═══════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════
   Header - Premium Glass Style
   ═══════════════════════════════════════════════════════════════════════ */
.media-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.media-viewer-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Type Badge - Gradient styles */
.media-viewer-type-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.media-type-photo .media-viewer-type-badge {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.media-type-document .media-viewer-type-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.media-type-video .media-viewer-type-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.media-viewer-filename {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.media-viewer-counter {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.media-viewer-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Action Buttons - Metallic Glass Effect (ขนาดครึ่งหนึ่ง) */
.media-viewer-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.media-viewer-btn:hover {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.media-viewer-btn:active {
    transform: translateY(-1px);
}

.media-viewer-btn-icon {
    font-size: 12px;
}

/* Close Button - Circular with rotate animation */
.media-viewer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.media-viewer-close:hover {
    background: linear-gradient(145deg,
            rgba(239, 68, 68, 0.9) 0%,
            rgba(185, 28, 28, 0.9) 100%);
    border-color: rgba(239, 68, 68, 0.8);
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════
   Main Content Area - 16:9 Aspect with Ambient Glow
   ═══════════════════════════════════════════════════════════════════════ */
.media-viewer-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center,
            rgba(50, 50, 60, 0.3) 0%,
            rgba(20, 20, 25, 0.5) 50%,
            transparent 70%);
    min-height: 0;
}

/* Ambient glow effect */
.media-viewer-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    transition: background 0.5s ease;
}

.media-type-photo .media-viewer-ambient-glow {
    background: radial-gradient(circle, var(--media-photo-primary) 0%, transparent 70%);
}

.media-type-document .media-viewer-ambient-glow {
    background: radial-gradient(circle, var(--media-doc-primary) 0%, transparent 70%);
}

.media-type-video .media-viewer-ambient-glow {
    background: radial-gradient(circle, var(--media-video-primary) 0%, transparent 70%);
}

/* Content container - 16:9 Aspect Ratio */
.media-viewer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 12px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.media-viewer-content-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio - ขยายพื้นที่แสดงสื่อ (ปุ่มซ้าย-ขวาเล็กลงแล้ว) */
    max-width: calc(100% - 56px);
    max-height: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.media-viewer-content-wrapper>* {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Image styling */
.media-viewer-image {
    object-fit: contain;
    cursor: grab;
    transition: transform 0.15s ease-out;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.media-viewer-image:active {
    cursor: grabbing;
}

.media-viewer-document-image {
    background: white;
}

/* Video container and styling */
.media-viewer-video-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.media-viewer-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.15s ease-out;
    background: #000;
}

.media-viewer-video:active {
    cursor: grabbing;
}

/* PDF container and styling */
.media-viewer-pdf-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #525659;
    border-radius: 8px;
    overflow: hidden;
}

.media-viewer-pdf {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    cursor: grab;
    transition: transform 0.15s ease-out;
}

.media-viewer-pdf:active {
    cursor: grabbing;
}

/* ═══════════════════════════════════════════════════════════════════════
   Navigation Arrows - Premium Circular Design
   ═══════════════════════════════════════════════════════════════════════ */
/* ปุ่มซ้าย-ขวา เล็กลงครึ่งหนึ่ง */
.media-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.media-viewer-nav .nav-icon {
    transition: transform 0.2s ease;
}

.media-viewer-nav:hover:not(.disabled) {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.media-type-photo .media-viewer-nav:hover:not(.disabled) {
    background: linear-gradient(135deg,
            rgba(6, 182, 212, 0.9) 0%,
            rgba(14, 116, 144, 0.9) 100%);
    border-color: var(--media-photo-primary);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.4);
}

.media-type-document .media-viewer-nav:hover:not(.disabled) {
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.9) 0%,
            rgba(109, 40, 217, 0.9) 100%);
    border-color: var(--media-doc-primary);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

.media-type-video .media-viewer-nav:hover:not(.disabled) {
    background: linear-gradient(135deg,
            rgba(245, 158, 11, 0.9) 0%,
            rgba(180, 83, 9, 0.9) 100%);
    border-color: var(--media-video-primary);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4);
}

.media-viewer-nav:hover:not(.disabled) .nav-icon {
    transform: scale(1.1);
}

.media-viewer-nav.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    backdrop-filter: none;
}

.media-viewer-nav-prev {
    left: 12px;
}

.media-viewer-nav-next {
    right: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Controls Bar - Cinema Dashboard Style
   ═══════════════════════════════════════════════════════════════════════ */
/* แถบควบคุม + ชุดปรับ 3 ปุ่ม เล็กลงครึ่งหนึ่ง */
.media-viewer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.6) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.media-viewer-controls-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.media-viewer-control-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.media-viewer-control-divider {
    width: 1px;
    height: 14px;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(255, 255, 255, 0.15) 50%,
            transparent 100%);
}

/* Control Buttons - ขนาดครึ่งหนึ่ง */
.media-viewer-control-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 6px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.media-viewer-control-btn .control-icon {
    font-size: 11px;
}

.media-viewer-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.15);
}

.media-type-photo .media-viewer-control-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    color: var(--media-photo-primary);
}

.media-type-document .media-viewer-control-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--media-doc-primary);
}

.media-type-video .media-viewer-control-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    color: var(--media-video-primary);
}

/* Level Display - เล็กลง */
.media-viewer-level-display {
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.media-viewer-zoom-level,
.media-viewer-rotation-level {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 0.5px;
}

.media-type-photo .media-viewer-zoom-level,
.media-type-photo .media-viewer-rotation-level {
    color: var(--media-photo-primary);
}

.media-type-document .media-viewer-zoom-level,
.media-type-document .media-viewer-rotation-level {
    color: var(--media-doc-primary);
}

.media-type-video .media-viewer-zoom-level,
.media-type-video .media-viewer-rotation-level {
    color: var(--media-video-primary);
}

/* Reset Button Special Style */
.media-viewer-control-btn-reset:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}



/* แถบด้านล่าง (thumbnails) ย่อลง เพื่อให้หน้าจอกว้างขึ้น */
.media-viewer-thumbnails {
    padding: 8px 12px;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.7) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    flex-shrink: 0;
}

.media-viewer-film-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: fit-content;
}

/* Sprocket holes decoration */
.film-strip-sprocket {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 6px;
}

.film-strip-sprocket::before,
.film-strip-sprocket::after {
    content: '';
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-viewer-thumbs-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Thumbnail item - เล็กลง */
.media-viewer-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(30, 30, 40, 0.8);
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.media-viewer-thumb:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.media-type-photo .media-viewer-thumb.active {
    border-color: var(--media-photo-primary);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
}

.media-type-document .media-viewer-thumb.active {
    border-color: var(--media-doc-primary);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
}

.media-type-video .media-viewer-thumb.active {
    border-color: var(--media-video-primary);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

.media-viewer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Frame number overlay */
.thumb-frame-number {
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: 8px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* Icon thumbnails for video/doc */
.media-viewer-thumb-video,
.media-viewer-thumb-doc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    background: linear-gradient(145deg,
            rgba(40, 40, 50, 0.9) 0%,
            rgba(25, 25, 35, 0.9) 100%);
}

.media-viewer-thumb-video .thumb-icon,
.media-viewer-thumb-doc .thumb-icon {
    font-size: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Responsive Design
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .media-viewer-container {
        width: 98vw;
        height: 98vh;
        border-radius: 16px;
    }

    .media-viewer-content-wrapper {
        max-width: calc(100% - 80px);
    }

    .media-viewer-nav {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .media-viewer-nav-prev {
        left: 12px;
    }

    .media-viewer-nav-next {
        right: 12px;
    }
}

@media (max-width: 768px) {
    .media-viewer-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-height: 100vh;
    }

    .media-viewer-header {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }

    .media-viewer-title {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .media-viewer-filename {
        max-width: 160px;
        font-size: 14px;
    }

    .media-viewer-type-badge {
        padding: 6px 12px;
        font-size: 11px;
    }

    .media-viewer-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .media-viewer-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    .media-viewer-btn-text {
        display: none;
    }

    .media-viewer-content-wrapper {
        max-width: 100%;
        border-radius: 0;
    }

    .media-viewer-controls-inner {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 8px 16px;
        gap: 8px;
    }

    .media-viewer-control-divider {
        display: none;
    }

    .media-viewer-control-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .media-viewer-control-btn .control-text {
        display: none;
    }

    .media-viewer-nav {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .media-viewer-nav-prev {
        left: 8px;
    }

    .media-viewer-nav-next {
        right: 8px;
    }

    .media-viewer-thumbnails {
        padding: 12px;
    }

    .media-viewer-thumb {
        width: 70px;
        height: 40px;
    }

    .film-strip-sprocket {
        display: none;
    }

    .media-viewer-letterbox {
        height: 3px;
    }
}

@media (max-width: 480px) {
    .media-viewer-header {
        padding: 10px 12px;
    }

    .media-viewer-counter {
        display: none;
    }

    .media-viewer-close {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .media-viewer-thumb {
        width: 56px;
        height: 32px;
    }

    .thumb-frame-number {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   Scrollbar Styling
   ═══════════════════════════════════════════════════════════════════════ */
.media-viewer-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.media-viewer-thumbnails::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.media-viewer-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.media-viewer-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════
   Print Styles - Hide viewer when printing
   ═══════════════════════════════════════════════════════════════════════ */
@media print {
    .media-viewer-overlay {
        display: none !important;
    }
}