﻿/* =====================================================================
   jampass-gate.css
   Save to: ~/css/JamtabViewerCss/jampass-gate.css
   Styled to match JamtabViewer.css:
     base #0B0B0B / #111 / #171717, brand blue #0165b0 / hover #0d83dd,
     feature-block look (rgba(255,255,255,0.1), radius 8px),
     modal stacking matched to .jamtab-modal-overlay (max-int z-index).
   ===================================================================== */

/* Locked containers: dimmed + not-allowed cursor. The capture-phase JS
   handler is what actually blocks the click; this is the visual signal. */
.jampass-locked {
    position: relative;
    opacity: 0.45;
    filter: grayscale(0.6);
    cursor: not-allowed;
}

/* Counter badge — styled as a feature-block tile (matches .song-feature-block)
   but with the Jam Pass blue accent so it reads as part of the toolbar. */
#jampass-badge {
    display: none; /* shown by JS when locked (set to flex) */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 calc(10% - 15px); /* same flex basis as .song-feature-block */
    max-width: 120px;
    min-width: 90px;
    text-align: center;
    padding: 10px;
    background: rgba(1, 101, 176, 0.15); /* blue-tinted vs the grey tiles */
    border: 1px solid #0165b0;
    border-radius: 8px; /* matches feature blocks */
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

    #jampass-badge:hover {
        background: rgba(13, 131, 221, 0.25);
        border-color: #0d83dd;
        transform: translateY(-3px);
    }

    /* Title line — the number / status, bold like .song-feature-title */
    #jampass-badge .jampass-title {
        font-size: 13px;
        font-weight: bold;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

        #jampass-badge .jampass-title .fa {
            font-size: 13px;
            color: #0d83dd;
        }

    /* Subtitle — "Jam Passes", like .song-feature-subtitle */
    #jampass-badge .jampass-subtitle {
        font-size: 12px;
        color: #cce4f5;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Responsive: match how .song-feature-block reflows */
@media (max-width: 1024px) {
    #jampass-badge {
        flex: 1 1 calc(25% - 15px);
        padding: 2px;
    }

        #jampass-badge .jampass-title,
        #jampass-badge .jampass-subtitle {
            font-size: 10px;
        }
}

@media (max-width: 768px) {
    #jampass-badge {
        flex: 1 1 calc(33.33% - 15px);
        padding: 2px;
    }

        #jampass-badge .jampass-title,
        #jampass-badge .jampass-subtitle {
            font-size: 10px;
        }
}

@media (max-width: 480px) {
    #jampass-badge {
        flex: 1 1 calc(50% - 15px);
        padding: 2px;
    }

        #jampass-badge .jampass-title,
        #jampass-badge .jampass-subtitle {
            font-size: 10px;
        }
}

/* Prompt modal — mirrors .jamtab-modal-overlay / .jamtab-modal so it
   feels native, and sits at the same max stacking level so it clears the
   audio player (z-index 1e13) and everything else. */
#jampass-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647; /* matches .jamtab-modal-overlay — above all */
    touch-action: manipulation;
}

    #jampass-modal[hidden] {
        display: none;
    }

.jampass-modal-card {
    background: #121212;
    color: #f0f0f0;
    max-width: 420px;
    width: 92%;
    max-height: 90dvh;
    overflow: auto;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid #222;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    text-align: center;
}

    .jampass-modal-card h3 {
        margin: 0 0 10px;
        font-size: 1.15rem;
        color: #fff;
    }

    .jampass-modal-card p {
        margin: 0 0 18px;
        line-height: 1.45;
        color: #ddd;
    }

.jampass-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

    .jampass-modal-actions button {
        padding: 10px 18px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        border: 2px solid transparent;
        transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
    }

        .jampass-modal-actions button:active {
            transform: scale(0.97);
        }

/* Secondary (Not now) — muted, dark */
#jampass-cancel {
    background: #1a1a1a;
    color: #bbb;
    border-color: #333;
}

    #jampass-cancel:hover {
        background: #222;
        color: #fff;
    }

/* Primary (Use 1 Jam Pass) — brand blue, matches .jamtab-modal-btn */
#jampass-confirm {
    background-color: #0165b0;
    border-color: #0165b0;
    color: #fff;
    font-weight: 600;
}

    #jampass-confirm:hover {
        background-color: #0d83dd;
        border-color: #0d83dd;
    }
