/* ─── Contextual Hint Tooltips ─────────────────────────────────
 *
 * One-shot hints for new users, shown the first time they land on a
 * surface or perform an action. Dismissed forever per hint, stored in
 * user-profile-store (localStorage + Supabase).
 *
 * Reuses the amber accent the demo guidance layer uses, so the visual
 * vocabulary is consistent: yellow/black bubble points at one thing.
 * Unlike the demo tour, hints never dim, never chain, and never block
 * interaction outside the bubble itself.
 */

#hintsRoot {
    --hint-accent: #F59E0B;
    --hint-accent-strong: #D97706;
    --hint-accent-soft: rgba(245, 158, 11, 0.18);
    --hint-accent-glow: rgba(245, 158, 11, 0.55);
    --hint-on-accent: #1E2030;
}

.hint-cutout {
    position: fixed;
    z-index: 9550;
    border-radius: 10px;
    pointer-events: none;
    box-shadow:
        0 0 0 4px var(--hint-accent-soft),
        0 0 24px 6px var(--hint-accent-glow);
    transition: top 220ms ease, left 220ms ease, width 220ms ease, height 220ms ease;
    outline: 3px solid var(--hint-accent);
    outline-offset: 4px;
    animation: hintCutoutPulse 1800ms ease-in-out 400ms infinite;
}

@keyframes hintCutoutPulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px var(--hint-accent-soft),
            0 0 24px 6px var(--hint-accent-glow);
    }
    50% {
        box-shadow:
            0 0 0 10px rgba(245, 158, 11, 0.08),
            0 0 40px 10px var(--hint-accent-glow);
    }
}

.hint-callout {
    position: fixed;
    z-index: 9600;
    width: 340px;
    max-width: calc(100vw - 2rem);
    background: var(--bg-surface, #ffffff);
    color: var(--charcoal, #1E2030);
    border: 2px solid var(--hint-accent);
    border-radius: 12px;
    box-shadow: 0 0 0 4px var(--hint-accent-soft),
                0 18px 50px rgba(0, 0, 0, 0.4),
                0 4px 12px rgba(0, 0, 0, 0.2);
    font-family: 'Open Sans', system-ui, sans-serif;
    overflow: hidden;
    animation: hintCalloutFade 200ms ease-out;
}

@keyframes hintCalloutFade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hint-callout.centered {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hint-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.95rem;
    background: var(--hint-accent);
    border-bottom: 1px solid var(--hint-accent-strong);
}

.hint-title {
    flex: 1;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--hint-on-accent);
    line-height: 1.2;
}

.hint-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 6px;
    color: var(--hint-on-accent);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 120ms ease;
}

.hint-close-btn:hover,
.hint-close-btn:focus {
    background: rgba(255, 255, 255, 0.65);
    outline: none;
}

.hint-body {
    padding: 0.85rem 0.95rem 0.95rem;
}

.hint-copy {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--charcoal, #1E2030);
}

.hint-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.95rem;
}

.hint-btn {
    padding: 0.5rem 0.95rem;
    background: var(--hint-accent);
    color: var(--hint-on-accent);
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
    transition: filter 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}

.hint-btn:hover,
.hint-btn:focus {
    filter: brightness(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.55);
    outline: none;
}

.hint-btn:active {
    transform: translateY(1px);
}

.hint-btn.secondary {
    background: transparent;
    color: var(--charcoal, #1E2030);
    border: 1px solid var(--border-medium, rgba(0, 0, 0, 0.18));
    box-shadow: none;
}

.hint-btn.secondary:hover,
.hint-btn.secondary:focus {
    background: var(--hint-accent-soft);
    border-color: var(--hint-accent);
    box-shadow: none;
}

.hint-footer {
    padding: 0.6rem 0.95rem 0.75rem;
    text-align: center;
    border-top: 1px solid var(--border-light, rgba(0, 0, 0, 0.08));
}

.hint-mute-link {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 0.72rem;
    color: var(--slate, #6B7280);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 120ms ease;
}

.hint-mute-link:hover,
.hint-mute-link:focus {
    color: var(--charcoal, #1E2030);
    outline: none;
}

@media (max-width: 600px) {
    .hint-callout {
        width: calc(100vw - 1.5rem);
        max-width: none;
    }
}
