/* Do Better Norge - Media Players Design System */
/* Unified styling for Video, Audio, and PDF Slide Show players */

/* ===== PLAYER PAGE LAYOUT ===== */
.media-player-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* ===== PLAYER HEADER SECTION ===== */
.player-header {
    background: linear-gradient(135deg, rgba(0, 32, 91, 0.03) 0%, rgba(186, 12, 47, 0.02) 100%);
    border: 1px solid rgba(0, 32, 91, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.player-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(186, 12, 47, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.player-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--norway-blue);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    position: relative;
}

/* Audio overview: lighter title so it stands out against background */
/* Top page title: darker so it stands out */
.audio-overview-page .player-title {
    color: #001a3d;
    font-weight: 700;
}

.player-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 32, 91, 0.12);
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.meta-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 32, 91, 0.08);
}

.meta-icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

.player-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    max-width: 900px;
}

.player-description p {
    margin-bottom: 1rem;
}

/* ===== VIDEO PLAYER CONTAINER ===== */
.video-player-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 32, 91, 0.2);
    margin-bottom: 2rem;
    position: relative;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.video-player-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--norway-red), var(--norway-blue));
}

.video-player {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
}

/* ===== AUDIO PLAYER CONTAINER ===== */
.audio-player-card {
    background: linear-gradient(135deg, rgba(0, 32, 91, 0.95) 0%, rgba(0, 61, 122, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 32, 91, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-player-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.audio-header {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.cover-art {
    width: 220px;
    height: 220px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    margin: 0 auto 2rem;
    display: block;
    border: 3px solid rgba(255, 255, 255, 0.15);
}

.cover-placeholder {
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    margin: 0 auto 2rem;
    border: 3px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Card title (between image and meta icons): lighter so it stands out on the card */
.audio-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.audio-meta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.audio-player-controls {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== PDF VIEWER CONTAINER ===== */
.pdf-viewer-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 32, 91, 0.15);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 32, 91, 0.08);
}

.pdf-controls {
    background: linear-gradient(135deg, var(--norway-blue) 0%, rgba(0, 61, 122, 1) 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.page-info {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pdf-canvas-container {
    background: linear-gradient(to bottom, #e8ebef 0%, #d4d9df 100%);
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 700px;
    position: relative;
}

#pdfCanvas {
    box-shadow: 0 16px 48px rgba(0, 32, 91, 0.25);
    background: white;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.loading-message {
    color: var(--norway-blue);
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
}

/* ===== CONTROL BUTTONS ===== */
.control-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.control-btn:hover:not(:disabled) {
    background: white;
    color: var(--norway-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.control-btn:active:not(:disabled) {
    transform: translateY(0);
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ===== AUDIO/VIDEO ELEMENTS ===== */
audio {
    width: 100%;
    outline: none;
    border-radius: 8px;
}

audio::-webkit-media-controls-panel {
    background: white;
}

/* ===== INFO SECTION ===== */
.player-info-section {
    background: white;
    border: 1px solid rgba(0, 32, 91, 0.08);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 32, 91, 0.04);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 32, 91, 0.08);
}

.action-btn {
    padding: 1rem 2rem;
    border-radius: 24px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--norway-blue);
    color: white;
}

.btn-primary:hover {
    background: rgba(0, 32, 91, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 32, 91, 0.25);
}

.btn-secondary {
    background: var(--norway-red);
    color: white;
}

.btn-secondary:hover {
    background: rgba(186, 12, 47, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(186, 12, 47, 0.25);
}

.btn-outline {
    background: white;
    color: var(--norway-blue);
    border: 2px solid var(--norway-blue);
}

.btn-outline:hover {
    background: var(--norway-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 32, 91, 0.2);
}

/* ===== TRANSCRIPT SECTION ===== */
.transcript-section {
    background: linear-gradient(135deg, rgba(0, 32, 91, 0.02) 0%, rgba(186, 12, 47, 0.01) 100%);
    border: 1px solid rgba(0, 32, 91, 0.08);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.transcript-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--norway-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.transcript-content {
    line-height: 2;
    color: var(--text-dark);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--norway-red);
    box-shadow: 0 2px 8px rgba(0, 32, 91, 0.04);
}

/* Transcript scrollable window (audio overview – long transcripts) */
.transcript-window .transcript-scroll-wrap {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0, 32, 91, 0.12);
    background: #fafbfc;
    box-shadow: inset 0 2px 4px rgba(0, 32, 91, 0.04);
    -webkit-overflow-scrolling: touch;
}
.transcript-window .transcript-scroll-wrap .transcript-content {
    margin: 0;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
}
.transcript-window .transcript-header {
    margin-bottom: 0.75rem;
}

/* Audio overview: More info button */
.audio-more-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--norway-blue) 0%, #003d7a 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(0, 32, 91, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.audio-more-info-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 32, 91, 0.4);
}
.audio-more-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    font-size: 0.85rem;
}

/* ===== RELATED QUIZ CARD ===== */
.related-quiz-card {
    background: linear-gradient(135deg, var(--norway-blue) 0%, rgba(0, 61, 122, 1) 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 32, 91, 0.3);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.related-quiz-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.related-quiz-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 2rem;
    position: relative;
}

.related-quiz-card p {
    font-size: 1.125rem;
    opacity: 0.95;
    line-height: 1.7;
    position: relative;
}

.quiz-btn {
    background: white;
    color: var(--norway-blue);
    padding: 1rem 2rem;
    border-radius: 24px;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
    font-size: 1.0625rem;
    margin-top: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.quiz-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Slide show: main content section (below PDF) */
.slide-show-main-content {
    background: linear-gradient(135deg, rgba(0, 32, 91, 0.03) 0%, rgba(186, 12, 47, 0.02) 100%);
    border: 1px solid rgba(0, 32, 91, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.slide-show-main-content :first-child { margin-top: 0; }
.slide-show-main-content :last-child { margin-bottom: 0; }

/* Slide show: related link */
.related-link-card {
    margin-bottom: 2rem;
    text-align: center;
}

.related-link-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--norway-blue);
    color: white;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 32, 91, 0.3);
    color: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .media-player-page {
        padding: 1.5rem 1rem;
    }

    .player-header {
        padding: 1.5rem;
    }

    .player-title {
        font-size: 1.75rem;
    }

    .audio-player-card,
    .player-info-section,
    .transcript-section {
        padding: 1.5rem;
    }

    .cover-art,
    .cover-placeholder {
        width: 180px;
        height: 180px;
    }

    .audio-title {
        font-size: 1.75rem;
    }

    .pdf-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
    }

    .control-group {
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
        width: 100%;
    }

    .pdf-canvas-container {
        padding: 2rem 1rem;
        min-height: 500px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-header,
.video-player-wrapper,
.audio-player-card,
.pdf-viewer-wrapper,
.player-info-section,
.transcript-section,
.related-quiz-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-player-card {
    animation-delay: 0.1s;
}

.player-info-section {
    animation-delay: 0.2s;
}

.related-quiz-card {
    animation-delay: 0.3s;
}
