/* ConvertyBot onboarding tour — v2.3.0 */

.cb-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 999000;
    pointer-events: auto;
    animation: cb-tour-fade 180ms ease-out;
}
.cb-tour-overlay .cb-tour-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
@keyframes cb-tour-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cb-tour-popover {
    position: fixed;
    z-index: 999001;
    width: 360px;
    max-width: calc(100vw - 40px);
    /* v2.3.0 — cap height so the popover never overflows the viewport when
       spotlighting targets near the bottom of a long page. Scroll internally
       if content doesn't fit. */
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35),
                0 0 0 1px rgba(15, 23, 42, 0.06);
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: cb-tour-pop 220ms cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
@keyframes cb-tour-pop {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cb-tour-popover__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.cb-tour-popover__progress {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.cb-tour-popover__close {
    appearance: none;
    background: transparent;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}
.cb-tour-popover__close:hover {
    background: #f3f4f6;
    color: #374151;
}

.cb-tour-popover__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}
.cb-tour-popover__body {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #4b5563;
}

.cb-tour-popover__actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}
.cb-tour-popover__btn {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
}
.cb-tour-popover__btn--ghost {
    background: transparent;
    color: #6b7280;
}
.cb-tour-popover__btn--ghost:hover {
    background: #f3f4f6;
    color: #374151;
}
.cb-tour-popover__btn--primary {
    background: #3b5bff;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(59, 91, 255, 0.3);
}
.cb-tour-popover__btn--primary:hover {
    background: #2843df;
    box-shadow: 0 4px 12px rgba(59, 91, 255, 0.4);
    transform: translateY(-1px);
}
.cb-tour-popover__btn--primary:active {
    transform: translateY(0);
}

/* Resume pill — appears when the tour is mid-flight and the merchant
   navigated elsewhere. Sits bottom-right. */
.cb-tour-resume-pill {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99899;
    appearance: none;
    border: 0;
    background: #3b5bff;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(59, 91, 255, 0.35);
    transition: all 0.2s ease;
    animation: cb-tour-pill-in 400ms cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
.cb-tour-resume-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(59, 91, 255, 0.45);
}
@keyframes cb-tour-pill-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    .cb-tour-overlay,
    .cb-tour-popover,
    .cb-tour-resume-pill {
        animation: none;
    }
    .cb-tour-popover__btn--primary:hover { transform: none; }
}

/* Dark-mode aware (WP admin doesn't have one by default, but we cover prefers-color-scheme). */
@media (prefers-color-scheme: dark) {
    .cb-tour-popover {
        background: #1f2937;
        color: #e5e7eb;
    }
    .cb-tour-popover__title { color: #f9fafb; }
    .cb-tour-popover__body { color: #d1d5db; }
    .cb-tour-popover__close:hover { background: #374151; color: #f9fafb; }
    .cb-tour-popover__btn--ghost:hover { background: #374151; color: #f9fafb; }
}
