/**
 * recordings-modal.css
 * Styles for the recordings modal component
 * Used by: calendar.php, ppv/watch.php
 */

/* ===========================================
   Recordings Modal Overlay
   =========================================== */

.recordings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.recordings-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===========================================
   Modal Container
   =========================================== */

.recordings-modal {
    background: var(--card-bg, #1a1a2e);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.recordings-modal-overlay.active .recordings-modal {
    transform: scale(1);
}

/* ===========================================
   Modal Header
   =========================================== */

.recordings-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recordings-modal-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.recordings-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.recordings-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gf-style-primary-blue-gradient);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recordings-modal-badge svg {
    width: 12px;
    height: 12px;
}

.recordings-modal-close {
    background: var(--gf-style-primary-blue);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary, #aaa);
    transition: all 0.2s;
}

.recordings-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.recordings-modal-close svg {
    width: 20px;
    height: 20px;
}

/* ===========================================
   Modal Meta
   =========================================== */

.recordings-modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
}

.recordings-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.85rem;
}

.recordings-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* ===========================================
   Modal Body
   =========================================== */

.recordings-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Loading State */
.recordings-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: white;
}

.recordings-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-teal, #14b8a6);
    border-radius: 50%;
    animation: recordings-spin 1s linear infinite;
}

@keyframes recordings-spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.recordings-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: #ef4444;
    text-align: center;
}

.recordings-modal-error svg {
    width: 48px;
    height: 48px;
    opacity: 0.7;
}

/* Empty State */
.recordings-modal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: white;
    text-align: center;
}

.recordings-modal-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

/* ===========================================
   Stats Bar
   =========================================== */

.recordings-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.recordings-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 100px;
}

.recordings-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-teal, #14b8a6);
    line-height: 1.2;
}

.recordings-stat-label {
    font-size: 0.7rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ===========================================
   Recordings Grid
   =========================================== */

.recordings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* ===========================================
   Recording Card
   =========================================== */

.recording-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recording-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.3);
}

/* Recording Thumbnail */
.recording-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.recording-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recording-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gf-style-primary-blue-gradient);
    color: rgba(255, 255, 255, 0.3);
}

.recording-thumbnail-placeholder svg {
    width: 40px;
    height: 40px;
}

/* Camera Badge */
.recording-camera {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 3;
}

.recording-camera svg {
    width: 10px;
    height: 10px;
}

/* Duration Badge */
.recording-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 3;
}

/* Play Overlay */
.recording-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.recording-card:hover .recording-play-overlay {
    opacity: 1;
}

.recording-play-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-teal, #14b8a6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.recording-play-icon svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
}

/* Pro Badge */
.recording-pro-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--gf-style-primary-blue-gradient);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 3;
}

.recording-pro-badge svg {
    width: 10px;
    height: 10px;
}

/* Recording Info */
.recording-info {
    padding: 12px;
}

.recording-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary, #fff);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recording-time {
    font-size: 0.75rem;
    color: white;
}

/* ===========================================
   Mobile Responsive
   =========================================== */

@media (max-width: 768px) {
    .recordings-modal-overlay {
        padding: 10px;
    }
    
    .recordings-modal {
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .recordings-modal-header {
        padding: 16px;
    }
    
    .recordings-modal-title {
        font-size: 1.1rem;
    }
    
    .recordings-modal-body {
        padding: 16px;
    }
    
    .recordings-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .recordings-stats {
        gap: 8px;
    }
    
    .recordings-stat {
        padding: 10px 14px;
        min-width: 70px;
    }
    
    .recordings-stat-value {
        font-size: 1.2rem;
    }
    
    .recording-play-icon {
        width: 44px;
        height: 44px;
    }
    
    .recording-play-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .recordings-modal-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .recordings-modal-meta {
        padding: 10px 16px;
        gap: 10px;
    }
    
    .recordings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

