/* ========== Product Tour ========== */

/* Full-screen overlay with semi-transparent backdrop */
.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* Invisible click layer to dismiss tour */
.tour-backdrop-click {
    position: fixed;
    inset: 0;
    z-index: 59;
}

/* Spotlight — box-shadow creates the darkened overlay with a natural "hole" */
.tour-spotlight {
    position: fixed;
    z-index: var(--z-modal);
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45),
                0 0 0 4px rgba(7, 52, 47, 0.25);
    pointer-events: none;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltip card — flat card style (Kosh design system) */
.tour-tooltip {
    position: fixed;
    z-index: 61;
    max-width: 340px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0;
    overflow: hidden;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
}

/* Teal header stripe */
.tour-tooltip-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tour-tooltip-header h3 {
    color: var(--color-text-inverse);
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.tour-tooltip-header .tour-step-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-text-inverse);
    font-size: 13px;
    font-weight: 700;
}

/* Tooltip body */
.tour-tooltip-body {
    padding: var(--spacing-md) 20px 20px;
}
.tour-tooltip-body p {
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    margin: 0 0 var(--spacing-md);
}

/* Footer: step counter + buttons */
.tour-tooltip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}
.tour-step-counter {
    font-size: var(--text-xs);
    color: var(--color-text-light);
    font-weight: 500;
    white-space: nowrap;
}

.tour-tooltip-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tour buttons */
.tour-btn-skip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--transition-base);
}
.tour-btn-skip:hover { color: var(--color-primary); }

.tour-btn-prev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
    background: rgba(223, 237, 238, 0.5);
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
}
.tour-btn-prev:hover { background: rgba(223, 237, 238, 0.8); }

.tour-btn-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-inverse);
    background: var(--color-accent);
    border: none;
    cursor: pointer;
    transition: background var(--transition-base), box-shadow var(--transition-base);
}
.tour-btn-next:hover {
    background: var(--color-accent-dark);
    box-shadow: 0 2px 8px rgba(249, 172, 0, 0.35);
}

/* Arrow indicators — CSS triangles */
.tour-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--color-bg-card);
    transform: rotate(45deg);
    border: 1px solid var(--color-border);
}

/* Arrow top: tooltip is below target — arrow points up */
.tour-arrow-top .tour-arrow {
    top: -6px;
    left: 50%;
    margin-left: -6px;
    border-bottom: none;
    border-right: none;
}

/* Arrow bottom: tooltip is above target — arrow points down */
.tour-arrow-bottom .tour-arrow {
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    border-top: none;
    border-left: none;
}

/* Arrow left: tooltip is to the right — arrow points left */
.tour-arrow-left .tour-arrow {
    left: -6px;
    top: 50%;
    margin-top: -6px;
    border-top: none;
    border-right: none;
}

/* Arrow right: tooltip is to the left — arrow points right */
.tour-arrow-right .tour-arrow {
    right: -6px;
    top: 50%;
    margin-top: -6px;
    border-bottom: none;
    border-left: none;
}

/* Progress dots */
.tour-progress {
    display: flex;
    align-items: center;
    gap: 5px;
}
.tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-sage-dark);
    transition: background var(--transition-base), transform var(--transition-base);
}
.tour-dot.active {
    background: var(--color-primary);
    transform: scale(1.3);
}
.tour-dot.done {
    background: var(--color-status-green);
}
