/* ═══════════════════════════════════════════════
   Guided Tour -- overlay, spotlight, tooltip
   ═══════════════════════════════════════════════ */

/* Spotlight: positioned over target with massive box-shadow to dim the rest */
.tour-spotlight {
    position: absolute;
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.50);
    z-index: 10000;
    pointer-events: none;
    transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}

/* Clickable overlay behind the spotlight to catch dismiss clicks */
.tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
}

/* ─── Tooltip ─── */
.tour-tooltip {
    position: absolute;
    z-index: 10001;
    background: #fff;
    border-radius: 10px;
    padding: 0;
    max-width: 360px;
    min-width: 260px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    animation: tourFadeIn 0.22s ease;
    font-size: 0.9rem;
}

.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 0 16px;
}

.tour-step-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6c757d;
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 12px;
}

.tour-close-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
}

.tour-close-btn:hover {
    color: #333;
}

.tour-tooltip-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 10px 16px 4px 16px;
    color: #212529;
}

.tour-tooltip-body {
    font-size: 0.84rem;
    color: #555;
    margin: 0 16px 12px 16px;
    line-height: 1.5;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 12px 16px;
    border-top: 1px solid #f0f0f0;
}

/* ─── Arrow ─── */
.tour-tooltip-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

/* Arrow placement variants */
.tour-tooltip.placement-bottom .tour-tooltip-arrow {
    top: -7px;
    left: 50%;
    margin-left: -7px;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

.tour-tooltip.placement-top .tour-tooltip-arrow {
    bottom: -7px;
    left: 50%;
    margin-left: -7px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.04);
}

.tour-tooltip.placement-left .tour-tooltip-arrow {
    right: -7px;
    top: 50%;
    margin-top: -7px;
    box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.04);
}

.tour-tooltip.placement-right .tour-tooltip-arrow {
    left: -7px;
    top: 50%;
    margin-top: -7px;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.04);
}

/* ─── Tour start button (used in page headers) ─── */
.tour-start-btn {
    font-size: 0.78rem;
    padding: 2px 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0dcaf0 0%, #6f42c1 100%);
    color: #fff;
    border: none;
    box-shadow: 0 0 0 0 rgba(13, 202, 240, 0.5);
    animation: tourBtnEntrance 0.5s ease-out, tourBtnPulse 2s ease-in-out 0.5s 3;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.tour-start-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 0 12px rgba(13, 202, 240, 0.45);
    color: #fff;
    background: linear-gradient(135deg, #0bb5d8 0%, #5a32a3 100%);
}

.tour-start-btn:active {
    transform: scale(0.97);
}

@keyframes tourBtnEntrance {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tourBtnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(13, 202, 240, 0.45);
    }
    50% {
        box-shadow: 0 0 10px 4px rgba(13, 202, 240, 0.3);
    }
}

/* ─── Animations ─── */
@keyframes tourFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
