/*
 * Pretty Links onboarding wizard styles.
 *
 * Scoped under `.prli-onboarding-wrap`. Server-rendered wizard — no React —
 * so these styles carry the full design system weight on their own.
 */

.prli-onboarding-wrap {
    max-width: 760px;
    margin: 24px auto;
    padding: 0 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #0f172a;
}

/* Page background — softer off-white. */
body.toplevel_page_pretty-link-onboarding #wpcontent,
body.admin_page_pretty-link-onboarding #wpcontent {
    background: #f6f8fb;
}

.prli-onboarding-header {
    text-align: center;
    margin: 24px 0 32px;
}

.prli-onboarding-logo {
    max-height: 56px;
    width: auto;
}

/* Progress indicator — proper connected progress bar, not tiled cards. */
.prli-onboarding-steps {
    list-style: none;
    margin: 0 auto 40px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    position: relative;
    max-width: 680px;
}

.prli-onboarding-steps::before {
    content: "";
    position: absolute;
    top: 16px;
    left: calc(100% / 12);
    right: calc(100% / 12);
    height: 2px;
    background: #e3e8ee;
    border-radius: 999px;
    z-index: 0;
}

.prli-onboarding-step-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    color: #6b7684;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    font-weight: 500;
}

.prli-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    color: #9aa6b2;
    font-weight: 600;
    font-size: 13px;
    border: 2px solid #e3e8ee;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.prli-onboarding-step-item.is-current .prli-step-num {
    background: #01aae9;
    color: #ffffff;
    border-color: #01aae9;
    box-shadow: 0 0 0 6px rgba(1, 170, 233, 0.14),
        0 2px 6px rgba(1, 170, 233, 0.3);
    transform: scale(1.05);
}

.prli-onboarding-step-item.is-current {
    color: #091d2e;
    font-weight: 600;
}

.prli-onboarding-step-item.is-complete .prli-step-num {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.prli-onboarding-step-item.is-complete .prli-step-num::before {
    content: "";
    width: 13px;
    height: 13px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
.prli-onboarding-step-item.is-complete .prli-step-num {
    font-size: 0;
}

.prli-onboarding-step-item.is-complete {
    color: #047857;
}

.prli-step-label {
    display: block;
    padding: 0 4px;
}

.prli-onboarding-step-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 6px;
    margin: -4px -6px;
    transition: background-color 120ms ease;
}

.prli-onboarding-step-link:hover,
.prli-onboarding-step-link:focus {
    background: rgba(1, 170, 233, 0.08);
    color: inherit;
    outline: none;
    box-shadow: none;
}

.prli-onboarding-step-link:hover .prli-step-num,
.prli-onboarding-step-link:focus .prli-step-num {
    border-color: #01aae9;
}

/* Main step card. */
.prli-onboarding-step {
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 4px 8px -2px rgba(15, 23, 42, 0.08),
        0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

.prli-onboarding-step h1 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    color: #091d2e;
    letter-spacing: -0.01em;
}

.prli-onboarding-step p {
    font-size: 15px;
    line-height: 1.6;
    color: #34404d;
    margin: 0 0 16px;
}

.prli-onboarding-step .description {
    color: #6b7684;
    font-size: 14px;
}

.prli-onboarding-form p {
    margin: 0 0 20px;
}

.prli-onboarding-form p label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: #091d2e;
}

.prli-onboarding-form input[type="text"],
.prli-onboarding-form input[type="email"],
.prli-onboarding-form input[type="url"],
.prli-onboarding-form select {
    width: 100%;
    max-width: 440px;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #cfd6de;
    border-radius: 6px;
    box-shadow: none;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 120ms, box-shadow 120ms;
}

.prli-onboarding-form input[type="text"]:focus,
.prli-onboarding-form input[type="email"]:focus,
.prli-onboarding-form input[type="url"]:focus,
.prli-onboarding-form select:focus {
    outline: none;
    border-color: #01aae9;
    box-shadow: 0 0 0 3px rgba(1, 170, 233, 0.18);
}

.prli-onboarding-existing code {
    padding: 6px 10px;
    background: #e6f7fd;
    border: 1px solid #c2ecfb;
    border-radius: 4px;
    font-size: 13px;
    color: #036a96;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
}

.prli-onboarding-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eef1f5;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
}

.prli-onboarding-footer .button,
.prli-onboarding-actions-inline .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    line-height: 1.2;
    box-shadow: none;
    text-shadow: none;
}

.prli-onboarding-footer .button-primary,
.prli-onboarding-actions-inline .button-primary {
    background: #01aae9;
    border-color: #01aae9;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(13, 69, 156, 0.2);
}

.prli-onboarding-footer .button-primary:hover,
.prli-onboarding-actions-inline .button-primary:hover {
    background: #0189c0;
    border-color: #0189c0;
}

.prli-onboarding-footer .button-primary:focus,
.prli-onboarding-actions-inline .button-primary:focus {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(1, 170, 233, 0.35);
}

.prli-onboarding-footer .button-secondary,
.prli-onboarding-actions-inline .button-secondary {
    background: #ffffff;
    border-color: #cfd6de;
    color: #091d2e;
}

.prli-onboarding-footer .button-secondary:hover,
.prli-onboarding-actions-inline .button-secondary:hover {
    background: #f5f7fa;
    border-color: #9aa6b2;
    color: #091d2e;
}

.prli-onboarding-footer .prli-onboarding-back,
.prli-onboarding-actions-inline .prli-onboarding-back {
    color: #6b7684;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    min-height: 38px;
    padding: 0 8px;
    margin-left: auto;
    order: 99;
}

.prli-onboarding-footer .prli-onboarding-back:hover,
.prli-onboarding-actions-inline .prli-onboarding-back:hover {
    color: #01aae9;
}

.prli-onboarding-actions-inline {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.prli-onboarding-next {
    margin: 20px 0 28px;
    padding: 0;
    list-style: none;
    color: #34404d;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prli-onboarding-next li {
    position: relative;
    padding: 10px 14px 10px 38px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.55;
}

.prli-onboarding-next li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #01aae9;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.prli-onboarding-status {
    padding: 14px 18px 14px 46px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.prli-onboarding-status.is-active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #d1fae5;
}

.prli-onboarding-status.is-active::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #10b981;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 14px 14px;
    background-repeat: no-repeat;
    background-position: center;
}

.prli-onboarding-status.is-error {
    padding-left: 18px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.prli-onboarding-status.is-info {
    padding-left: 18px;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.prli-onboarding-paylinks-fee {
    margin: 16px 0 20px;
}

.prli-onboarding-paylinks-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    margin: 12px 0 0;
}

.prli-onboarding-welcome {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.prli-onboarding-welcome h1 {
    font-size: 28px;
    margin: 0 0 16px;
}

.prli-onboarding-intro {
    font-size: 15px;
    color: #475569;
    max-width: 560px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

.prli-onboarding-get-started {
    margin-top: 28px;
}

.prli-onboarding-subhead {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 24px 0 12px;
}

.prli-onboarding-features {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: grid;
    gap: 12px;
}

.prli-onboarding-feature {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    background: #fff;
    transition: border-color 120ms ease;
}

.prli-onboarding-feature:hover {
    border-color: #cbd5e1;
}

.prli-onboarding-feature.is-disabled {
    opacity: 0.65;
}

.prli-onboarding-feature label {
    display: grid;
    grid-template-columns: 22px 1fr;
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
    cursor: pointer;
}

.prli-onboarding-feature.is-disabled label {
    cursor: not-allowed;
}

.prli-onboarding-feature input[type="checkbox"] {
    grid-column: 1;
    margin-top: 3px;
}

.prli-onboarding-feature-label {
    grid-column: 2;
    font-weight: 600;
    color: #0f172a;
}

.prli-onboarding-feature-desc {
    grid-column: 2;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.prli-onboarding-feature-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prli-onboarding-feature-badge.is-recommended {
    color: #047857;
    background: #d1fae5;
}

/* Pro add-on "Learn more" badge — clickable, deep-blue accent so it reads
 * as a link-out rather than a status tag. Matches the ProUpsell accent. */
a.prli-onboarding-feature-badge.prli-onboarding-feature-badge--pro {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #0d459c 100%);
    text-decoration: none;
}

a.prli-onboarding-feature-badge.prli-onboarding-feature-badge--pro:hover,
a.prli-onboarding-feature-badge.prli-onboarding-feature-badge--pro:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #0a3476 100%);
    color: #ffffff;
    text-decoration: none;
}

/* When the row is disabled (upsell-only), keep the Learn-more badge fully
 * clickable even though its parent <li> has the is-disabled style. */
.prli-onboarding-feature.is-disabled a.prli-onboarding-feature-badge--pro {
    pointer-events: auto;
    opacity: 1;
}

/* InfoTooltip — shared primitive used across the plugin. Keep this block
 * synced with the matching rules in `src-js/shared/styles/base.css`. */
.prli-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    vertical-align: middle;
    cursor: help;
    outline: none;
}

.prli-tooltip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-style: italic;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    transition: background-color 120ms ease, color 120ms ease;
}

.prli-tooltip:hover .prli-tooltip__icon,
.prli-tooltip:focus .prli-tooltip__icon,
.prli-tooltip:focus-visible .prli-tooltip__icon {
    background: #01aae9;
    color: #ffffff;
}

.prli-tooltip__bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    min-width: 220px;
    max-width: 320px;
    padding: 10px 14px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.3),
        0 4px 6px -2px rgba(15, 23, 42, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 120ms ease, visibility 120ms ease;
    white-space: normal;
    text-align: left;
}

.prli-tooltip__bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
}

.prli-tooltip:hover .prli-tooltip__bubble,
.prli-tooltip:focus .prli-tooltip__bubble,
.prli-tooltip:focus-within .prli-tooltip__bubble {
    opacity: 1;
    visibility: visible;
}

/* On narrow screens, anchor the tooltip to the right so it doesn't clip. */
@media (max-width: 520px) {
    .prli-tooltip__bubble {
        left: auto;
        right: 0;
        transform: none;
        min-width: 200px;
    }
    .prli-tooltip__bubble::after {
        left: auto;
        right: 6px;
        transform: none;
    }
}

.prli-onboarding-summary {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: grid;
    gap: 12px;
}

.prli-onboarding-summary li {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    background: #fff;
    line-height: 1.5;
    color: #475569;
}

.prli-onboarding-summary li strong {
    color: #0f172a;
}

.prli-onboarding-summary li code {
    font-size: 13px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.prli-onboarding-upsell {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 36px 32px;
    text-align: center;
    margin-bottom: 20px;
}

.prli-onboarding-upsell h2 {
    font-size: 22px;
    margin: 0 0 12px;
    color: #0f172a;
}

.prli-onboarding-upsell p {
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 12px;
}

.prli-onboarding-upsell-cta {
    margin-top: 20px;
}

@media (max-width: 600px) {
    .prli-onboarding-step {
        padding: 24px;
    }
    .prli-onboarding-steps {
        grid-template-columns: repeat(7, 1fr);
    }
    .prli-step-label {
        font-size: 10px;
    }
}

/* Finish-step upgrade CTA when the user queued Pro-gated items */
.prli-onboarding-upgrade-cta {
    margin: 0 0 28px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(13, 69, 156, 0.1));
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    text-align: center;
}

.prli-onboarding-upgrade-cta h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #0f172a;
}

.prli-onboarding-upgrade-cta p {
    margin: 0 auto 16px;
    max-width: 560px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

/* Resume-outcome banners above the summary */
.prli-onboarding-resume-result {
    padding: 14px 18px;
    margin: 0 0 20px;
    border-radius: 8px;
    font-size: 14px;
}
.prli-onboarding-resume-result.is-success {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #065f46;
}
.prli-onboarding-resume-result.is-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}
