﻿/* ============================================================
   FIXED LYRICS WORKFLOW: CENTERED MODAL & SCROLL CAPTURE
   ============================================================ */

/* ✅ Fix 1: Background Lock (Stop main page scrolling) */
body.lyrics-lock {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
}

/* ✅ Step header alignment */
.results-head-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.results-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ✅ Fix 2: Lyrics Overlay (Centered Modal View) */
.lyrics-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none; /* Controlled by JS .is-open */
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(12px);
    overscroll-behavior: none;
}

    .lyrics-overlay.is-open {
        display: flex;
    }

/* ✅ Fix 3: Modal Card with proper Mouse-Wheel support */
.lyrics-overlay-card {
    width: min(980px, 96vw);
    max-height: 92vh;
    border-radius: 22px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.35));
    box-shadow: var(--shadow2);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Clips children so header stays fixed */
}

/* ✅ Fix 4: Primary Scroll Container (CAPTURES MOUSE ROLLER) */
.lyrics-overlay-body {
    flex: 1 1 auto;
    overflow-y: auto !important; /* This is the ONLY scrollable area */
    overflow-x: hidden;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    pointer-events: auto; /* Ensures it captures all pointer/wheel events */
}

/* ✅ Fix 5: Remove Paper/Full interference 
   We strip height/overflow from these so they don't block the scroll wheel */
.lyrics-paper {
    height: auto !important;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.lyrics-full {
    height: auto !important;
    overflow: visible !important;
    font-size: 18px;
    line-height: 1.85;
    white-space: normal;
    color: rgba(255,255,255,.95);
    padding-bottom: 60px; /* Space at bottom for scrolling comfort */
}

/* ✅ Mobile Optimizations (576px) */
@media (max-width: 576px) {
    .btn .lbl {
        display: none !important;
    }

    .btn .btn-ic {
        margin: 0 !important;
    }

    .btn.small {
        padding: .5rem .6rem !important;
        font-size: .85rem !important;
        border-radius: 12px !important;
    }

    .results-head-actions .badge {
        font-size: .85rem;
        padding: .25rem .55rem;
    }

    .lyrics-overlay-card {
        width: 100%;
        max-height: 94vh;
        border-radius: 18px;
    }

    .lyrics-overlay-body {
        padding: 18px;
    }

    .actions .btn.small {
        padding: .5rem .55rem !important;
        min-width: auto !important;
    }
}

/* ✅ Step Banner Premium Styling */
.search-hero-text {
    padding: 14px 14px 20px;
}

.search-title {
    margin: 0 0 16px;
    font-size: clamp(24px, 3.6vw, 36px);
    letter-spacing: -1px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    /* Glassmorphism to match your card style */
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.18));
    border: 1px solid var(--stroke);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    max-width: fit-content;
}

.step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--accent1); /* Your brand purple */
    color: white;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 13px;
    box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
}

.step-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.4;
    letter-spacing: -0.1px;
}

    .step-text span {
        color: var(--accent2); /* Your brand mint/green */
        text-decoration: underline;
        text-decoration-color: rgba(46, 229, 157, 0.3);
        text-underline-offset: 4px;
    }

/* Mobile Adjustments */
@media (max-width: 520px) {
    .step-banner {
        width: 100%;
        padding: 10px 12px;
    }

    .step-text {
        font-size: 13px;
    }
}
