/* ── Onboarding Tutorial ─────────────────────────────────── */

/* Overlay backdrop — no pointer-events, spotlight box-shadow handles the dimming */
.ob-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ob-overlay.active { opacity: 1; }

/* Spotlight cutout — pointer-events none so scroll/touch passes through to the element beneath */
.ob-spotlight {
    position: fixed;
    z-index: 9998;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}

/* Elevated target — sits above the spotlight shadow so user can scroll/interact */
.ob-target-elevated {
    z-index: 9998 !important;
}

/* Tooltip bubble */
.ob-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1a1a1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    max-width: 320px;
    width: 90vw;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}
.ob-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip arrow */
.ob-tooltip::before {
    content: '';
    position: absolute;
    border: 7px solid transparent;
}
.ob-tooltip.arrow-top::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #333;
}
.ob-tooltip.arrow-bottom::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #333;
}
.ob-tooltip.arrow-left::before {
    right: 100%;
    top: 24px;
    border-right-color: #333;
}
.ob-tooltip.arrow-right::before {
    left: 100%;
    top: 24px;
    border-left-color: #333;
}

/* Tooltip content */
.ob-title {
    font-family: var(--font-heading, 'Fraunces', serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: #D4A843;
    margin: 0 0 6px 0;
}
.ob-text {
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.55;
    margin: 0 0 16px 0;
}

/* Footer: progress + buttons */
.ob-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Progress dots */
.ob-progress {
    display: flex;
    gap: 5px;
    align-items: center;
}
.ob-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #444;
    transition: background 0.2s, transform 0.2s;
}
.ob-dot.active {
    background: #D4A843;
    transform: scale(1.3);
}
.ob-dot.done {
    background: #8a7a3a;
}

/* Buttons */
.ob-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.ob-skip {
    background: none;
    border: none;
    color: #666;
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
.ob-skip:hover { color: #999; }

.ob-next {
    background: #D4A843;
    color: #111;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
    transition: background 0.2s, transform 0.1s;
}
.ob-next:hover { background: #e0b84d; }
.ob-next:active { transform: scale(0.97); }

/* Transition screen between pages */
.ob-transition {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ob-transition.active {
    opacity: 1;
    pointer-events: auto;
}
.ob-transition-text {
    font-family: var(--font-heading, 'Fraunces', serif);
    font-size: 1.2rem;
    color: #D4A843;
    margin-bottom: 20px;
    max-width: 340px;
    line-height: 1.5;
}
.ob-transition-btn {
    background: #D4A843;
    color: #111;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ob-transition-btn:hover { background: #e0b84d; }

/* Mobile adjustments */
@media (max-width: 768px) {
    .ob-tooltip {
        max-width: 280px;
        padding: 16px;
    }
    .ob-title { font-size: 0.95rem; }
    .ob-text { font-size: 0.8rem; }
    .ob-next { min-height: 44px; padding: 10px 20px; }
    .ob-skip { min-height: 44px; padding: 10px 8px; }
}
