/* =========================================================
   onboarding tour
   spotlight: lavender-tinted dim cutout (gentler than black)
   tooltip  : white kawaii card with spring-in
   ========================================================= */

/* ----- spotlight ----- */

.tour-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: var(--radius-lg);
    z-index: 9000;
    pointer-events: none;
    /* lavender-tinted dim, softer than pure black */
    box-shadow: 0 0 0 9999px rgba(45, 34, 54, 0.62);
    transition:
        top    320ms var(--smooth),
        left   320ms var(--smooth),
        width  320ms var(--smooth),
        height 320ms var(--smooth),
        border-radius 320ms var(--smooth);
    animation: tour-spotlight-in 400ms var(--smooth) both;
}

@keyframes tour-spotlight-in {
    from { box-shadow: 0 0 0 9999px rgba(45, 34, 54, 0); }
    to   { box-shadow: 0 0 0 9999px rgba(45, 34, 54, 0.62); }
}

/* ----- tooltip card ----- */

.tour-tooltip {
    position: fixed;
    z-index: 9100;
    width: 320px;
    max-width: calc(100vw - 2rem);
    background: var(--bg-secondary);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-xl), var(--inset-highlight);
    animation: tour-tooltip-in 320ms var(--spring) both;
}

.tour-tooltip.tour-tooltip-reposition {
    animation: tour-tooltip-in 220ms var(--spring) both;
}

@keyframes tour-tooltip-in {
    from { opacity: 0; transform: translateY(12px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ----- inner layout ----- */

.tour-tooltip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tour-tooltip-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    flex: 1;
}

.tour-step-counter {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--mint-300), var(--mint-500));
    color: var(--text-on-primary);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    box-shadow: var(--shadow-sm), var(--inset-highlight);
}

.tour-tooltip-body {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.1rem;
    font-weight: 500;
}

.tour-tooltip-body strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* ----- actions ----- */

.tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tour-btn-skip {
    background: transparent;
    border: 1.5px solid var(--border-medium);
    color: var(--text-tertiary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition:
        color var(--transition-fast) var(--smooth),
        border-color var(--transition-fast) var(--smooth),
        background var(--transition-fast) var(--smooth);
}

.tour-btn-skip:hover {
    color: var(--text-primary);
    border-color: var(--border-dark);
    background: var(--cream-100);
}

.tour-btn-next {
    background: linear-gradient(180deg, var(--peach-400), var(--peach-500));
    border: none;
    color: var(--text-on-primary);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition:
        transform var(--transition-fast) var(--spring),
        box-shadow var(--transition-normal) var(--smooth);
    box-shadow: var(--shadow-md), var(--inset-highlight);
}

.tour-btn-next:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: var(--shadow-lg), var(--inset-highlight), var(--glow-peach);
}

.tour-btn-next:active {
    transform: translateY(0) scale(0.97);
}

/* ----- progress dots ----- */

.tour-progress-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cream-300);
    transition:
        background var(--transition-normal) var(--smooth),
        transform var(--transition-normal) var(--spring),
        width var(--transition-normal) var(--smooth);
}

.tour-dot.active {
    background: var(--peach-500);
    transform: scale(1);
    width: 16px;
    border-radius: var(--radius-full);
}

/* ----- arrow (points at the spotlighted element) ----- */

.tour-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.tour-arrow.arrow-top {
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: rgba(255, 255, 255, 0.9);
}

.tour-arrow.arrow-top::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-bottom-color: var(--bg-secondary);
    top: -5px;
    left: -7px;
}

.tour-arrow.arrow-bottom {
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: rgba(255, 255, 255, 0.9);
}

.tour-arrow.arrow-bottom::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-top-color: var(--bg-secondary);
    bottom: -5px;
    left: -7px;
}

/* ----- mobile ----- */

@media (max-width: 600px) {
    .tour-tooltip {
        width: calc(100vw - 2rem);
        left: 1rem !important;
        right: 1rem;
        max-width: none;
    }
}
