/* ================================================================
   GestMais — Guided Tour
   ================================================================ */

/* ── Overlay ── */
.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    pointer-events: all;
    transition: opacity .35s ease;
}
.tour-overlay.hidden { opacity: 0; pointer-events: none; }

/* ── Spotlight ring (box-shadow creates the dim hole) ── */
.tour-spotlight {
    position: fixed;
    border-radius: 12px;
    z-index: 99995;
    pointer-events: none;
    transition: all .45s cubic-bezier(.4,0,.2,1);
    box-shadow:
        0 0 0 4px rgba(74,222,128,.9),
        0 0 0 8px rgba(74,222,128,.35),
        0 0 30px rgba(74,222,128,.4),
        0 0 0 9999px rgba(0,0,0,.72);
    animation: tourPulse 2s ease-in-out infinite;
}
@keyframes tourPulse {
    0%,100% {
        box-shadow:
            0 0 0 4px rgba(74,222,128,.9),
            0 0 0 8px rgba(74,222,128,.35),
            0 0 30px rgba(74,222,128,.4),
            0 0 0 9999px rgba(0,0,0,.72);
    }
    50% {
        box-shadow:
            0 0 0 5px rgba(74,222,128,1),
            0 0 0 14px rgba(74,222,128,.2),
            0 0 50px rgba(74,222,128,.6),
            0 0 0 9999px rgba(0,0,0,.72);
    }
}

/* ── Tooltip ── */
.tour-tooltip {
    position: fixed;
    z-index: 99999;
    background: #0d1f12;
    border: 1px solid rgba(74,222,128,.35);
    border-radius: 18px;
    padding: 22px 22px 18px;
    max-width: 300px;
    min-width: 240px;
    box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(74,222,128,.1);
    font-family: 'Outfit', sans-serif;
    animation: tourFadeUp .3s cubic-bezier(.4,0,.2,1) both;
    pointer-events: all;
}
@keyframes tourFadeUp {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to   { opacity: 1; transform: none; }
}

/* Arrow */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    background: #0d1f12;
    border: 1px solid rgba(74,222,128,.35);
    transform: rotate(45deg);
}
.tour-tooltip.arrow-top::before    { top: -7px; left: 24px; border-bottom: none; border-right: none; }
.tour-tooltip.arrow-bottom::before { bottom: -7px; left: 24px; border-top: none; border-left: none; }
.tour-tooltip.arrow-left::before   { left: -7px; top: 22px; border-right: none; border-bottom: none; }
.tour-tooltip.arrow-right::before  { right: -7px; top: 22px; border-left: none; border-top: none; }

/* Step counter */
.tour-step-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}
.tour-step-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(74,222,128,.25);
    transition: all .25s;
    flex-shrink: 0;
}
.tour-step-dot.active { background: #4ade80; width: 18px; border-radius: 3px; }
.tour-step-label {
    font-size: 11px;
    font-weight: 700;
    color: #4ade80;
    letter-spacing: .6px;
    text-transform: uppercase;
    margin-left: auto;
}

/* Content */
.tour-title {
    font-size: 15px;
    font-weight: 800;
    color: #f0fdf4;
    margin-bottom: 7px;
    letter-spacing: -.2px;
}
.tour-text {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.65;
    margin-bottom: 18px;
}

/* Buttons */
.tour-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tour-btn-skip {
    font-size: 12px;
    color: #4b5563;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color .2s;
}
.tour-btn-skip:hover { color: #9ca3af; }

.tour-btn-next {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: #060f09;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    box-shadow: 0 4px 16px rgba(74,222,128,.3);
}
.tour-btn-next:hover  { opacity: .9; }
.tour-btn-next:active { transform: scale(.96); }
.tour-btn-next.finish {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 4px 16px rgba(59,130,246,.3);
}

/* ── Floating step badge (top-right) ── */
.tour-badge {
    position: fixed;
    top: 16px; right: 16px;
    z-index: 100000;
    background: #0d1f12;
    border: 1px solid rgba(74,222,128,.3);
    border-radius: 99px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #4ade80;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    animation: tourFadeUp .3s ease both;
    pointer-events: none;
}
.tour-badge i { font-size: 13px; }

/* ── Mobile (≤ 768px) — tooltip como card fixo acima do rodapé ── */
@media (max-width: 768px) {
    /* Tooltip: full-width, ancorado acima do bottom-nav */
    .tour-tooltip {
        max-width: none;
        min-width: 0;
        border-radius: 14px;
        padding: 16px 16px 14px;
        /* JS define bottom/left/right; garante que não sai dos limites */
        bottom: 70px !important;
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        width: auto !important;
    }

    /* Seta não faz sentido com tooltip fixo em baixo */
    .tour-tooltip::before { display: none !important; }

    /* Texto um pouco menor para caber melhor */
    .tour-text { font-size: 12px; margin-bottom: 14px; }

    /* Badge: descer para abaixo do header (56px) */
    .tour-badge {
        top: 62px;
        right: 10px;
        font-size: 11px;
        padding: 5px 10px;
    }

    /* Step dots: reduzir número visível se houver muitos */
    .tour-step-dot { width: 5px; height: 5px; }
    .tour-step-dot.active { width: 14px; }
}
