/* ============================================================
   Policy Tour — Walkthrough overlay styles
   Adapted from APP-FinanceSystem ProjectionTour
   ============================================================ */

/* Full-screen backdrop */
.tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    transition: opacity 0.3s ease;
    opacity: 0;
}
.tour-backdrop.active {
    opacity: 1;
}

/* Spotlight cutout — fixed to viewport, positioned over target */
.tour-spotlight {
    position: fixed;
    z-index: 9999;
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Tooltip card — fixed to viewport */
.tour-tooltip {
    position: fixed;
    z-index: 10000;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    padding: 20px 24px 16px;
    max-width: 400px;
    min-width: 280px;
    animation: tourFadeIn 0.25s ease;
}
@keyframes tourFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tour-tooltip-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 6px;
}

.tour-tooltip-body {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Arrow */
.tour-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06);
}
.tour-arrow.arrow-top {
    top: -7px;
    left: 50%;
    margin-left: -7px;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06);
}
.tour-arrow.arrow-bottom {
    bottom: -7px;
    left: 50%;
    margin-left: -7px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.06);
}
.tour-arrow.arrow-left {
    left: -7px;
    top: 50%;
    margin-top: -7px;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.06);
}
.tour-arrow.arrow-right {
    right: -7px;
    top: 50%;
    margin-top: -7px;
    box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.06);
}

/* Footer: nav buttons + step indicator */
.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tour-nav {
    display: flex;
    gap: 6px;
}

.tour-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tour-btn-primary {
    background: #0d6efd;
    color: #fff;
}
.tour-btn-primary:hover {
    background: #0b5ed7;
}
.tour-btn-secondary {
    background: #e9ecef;
    color: #495057;
}
.tour-btn-secondary:hover {
    background: #dee2e6;
}
.tour-btn-skip {
    background: transparent;
    color: #6c757d;
    padding: 6px 10px;
}
.tour-btn-skip:hover {
    color: #495057;
    text-decoration: underline;
}

/* Step dots */
.tour-step-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
}
.tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #dee2e6;
    transition: background 0.2s;
}
.tour-dot.active {
    background: #0d6efd;
    width: 9px;
    height: 9px;
}
.tour-dot.completed {
    background: #6c757d;
}

/* Welcome / Done / Centered modal style */
.tour-tooltip.tour-centered {
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    text-align: center;
    animation: tourModalIn 0.3s ease;
}
@keyframes tourModalIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%); }
}
.tour-centered .tour-footer {
    justify-content: center;
}
.tour-centered .tour-tooltip-title {
    font-size: 1.15rem;
}

.tour-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #0d6efd;
}

/* Search examples inline callout */
.tour-examples {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0 4px;
}
.tour-example-chip {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== Help Button (inline next to title) ===== */
.tour-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    margin-left: 10px;
}
.tour-help-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}
.tour-help-btn i {
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 576px) {
    .tour-tooltip {
        max-width: 300px;
        min-width: 240px;
        padding: 16px 18px 12px;
    }
    .tour-tooltip.tour-centered {
        max-width: 320px;
    }
    .tour-tooltip-body {
        font-size: 0.8125rem;
    }
    .tour-help-btn {
        padding: 3px 10px;
        font-size: 0.75rem;
    }
}
