/* ==========================================
   Guided Walkthrough Overlay
   ========================================== */

.walkthrough-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.walkthrough-overlay.hidden {
    display: none;
}

/* Dark backdrop with a "hole" cut out via box-shadow */
.walkthrough-spotlight {
    position: fixed;
    z-index: 100001;
    border-radius: 8px;
    transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
    pointer-events: none;
}

/* Tooltip / step card */
.walkthrough-tooltip {
    position: fixed;
    z-index: 100002;
    background: var(--bg-primary, #1e1e2e);
    border: 1px solid var(--border-color, #3a3a4a);
    border-radius: 12px;
    padding: 20px 24px 16px;
    max-width: 360px;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    transition: top 0.35s ease, left 0.35s ease, opacity 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.walkthrough-tooltip-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.walkthrough-tooltip-title .wt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(118, 169, 250, 0.15);
    flex-shrink: 0;
}

.walkthrough-tooltip-title .wt-icon svg {
    width: 16px;
    height: 16px;
    fill: #76A9FA;
}

.walkthrough-tooltip-body {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary, #a0a0b0);
    margin: 0 0 16px 0;
}

.walkthrough-tooltip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.walkthrough-steps-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

.walkthrough-step-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-color, #3a3a4a);
    transition: background 0.2s ease;
}

.walkthrough-step-dot.active {
    background: #76A9FA;
}

.walkthrough-step-dot.done {
    background: rgba(118, 169, 250, 0.45);
}

.walkthrough-tooltip-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.walkthrough-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.walkthrough-btn-skip {
    background: transparent;
    color: var(--text-secondary, #a0a0b0);
}

.walkthrough-btn-skip:hover {
    color: var(--text-primary, #e0e0e0);
}

.walkthrough-btn-prev {
    background: var(--bg-secondary, #2a2a3a);
    color: var(--text-primary, #e0e0e0);
    border: 1px solid var(--border-color, #3a3a4a);
}

.walkthrough-btn-prev:hover {
    background: var(--bg-tertiary, #333346);
}

.walkthrough-btn-next {
    background: #76A9FA;
    color: #0f172a;
}

.walkthrough-btn-next:hover {
    background: #93bbfc;
}

/* Arrow pointer from tooltip to spotlight */
.walkthrough-tooltip-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--bg-primary, #1e1e2e);
    border: 1px solid var(--border-color, #3a3a4a);
    transform: rotate(45deg);
    z-index: -1;
}

.walkthrough-tooltip[data-arrow="top"] .walkthrough-tooltip-arrow {
    top: -7px;
    left: 30px;
    border-bottom: none;
    border-right: none;
}

.walkthrough-tooltip[data-arrow="bottom"] .walkthrough-tooltip-arrow {
    bottom: -7px;
    left: 30px;
    border-top: none;
    border-left: none;
}

.walkthrough-tooltip[data-arrow="left"] .walkthrough-tooltip-arrow {
    left: -7px;
    top: 20px;
    border-top: none;
    border-right: none;
}

.walkthrough-tooltip[data-arrow="right"] .walkthrough-tooltip-arrow {
    right: -7px;
    top: 20px;
    border-bottom: none;
    border-left: none;
}

/* Animate in */
.walkthrough-tooltip.wt-entering {
    opacity: 0;
    transform: translateY(6px);
}

/* Click blocker behind tooltip */
.walkthrough-click-blocker {
    position: fixed;
    inset: 0;
    z-index: 100001;
    pointer-events: auto;
    cursor: default;
}

/* Pulse ring on spotlight */
@keyframes wt-pulse {
    0% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 0 rgba(118, 169, 250, 0.4); }
    70% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 8px rgba(118, 169, 250, 0); }
    100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 0 rgba(118, 169, 250, 0); }
}

.walkthrough-spotlight.wt-pulse {
    animation: wt-pulse 2s ease-in-out infinite;
}

/* Welcome step (centered, no spotlight) */
.walkthrough-tooltip.wt-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.walkthrough-tooltip.wt-centered .walkthrough-tooltip-arrow {
    display: none;
}
