/*
 * Recordings CSS Bundle: recordings.bundle.css
 * Auto-generated by scripts/bundle_recordings_css.py
 * DO NOT EDIT - Edit source files instead
 *
 * Sources: _base.css, recordings-desktop.css, recordings-mobile-portrait.css, recordings-mobile-landscape.css
 */

/* === _base.css === */

/**
 * Recordings Base CSS
 * Variables, reset, shared styles
 */

:root {
    /* Colors */
    --color-primary: #667eea;
    --color-primary-dark: #5a67d8;
    --color-secondary: #764ba2;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Neutrals */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', var(--font-sans);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.recordings-page {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    overflow: hidden;
}

/* App Container */
.recordings-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* View Panel */
.view-panel {
    display: none;
    flex: 1;
    overflow: hidden;
}

.view-panel.active {
    display: flex;
}

/* Modal Overlay */
.recording-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.recording-modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.recording-modal {
    transform: scale(0.95);
    transition: transform 0.15s ease;
}

.recording-modal-overlay.visible .recording-modal {
    transform: scale(1);
}

.recording-modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-bg);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.modal-close:hover {
    background: var(--color-border);
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.modal-date {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.modal-body {
    padding: 20px 24px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.modal-tag {
    padding: 4px 10px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.modal-stats {
    display: flex;
    gap: 20px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.modal-footer {
    padding: 16px 24px 24px;
}

.modal-watch-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-watch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Pinned "Free to watch" group — shown at the top for non-program viewers */
.list-group-free .list-group-header {
    border-bottom: 2px solid #fdcc05;
}
.list-group-free .list-group-month {
    color: #0264c0;
}
.list-group-note {
    margin-left: auto;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    color: #047857;
    background: #d1fae5;
    padding: 4px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Exit Warning Modal */
.exit-warning-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.exit-warning-overlay.visible {
    display: flex;
    opacity: 1;
}

.exit-warning-modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    max-width: 320px;
    width: 100%;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.15s ease;
}

.exit-warning-overlay.visible .exit-warning-modal {
    transform: scale(1);
}

.exit-warning-content {
    text-align: center;
    margin-bottom: 20px;
}

.exit-warning-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.exit-warning-text {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.exit-warning-actions {
    display: flex;
    gap: 12px;
}

.exit-warning-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exit-warning-cancel {
    background: var(--color-bg);
    color: var(--color-text);
}

.exit-warning-cancel:hover {
    background: var(--color-border);
}

.exit-warning-confirm {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.exit-warning-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Calendar Day Badges */
.day-number {
    position: relative;
    z-index: 1;
}

.day-badges {
    display: flex;
    gap: 2px;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
}

.day-badge {
    font-size: 0.5rem;
    font-weight: 600;
    padding: 1px 3px;
    border-radius: 2px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.day-badge.course-ar {
    background: #667eea; /* Primary purple */
}

.day-badge.course-mk {
    background: #10b981; /* Success green */
}

.day-badge.course-wk {
    background: #f59e0b; /* Warning amber */
}

.day-badge.course-pc {
    background: #ef4444; /* Error red */
}

.day-badge.course-gs {
    background: #06b6d4; /* Cyan */
}

.day-badge.more {
    background: var(--color-text-muted);
}

/* Calendar Legend */
.legend-border {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.legend-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 2px;
    color: white;
    text-transform: uppercase;
}

.legend-badge.ar {
    background: #667eea;
}

.legend-badge.mk {
    background: #10b981;
}

/* Previous Month Hint */
.prev-month-hint {
    text-align: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.prev-month-hint:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.prev-month-hint .hint-arrow {
    display: inline-block;
    animation: bounce-up 1.5s ease-in-out infinite;
    margin-right: 4px;
}

.prev-month-hint .hint-count {
    opacity: 0.7;
    margin-left: 4px;
}

.prev-month-hint .hint-count::before {
    content: '•';
    margin-right: 4px;
}

@keyframes bounce-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ===== New clip-replay availability badges (recordings list) ===== */
.list-item-title { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
/* Interactive Replay (Track A clips) — gold pill. */
.rec-replay-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: #fdcc05; color: #0f172a;
    font: 700 11px/1 'Inter', -apple-system, sans-serif; letter-spacing: .02em;
    padding: 4px 9px; border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(253,204,5,.5); animation: rec-replay-pulse 2.4s ease-in-out infinite;
}
.rec-replay-badge svg { width: 13px; height: 13px; }
@keyframes rec-replay-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253,204,5,.45); }
    50% { box-shadow: 0 0 0 5px rgba(253,204,5,0); }
}

/* Full Class Replay (Track B synced DVR) — green pill (same green as the
   welcome "Join Class" CTA) with a subtle diagonal left→right light sweep. */
.rec-fullreplay-badge {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 5px;
    background: linear-gradient(135deg, #10b981, #059669); color: #fff;
    font: 700 11px/1 'Inter', -apple-system, sans-serif; letter-spacing: .02em;
    padding: 4px 9px; border-radius: 999px;
}
.rec-fullreplay-badge svg { width: 13px; height: 13px; position: relative; z-index: 1; }
.rec-fullreplay-badge > span { position: relative; z-index: 1; }
.rec-fullreplay-badge::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.38) 50%, transparent 62%);
    transform: translateX(-120%);
    animation: rec-fullreplay-shimmer 3.4s ease-in-out infinite;
}
@keyframes rec-fullreplay-shimmer {
    0%        { transform: translateX(-120%); }
    55%, 100% { transform: translateX(120%); }
}
@media (prefers-reduced-motion: reduce) {
    .rec-fullreplay-badge::after { animation: none; }
}

/* Badge labels: full on desktop, short on mobile portrait (toggled there). */
.rec-replay-badge .badge-short,
.rec-fullreplay-badge .badge-short { display: none; }

/* ===== Dual-track replay chooser modal (Interactive vs Full Class Replay) ===== */
.replay-chooser-overlay {
    position: fixed; inset: 0; z-index: 1100;
    display: none; align-items: center; justify-content: center;
    padding: 20px; background: rgba(15,23,42,.45);
    opacity: 0; transition: opacity .15s ease;
}
.replay-chooser-overlay.visible { display: flex; opacity: 1; }
.replay-chooser {
    position: relative; width: 100%; max-width: 440px;
    background: var(--color-surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 24px;
    transform: scale(.96); transition: transform .15s ease;
}
.replay-chooser-overlay.visible .replay-chooser { transform: scale(1); }
.replay-chooser-close {
    position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
    border: none; background: var(--color-bg); border-radius: 50%;
    font-size: 1.2rem; cursor: pointer; color: var(--color-text-muted);
}
.replay-chooser-close:hover { background: var(--color-border); }
.replay-chooser-head { margin-bottom: 16px; padding-right: 28px; }
.replay-chooser-title {
    font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: #0f172a;
}
.replay-chooser-date { margin-top: 4px; color: var(--color-text-muted); font-size: .88rem; }
.replay-chooser-options { display: flex; flex-direction: column; gap: 12px; }
.replay-chooser-opt {
    display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
    padding: 16px; cursor: pointer;
    background: var(--color-bg); border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.replay-chooser-opt:hover {
    border-color: #10b981; box-shadow: 0 4px 16px rgba(16,185,129,.18); transform: translateY(-1px);
}
.replay-chooser-opt-icon {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px; color: #fff;
}
/* Match the list badges: Interactive = gold, Full Class = green. */
.replay-chooser-opt[data-track="a"] .replay-chooser-opt-icon { background: #fdcc05; color: #0f172a; }
.replay-chooser-opt[data-track="b"] .replay-chooser-opt-icon { background: linear-gradient(135deg, #10b981, #059669); }
.replay-chooser-opt-icon svg { width: 22px; height: 22px; }
.replay-chooser-opt-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.replay-chooser-opt-name { font-weight: 700; font-size: .98rem; color: #0f172a; }
.replay-chooser-opt-desc { font-size: .82rem; line-height: 1.4; color: var(--color-text-muted); }
.replay-chooser-opt-arrow { flex: 0 0 auto; color: #10b981; font-size: 1.1rem; font-weight: 700; }
.rec-free-badge {
    display: inline-flex; align-items: center;
    background: #d1fae5; color: #047857;
    font: 700 10.5px/1 'Inter', -apple-system, sans-serif; letter-spacing: .04em;
    text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
}
.rec-lock { display: inline-flex; align-items: center; color: #94a3b8; }
.rec-lock svg { width: 14px; height: 14px; }

/* Locked (free user, paid recording) — subtle dim; still clickable → upgrade. */
.list-item.is-locked .list-item-progress { opacity: .5; }
.list-item.is-replay { cursor: pointer; }

/* Upgrade prompt reusing the recording modal shell. */
.modal-upsell {
    background: #fef3c7; color: #5d4037; border-radius: 10px;
    padding: 12px 14px; font: 500 14px/1.5 'Inter', -apple-system, sans-serif;
}


/* === recordings-desktop.css === */

/**
 * Recordings Desktop Styles
 */

@media (min-width: 769px) {

/* Header */
.recordings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-name {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-center {
    display: flex;
    align-items: center;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-right: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.recordings-app.list-active .filter-bar {
    opacity: 1;
    visibility: visible;
}

.filter-bar .filter-group {
    display: flex;
    align-items: center;
}

.filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--color-surface);
    cursor: pointer;
    min-width: 140px;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.view-toggle {
    display: flex;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 4px;
}

.view-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.view-btn:hover:not(.active) {
    color: var(--color-text);
}

/* Main Content */
.recordings-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 24px;
}

/* Calendar View */
#calendarView {
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}

.calendar-container {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 600px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.calendar-month {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    padding: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.calendar-day:hover {
    background: var(--color-bg);
}

.calendar-day.other-month {
    color: var(--color-text-light);
}

.calendar-day.today {
    font-weight: 600;
    color: var(--color-primary);
}

.calendar-day.selected {
    background: var(--color-primary);
    color: white;
}

.calendar-day.has-recordings {
    font-weight: 600;
    background: var(--color-bg);
    border: 2px solid var(--color-primary);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.tagged {
    background: var(--color-success);
}

.legend-dot.untagged {
    background: var(--color-warning);
}

/* List View */
#listView {
    flex-direction: column;
    overflow: hidden;
}

.list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

.list-loading {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}

.list-group {
    margin-bottom: 24px;
}

.list-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 10;
}

.list-group-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.list-group-month {
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.list-item-info {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-meta {
    display: flex;
    gap: 16px;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.list-item-progress {
    width: 100px;
}

.list-item-progress-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: right;
    margin-bottom: 4px;
}

/* Player View */
#playerView {
    flex-direction: column;
}

.player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
}

.player-info {
    flex: 1;
}

.player-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.player-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.player-wrapper {
    flex: 1;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.player-embed {
    position: absolute;
    inset: 0;
}

.player-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.player-progress .progress-bar {
    flex: 1;
}

.player-progress .progress-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

} /* End @media desktop */


/* === recordings-mobile-portrait.css === */

/**
 * Recordings Mobile Portrait Styles
 */

@media (max-width: 768px) and (orientation: portrait) {

/* Allow native pull-to-refresh */
body.recordings-page {
    overflow: auto;
    overscroll-behavior-y: auto;
}

.recordings-app {
    min-height: 100vh;
    height: auto;
    overflow: visible;
}

/* Player mode: no scroll needed */
.recordings-app.player-active {
    height: auto;
    min-height: 100vh;
}

/* Header */
.recordings-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
}

/* Player mode: compact header */
.recordings-app.player-active .recordings-header {
    padding: 10px 16px;
    gap: 8px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    width: 32px;
    height: 32px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-name {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Player mode: hide course name */
.recordings-app.player-active .course-name {
    display: none;
}

.header-center {
    order: 3;
    width: 100%;
}

/* Player mode: hide filter bar and view toggle completely */
.recordings-app.player-active .header-center {
    display: none;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, height 0.2s ease, margin 0.2s ease;
}

.recordings-app.list-active .filter-bar {
    opacity: 1;
    visibility: visible;
    height: auto;
    overflow: visible;
}

.filter-bar .filter-group {
    flex: 1;
    min-width: 120px;
}

.filter-bar select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--color-surface);
    cursor: pointer;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.view-toggle {
    display: flex;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 3px;
    width: 100%;
}

.view-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

/* Main Content */
.recordings-main {
    flex: 1;
    display: flex;
    overflow: visible;
    padding: 16px;
}

/* Player mode: tighter padding */
.recordings-app.player-active .recordings-main {
    padding: 8px 12px;
}

/* Calendar View */
#calendarView {
    justify-content: center;
    align-items: flex-start;
}

.calendar-container {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.calendar-month {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    padding: 8px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
}

.calendar-day.other-month {
    color: var(--color-text-light);
}

.calendar-day.today {
    font-weight: 600;
    color: var(--color-primary);
}

.calendar-day.selected {
    background: var(--color-primary);
    color: white;
}

.calendar-day.has-recordings {
    font-weight: 600;
    background: var(--color-bg);
    border: 2px solid var(--color-primary);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Prev Month Hint - Mobile */
.prev-month-hint {
    font-size: 0.75rem;
    padding: 10px 12px;
}

/* List View */
#listView {
    flex-direction: column;
    overflow: visible;
}

.list-container {
    flex: 1;
    overflow-y: visible;
}

.list-loading {
    text-align: center;
    padding: 32px;
    color: var(--color-text-muted);
}

.list-group {
    margin-bottom: 20px;
}

.list-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 10;
}

.list-group-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.list-group-month {
    font-size: 0.9rem;
}

.list-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    margin-top: 8px;
    cursor: pointer;
}

.list-item-info {
    flex: 1;
}

.list-item-title {
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.list-item-meta {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.list-item-progress {
    width: 100%;
}

.list-item-progress-text {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

/* ==================== PLAYER VIEW ==================== */
/* Dashboard mode: everything fits in viewport, no scrolling */

#playerView {
    flex-direction: column;
}

.player-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-header {
    flex-shrink: 0;
    padding: 8px 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.3;
    /* Allow 2 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.player-meta {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.player-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.player-embed {
    position: absolute;
    inset: 0;
}

.player-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-progress {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.player-progress .progress-bar {
    flex: 1;
}

.player-progress .progress-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Modal */
.recording-modal {
    margin: 16px;
    max-height: calc(100vh - 32px);
}

.modal-header {
    padding: 20px 20px 12px;
}

.modal-title {
    font-size: 1.1rem;
}

.modal-body {
    padding: 16px 20px;
}

.modal-footer {
    padding: 12px 20px 20px;
}

/* Replay badges: use the short labels so a class with BOTH badges fits the
   narrow row without crowding the title. (Vertical stacking is one rule away
   if it reads better — set .list-item-title flex-direction:column.) */
.rec-replay-badge .badge-full,
.rec-fullreplay-badge .badge-full { display: none; }
.rec-replay-badge .badge-short,
.rec-fullreplay-badge .badge-short { display: inline; }

} /* End @media mobile portrait */


/* === recordings-mobile-landscape.css === */

/**
 * Recordings Mobile Landscape Styles
 */

@media (max-width: 926px) and (orientation: landscape) {

/* Header - Compact */
.recordings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-logo {
    width: 28px;
    height: 28px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-name {
    display: none;
}

.header-center {
    display: flex;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.view-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
}

.view-btn.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

/* Main Content */
.recordings-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 12px;
}

/* Calendar View - Side by side layout */
#calendarView {
    justify-content: center;
    align-items: flex-start;
}

.calendar-container {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 500px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.calendar-month {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    padding: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    position: relative;
}

.calendar-day.other-month {
    color: var(--color-text-light);
}

.calendar-day.today {
    font-weight: 600;
    color: var(--color-primary);
}

.calendar-day.selected {
    background: var(--color-primary);
    color: white;
}

.calendar-day.has-recordings {
    font-weight: 600;
    background: var(--color-bg);
    border: 2px solid var(--color-primary);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.legend-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

/* List View */
#listView {
    flex-direction: column;
    overflow: hidden;
}

.list-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.list-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    padding: 10px 0;
}

.list-group-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.list-group-month {
    font-size: 0.85rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-top: 6px;
}

.list-item-title {
    font-size: 0.85rem;
}

.list-item-meta {
    font-size: 0.75rem;
}

.list-item-progress {
    width: 80px;
}

.list-item-progress-text {
    font-size: 0.65rem;
}

/* Player View - Optimized for landscape */
#playerView {
    flex-direction: row;
    gap: 16px;
}

.player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.player-meta {
    font-size: 0.75rem;
}

.player-wrapper {
    flex: 1;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.player-embed {
    position: absolute;
    inset: 0;
}

.player-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.player-progress .progress-text {
    font-size: 0.75rem;
}

/* Modal - Landscape optimized */
.recording-modal-overlay {
    padding: 12px;
}

.recording-modal {
    max-width: 400px;
    max-height: calc(100vh - 24px);
}

.modal-header {
    padding: 16px 16px 10px;
}

.modal-title {
    font-size: 1rem;
}

.modal-body {
    padding: 12px 16px;
}

.modal-footer {
    padding: 10px 16px 16px;
}

.modal-watch-btn {
    padding: 10px;
    font-size: 0.9rem;
}

} /* End @media mobile landscape */
