/* ═══════════════════════════════════════════════════════════════════════════
   AlphaScreen Shared Styles v1.0
   1. Onboarding Tour Overlay
   2. Unified Premium Slider (.dual-range)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Tour Overlay ────────────────────────────────────────────────────────── */
#tour-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(4, 4, 18, 0.72);
    backdrop-filter: blur(2px);
}

#tour-spotlight {
    display: none;
    position: absolute;
    border-radius: 12px;
    box-shadow:
        0 0 0 9999px rgba(4, 4, 18, 0.75),
        0 0 0 3px rgba(0, 229, 255, 0.7),
        0 0 28px 6px rgba(0, 229, 255, 0.25);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 99991;
}

#tour-card {
    display: none;
    position: absolute;
    width: 340px;
    background: linear-gradient(145deg, rgba(13, 13, 30, 0.97), rgba(20, 18, 48, 0.97));
    border: 1px solid rgba(108, 92, 231, 0.5);
    border-radius: 16px;
    padding: 20px 22px;
    z-index: 99992;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
    font-family: 'Outfit', system-ui, sans-serif;
    animation: tour-card-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tour-card-in {
    from { opacity: 0; transform: scale(0.88) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

.tour-step-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c5ce7;
    background: rgba(108, 92, 231, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
}

.tour-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}
.tour-close-btn:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.08);
}

.tour-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.tour-body {
    font-size: 0.88rem;
    color: rgba(228, 228, 239, 0.8);
    line-height: 1.65;
    margin-bottom: 18px;
}
.tour-body b {
    color: #00e5ff;
    font-weight: 700;
}

.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tour-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.25s;
}
.tour-dot.active {
    background: #6c5ce7;
    width: 18px;
    border-radius: 3px;
}

.tour-btns {
    display: flex;
    gap: 8px;
}

.tour-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.tour-btn-secondary:hover {
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}

.tour-btn-primary {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border: none;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.4);
}
.tour-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.55);
}

.tour-btn-finish {
    background: linear-gradient(135deg, #00b894, #00e676);
    border: none;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
}
.tour-btn-finish:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.5);
}

/* ── Help Button (always-on) ───────────────────────────────────────────────── */
#tour-help-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
}
#tour-help-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.65);
}

/* ── 2. Unified Premium Slider (.dual-range) ────────────────────────────────── */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-track-wrapper {
    position: relative;
    height: 6px;
    margin: 8px 0 4px;
}

/* The filled range track is drawn via JS using a background gradient on the wrapper */
.slider-track-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}

input[type="range"].dual-range {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    height: 6px;
    background: transparent;
    pointer-events: none;
    outline: none;
    margin: 0;
    z-index: 2;
}

/* Thumb — WebKit */
input[type="range"].dual-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.55), 0 0 0 0 rgba(108, 92, 231, 0.3);
    cursor: grab;
    transition: box-shadow 0.2s, transform 0.15s;
}
input[type="range"].dual-range::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.25);
    box-shadow: 0 3px 16px rgba(108, 92, 231, 0.75), 0 0 0 6px rgba(108, 92, 231, 0.15);
}
input[type="range"].dual-range:hover::-webkit-slider-thumb {
    box-shadow: 0 3px 14px rgba(108, 92, 231, 0.65), 0 0 0 4px rgba(108, 92, 231, 0.12);
}

/* Thumb — Firefox */
input[type="range"].dual-range::-moz-range-thumb {
    pointer-events: all;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.55);
    cursor: grab;
    transition: box-shadow 0.2s;
}
input[type="range"].dual-range::-moz-range-thumb:active {
    cursor: grabbing;
}

/* Track — WebKit (transparent — we draw the filled portion via JS gradient) */
input[type="range"].dual-range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: transparent;
}

/* Track — Firefox */
input[type="range"].dual-range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
}
input[type="range"].dual-range::-moz-range-progress {
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    border-radius: 3px;
    height: 6px;
}

/* Slider value labels */
.slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: #a29bfe;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    #tour-card {
        width: calc(100vw - 32px);
        left: 16px !important;
    }
    #tour-help-btn {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}
