/* ============================================
   Processing Overlays - Unified Glass Morphism
   Video (purple/cyan) | Music (orange/amber)
   ============================================ */

/* === THEME VARIABLES === */

.proc-overlay--video {
    --proc-accent: #8B5CF6;
    --proc-accent-end: #06b6d4;
    --proc-glow: rgba(139, 92, 246, 0.5);
    --proc-glow-strong: rgba(139, 92, 246, 0.7);
}

.proc-overlay--music {
    --proc-accent: #ff9800;
    --proc-accent-end: #ff5722;
    --proc-glow: rgba(255, 152, 0, 0.5);
    --proc-glow-strong: rgba(255, 152, 0, 0.7);
}

/* === BASE OVERLAY === */

.proc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 40px;
}

/* === GLASS CARD === */

.proc-card {
    max-width: 500px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    text-align: center;
}

/* === ANIMATED COVER ART === */

.proc-animation {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.proc-cover {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    filter: blur(5px);
    opacity: 0.6;
    animation: proc-pulse 2s ease-in-out infinite;
}

@keyframes proc-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Icon overlay on cover art */

.proc-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.proc-icon svg {
    filter: drop-shadow(0 0 20px var(--proc-glow));
}

/* Spinning variant (e.g. music note during processing) */
.proc-icon--spin {
    animation: proc-icon-spin 2s linear infinite;
}

@keyframes proc-icon-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Glow pulse variant (e.g. video icon during pending) */
.proc-icon--glow {
    animation: proc-icon-glow 2s ease-in-out infinite;
}

@keyframes proc-icon-glow {
    0%, 100% { filter: drop-shadow(0 0 15px var(--proc-glow)); }
    50% { filter: drop-shadow(0 0 30px var(--proc-glow-strong)); }
}

/* CSS Spinner ring (replaces icon during active processing) */

.proc-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--proc-accent);
    border-radius: 50%;
    animation: proc-spinner-spin 1s linear infinite;
    filter: drop-shadow(0 0 12px var(--proc-glow));
}

@keyframes proc-spinner-spin {
    to { transform: rotate(360deg); }
}

/* === TYPOGRAPHY === */

.proc-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.proc-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* === PROGRESS BAR === */

.proc-progress {
    position: relative;
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.proc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--proc-accent), var(--proc-accent-end));
    transition: width 0.5s ease;
    border-radius: 25px;
    box-shadow: 0 0 20px var(--proc-glow);
}

.proc-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* === QUEUE INFO === */

.proc-queue-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.proc-queue-position {
    color: var(--proc-accent);
    font-weight: bold;
    font-size: 16px;
}

/* === STATUS TEXT === */

.proc-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
    margin-top: 15px;
    min-height: 24px;
}

.proc-status--pending {
    color: #ffa726;
}

.proc-status--processing {
    color: #66bb6a;
}

.proc-status--completed {
    color: #4caf50;
}

.proc-status--failed {
    color: #f44336;
}

/* === INLINE QUEUE STATUS (compact, for live streams) === */

.proc-inline-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
}

.proc-inline-status span {
    font-weight: 500;
}

.proc-inline-status--pending {
    color: #ffa500;
}

.proc-inline-status--failed {
    color: #ef4444;
}

.proc-inline-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--proc-accent, #8B5CF6);
    border-radius: 50%;
    animation: proc-spinner-spin 1s linear infinite;
}

.proc-inline-progress {
    width: 100%;
    max-width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.proc-inline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--proc-accent, #8B5CF6), var(--proc-accent-end, #06b6d4));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* === NIGHT MODE === */

.night-mode .proc-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .proc-overlay {
        padding: 30px 20px;
    }

    .proc-card {
        padding: 30px 20px;
    }

    .proc-animation {
        width: 150px;
        height: 150px;
        margin-bottom: 20px;
    }

    .proc-title {
        font-size: 22px;
    }

    .proc-subtitle {
        font-size: 14px;
    }

    .proc-progress {
        height: 40px;
    }

    .proc-progress-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .proc-overlay {
        padding: 25px 15px;
    }

    .proc-card {
        padding: 25px 15px;
    }

    .proc-animation {
        width: 120px;
        height: 120px;
    }

    .proc-title {
        font-size: 20px;
    }

    .proc-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .proc-progress {
        height: 35px;
    }

    .proc-progress-text {
        font-size: 14px;
    }

    .proc-status {
        font-size: 13px;
    }

    .proc-queue-info {
        font-size: 12px;
    }
}

/* Hidden utility */
.proc-hidden {
    display: none !important;
}
