/* =============================================================
   Onboarding modal — first-visit questionnaire + Pro trial card
   ============================================================= */

.ob-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 35, 45, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: obFadeIn 0.2s ease;
}

@keyframes obFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes obSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.ob-modal {
    background: var(--card-bg-solid, #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px -20px rgba(15, 35, 45, 0.55), 0 10px 25px -10px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: obSlideUp 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
}

.ob-modal--wide {
    max-width: 680px;
}

.ob-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(50, 98, 115, 0.08);
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}
.ob-close:hover {
    background: rgba(50, 98, 115, 0.16);
    color: var(--text-primary);
}

/* ── Progress bar ───────────────────────────── */
.ob-progress {
    height: 4px;
    background: var(--border-light);
    width: 100%;
    overflow: hidden;
}
.ob-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #f0b48f 100%);
    width: 0%;
    transition: width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── Body ─────────────────────────────────── */
.ob-body {
    padding: 40px 44px 32px;
    overflow-y: auto;
    flex: 1;
}

.ob-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.ob-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.25;
}

.ob-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 28px;
    line-height: 1.5;
}

/* ── Option cards (Q1 — identity) ───────────── */
.ob-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.ob-option {
    background: var(--card-bg-alt, #f8f9fa);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: inherit;
}
.ob-option:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-1px);
}
.ob-option.is-selected {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px var(--focus-ring);
}
.ob-option-emoji {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 6px;
}
.ob-option-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.ob-option-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* ── Market grid (Q2 — multi-select) ─────────── */
.ob-markets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.ob-market {
    background: var(--card-bg-alt, #f8f9fa);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    min-height: 44px;
}
.ob-market:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.ob-market.is-selected {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--focus-ring);
}
.ob-market-check {
    display: inline-flex;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 2px solid var(--border);
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.ob-market.is-selected .ob-market-check {
    background: var(--accent);
    border-color: var(--accent);
}
.ob-market.is-selected .ob-market-check::after {
    content: '';
    width: 4px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* ── Budget row (Q3 — single select pills) ───── */
.ob-budgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.ob-budget {
    background: var(--card-bg-alt, #f8f9fa);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.ob-budget:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.ob-budget.is-selected {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

/* ── Footer actions ─────────────────────────── */
.ob-footer {
    padding: 18px 44px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border-light);
    background: var(--card-bg-alt, #f8f9fa);
}

.ob-skip {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.15s;
}
.ob-skip:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.ob-actions-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ob-btn {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.ob-btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.ob-btn--ghost:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
.ob-btn--primary {
    background: var(--accent);
    color: #fff;
}
.ob-btn--primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.ob-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
.ob-btn[disabled]:hover {
    background: var(--accent);
    transform: none;
}

/* ── Pro card (final step) ──────────────────── */
.ob-pro-hero {
    background:
        radial-gradient(ellipse at top, rgba(227, 151, 116, 0.22) 0%, rgba(227, 151, 116, 0) 60%),
        linear-gradient(135deg, rgba(227, 151, 116, 0.10) 0%, rgba(92, 158, 173, 0.08) 100%);
    padding: 44px 48px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.ob-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 18px;
    border: 1px solid rgba(227, 151, 116, 0.3);
    box-shadow: 0 4px 16px -6px rgba(227, 151, 116, 0.35);
}
.ob-pro-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 151, 116, 0.25);
    animation: obPulse 2s ease-in-out infinite;
}
@keyframes obPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(227, 151, 116, 0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(227, 151, 116, 0.08); }
}

.ob-pro-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.ob-pro-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 440px;
    margin-inline: auto;
    line-height: 1.5;
}

.ob-pro-body {
    padding: 28px 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.ob-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ob-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--card-bg-alt, #f8f9fa);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: border-color 0.15s, transform 0.15s;
}
.ob-benefits li:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}
.ob-benefit-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}
.ob-benefit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.ob-benefit-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.ob-benefit-text span {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ── Giant CTA button ───────────────────────── */
.ob-btn--giant {
    width: 100%;
    justify-content: center;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, var(--accent) 0%, #d48569 100%);
    color: #fff;
    border-radius: var(--radius-md);
    box-shadow:
        0 10px 24px -8px rgba(227, 151, 116, 0.55),
        0 4px 10px -4px rgba(50, 98, 115, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}
.ob-btn--giant::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.ob-btn--giant:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow:
        0 14px 30px -8px rgba(227, 151, 116, 0.65),
        0 6px 14px -4px rgba(50, 98, 115, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.ob-btn--giant:hover::before {
    transform: translateX(100%);
}
.ob-btn--giant:active {
    transform: translateY(0);
}
.ob-btn--giant svg {
    flex-shrink: 0;
    transition: transform 0.18s;
}
.ob-btn--giant:hover svg {
    transform: translateX(3px);
}

.ob-fineprint {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 14px 0 0;
    line-height: 1.5;
}

.ob-later-link {
    display: block;
    margin: 18px auto 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 8px;
    transition: color 0.15s;
}
.ob-later-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 600px) {
    .ob-body { padding: 32px 24px 24px; }
    .ob-footer { padding: 16px 24px 22px; flex-wrap: wrap; }
    .ob-title { font-size: 1.25rem; }
    .ob-pro-title { font-size: 1.45rem; }
    .ob-pro-sub { font-size: 0.9rem; }
    .ob-pro-hero { padding: 32px 24px 24px; }
    .ob-pro-body { padding: 22px 24px 26px; }
    .ob-options { grid-template-columns: 1fr; }
    .ob-markets { grid-template-columns: repeat(2, 1fr); }
    .ob-budgets { grid-template-columns: repeat(2, 1fr); }
    .ob-actions-right { width: 100%; justify-content: flex-end; }
    .ob-benefits li { padding: 12px 14px; gap: 12px; }
    .ob-benefit-icon { width: 32px; height: 32px; font-size: 1.2rem; }
    .ob-benefit-text strong { font-size: 0.9rem; }
    .ob-benefit-text span { font-size: 0.78rem; }
    .ob-btn--giant { padding: 16px 20px; font-size: 1rem; }
}
