.tour-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 9998;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tour-tooltip {
    position: absolute;
    z-index: 10001;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 1.25rem;
    max-width: 300px;
    min-width: 240px;
    font-family: inherit;
}

.tour-tooltip[hidden] { display: none; }

.tour-tooltip--centered {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 380px;
}

.tour-tooltip--centered .tour-arrow { display: none; }

/* Popper arrow */
.tour-arrow,
.tour-arrow::before {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
}

.tour-arrow { visibility: hidden; }

.tour-arrow::before {
    visibility: visible;
    content: '';
    transform: rotate(45deg);
    box-shadow: -1px -1px 4px rgba(0, 0, 0, 0.08);
}

.tour-tooltip[data-popper-placement^='top']    > .tour-arrow { bottom: -5px; }
.tour-tooltip[data-popper-placement^='bottom'] > .tour-arrow { top: -5px;    }
.tour-tooltip[data-popper-placement^='left']   > .tour-arrow { right: -5px;  }
.tour-tooltip[data-popper-placement^='right']  > .tour-arrow { left: -5px;   }

.tour-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}

.tour-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.tour-skip {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: #9ca3af;
    padding: 0 0.125rem;
    flex-shrink: 0;
    transition: color 0.15s;
}

.tour-skip:hover { color: #374151; }

.tour-body {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.55;
    margin: 0 0 1rem;
}

.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tour-progress {
    font-size: 0.75rem;
    color: #d1d5db;
    font-weight: 500;
}

.tour-actions { display: flex; gap: 0.375rem; }

.tour-btn {
    border: none;
    border-radius: 7px;
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.tour-btn--primary   { background: #3b82f6; color: #fff; }
.tour-btn--primary:hover  { background: #2563eb; }
.tour-btn--secondary { background: #f1f5f9; color: #475569; }
.tour-btn--secondary:hover { background: #e2e8f0; }

/* Highlighted target — just elevated above the blur, no decoration */
[data-tour-active] {
    position: relative;
    z-index: 10000;
    pointer-events: none;
}

/* Elevate fixed/sticky ancestors (e.g. sidebar) above the overlay */
[data-tour-elevated] { z-index: 9999 !important; }

/* Replay trigger button — sits above the Quick Action button (56px tall + 8px gap + 30px offset) */
#tour-trigger-btn {
    position: fixed;
    bottom: 94px;
    right: 30px;
    z-index: 9997;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-violet-600);
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.35), 0 4px 6px -2px rgba(124, 58, 237, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

#tour-trigger-btn:hover {
    background: var(--color-violet-700);
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.5), 0 4px 6px -2px rgba(124, 58, 237, 0.3);
}

#tour-trigger-btn::before {
    content: 'Not sure what to do? Click here for a step-by-step guide.';
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    width: 170px;
    text-align: center;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10002;
}

#tour-trigger-btn::after {
    content: '';
    position: absolute;
    right: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #1e293b;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10002;
}

#tour-trigger-btn:hover::before,
#tour-trigger-btn:hover::after {
    opacity: 1;
}
