/* ========================================
   PayoutJet Chatbot Onboarding Styles
   ======================================== */

:root {
    --chat-green: #059669;
    --chat-green-hover: #047857;
    --chat-blue: #2647a5;
    --chat-text: #1e293b;
    --chat-text-muted: #64748b;
    --chat-border: #e2e8f0;
    --chat-bg: #ffffff;
    --chat-input-bg: #f8fafc;
    --chat-sidebar-width: 240px;
    --chat-content-max: 640px;
}

/* ----------------------------------------
   Page reset for chatbot
---------------------------------------- */
.onboarding-chat-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    min-height: 100vh;
    color: var(--chat-text);
}

/* ----------------------------------------
   Chatbot Header
---------------------------------------- */
.chat-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--chat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.chat-header-logo img {
    height: 32px;
    display: block;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header-btn {
    background: none;
    border: 1px solid var(--chat-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--chat-text-muted);
    transition: background 0.15s, color 0.15s;
    font-size: 14px;
    text-decoration: none;
}

.chat-header-btn:hover {
    background: var(--chat-input-bg);
    color: var(--chat-text);
}

/* ----------------------------------------
   Main Layout
---------------------------------------- */
.chat-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 56px;
}

/* Welcome screen has no sidebar */
.chat-layout.welcome-mode {
    display: block;
}

/* ----------------------------------------
   Sidebar
---------------------------------------- */
.chat-sidebar {
    width: var(--chat-sidebar-width);
    flex-shrink: 0;
    padding: 40px 24px 40px 32px;
    border-right: 1px solid var(--chat-border);
    display: none;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.chat-layout.has-sidebar .chat-sidebar {
    display: block;
}

.sidebar-section {
    position: relative;
    margin-bottom: 8px;
}

.sidebar-section:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 28px;
    width: 2px;
    height: calc(100% - 4px);
    background: var(--chat-border);
}

.sidebar-section.completed::after {
    background: var(--chat-green);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    cursor: default;
    position: relative;
    z-index: 1;
}

.sidebar-dot {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--chat-border);
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.25s ease;
}

.sidebar-section.active .sidebar-dot {
    border-color: var(--chat-green);
    background: var(--chat-green);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

.sidebar-section.active .sidebar-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #fff;
    display: block;
}

.sidebar-section.completed .sidebar-dot {
    border-color: var(--chat-green);
    background: var(--chat-green);
    color: #fff;
}

.sidebar-section.completed .sidebar-dot::before {
    content: '✓';
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.sidebar-section.completed .sidebar-dot::after {
    display: none;
}

.sidebar-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--chat-text-muted);
    transition: color 0.2s;
}

.sidebar-section.active .sidebar-label {
    color: var(--chat-text);
    font-weight: 600;
}

.sidebar-section.completed .sidebar-label {
    color: var(--chat-green);
}

/* ----------------------------------------
   Main Content Area
---------------------------------------- */
.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 50vh;
    min-height: calc(100vh - 56px);
}

.chat-layout.welcome-mode .chat-content {
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 56px);
    padding: 40px 24px;
}

/* ----------------------------------------
   Chat Step Container
---------------------------------------- */
.chat-step {
    width: 100%;
    max-width: var(--chat-content-max);
    display: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-step.active {
    display: block;
    opacity: 0;
    transform: translateY(16px);
}

.chat-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.chat-step.exiting {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

/* ----------------------------------------
   Welcome Step (Step 0)
---------------------------------------- */
.welcome-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.welcome-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin-bottom: 0;
}

.welcome-question {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--chat-text);
    text-align: center;
    line-height: 1.25;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
}

.welcome-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.welcome-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1.5px solid var(--chat-border);
    background: var(--chat-input-bg);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--chat-text);
    text-align: left;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.welcome-option:hover {
    border-color: var(--chat-green);
    background: #fff;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
}

.welcome-option-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--chat-border);
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.welcome-option:hover .welcome-option-radio {
    border-color: var(--chat-green);
}

/* ----------------------------------------
   Regular Step Layout
---------------------------------------- */
.step-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.step-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.step-question {
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 700;
    color: var(--chat-text);
    line-height: 1.3;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
}

/* ----------------------------------------
   Input Styles
---------------------------------------- */
.chat-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--chat-border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--chat-text);
    background: var(--chat-input-bg);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    outline: none;
}

.chat-input:focus {
    border-color: var(--chat-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
    background: #fff;
}

.chat-input.has-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.chat-input-row {
    display: flex;
    gap: 12px;
}

.chat-input-row .chat-input-group {
    flex: 1;
}

.chat-input-group {
    margin-bottom: 14px;
}

.chat-input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--chat-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

/* ----------------------------------------
   Choice Buttons (YES/NO, etc.)
---------------------------------------- */
.chat-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.chat-choice-btn {
    padding: 14px 20px;
    border-radius: 10px;
    border: 1.5px solid var(--chat-border);
    background: var(--chat-input-bg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--chat-text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
    font-family: inherit;
}

.chat-choice-btn:hover {
    border-color: var(--chat-green);
    background: #fff;
    box-shadow: 0 2px 12px rgba(5, 150, 105, 0.1);
}

.chat-choice-btn.selected {
    border-color: var(--chat-green);
    background: rgba(5, 150, 105, 0.07);
    color: var(--chat-green);
}

/* ----------------------------------------
   Segmented Multi-choice Grid
---------------------------------------- */
.chat-segment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.chat-segment-btn {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--chat-border);
    background: var(--chat-input-bg);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--chat-text);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
    font-family: inherit;
}

.chat-segment-btn:hover {
    border-color: var(--chat-green);
    background: #fff;
}

.chat-segment-btn.selected {
    border-color: var(--chat-green);
    background: rgba(5, 150, 105, 0.07);
    color: #059669;
}

/* ----------------------------------------
   Condition Rating Cards
---------------------------------------- */
.condition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.condition-card {
    padding: 16px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--chat-border);
    background: var(--chat-input-bg);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.condition-card:hover {
    border-color: var(--chat-green);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1);
    background: #fff;
}

.condition-card.selected {
    border-color: var(--chat-green);
    background: rgba(5, 150, 105, 0.07);
}

.condition-card-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.condition-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--chat-text);
}

.condition-card-sub {
    font-size: 0.75rem;
    color: var(--chat-text-muted);
    margin-top: 3px;
}

/* ----------------------------------------
   State Combobox
---------------------------------------- */
.state-combobox {
    position: relative;
    margin-bottom: 24px;
}

.state-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--chat-border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    z-index: 20;
    display: none;
}

.state-dropdown.open {
    display: block;
}

.state-option {
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 9px 12px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--chat-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.12s;
    font-family: inherit;
}

.state-option:hover {
    background: rgba(5, 150, 105, 0.08);
}

.state-option .state-code {
    color: var(--chat-text-muted);
    font-size: 0.8rem;
}

.state-empty {
    padding: 10px 12px;
    color: var(--chat-text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ----------------------------------------
   Next Button
---------------------------------------- */
.chat-next-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, var(--chat-green) 0%, var(--chat-blue) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.22);
    font-family: inherit;
    min-width: 140px;
}

.chat-next-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(38, 71, 165, 0.22);
}

.chat-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-next-btn.loading {
    pointer-events: none;
}

.chat-next-btn .btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.chat-next-btn.loading .btn-spinner {
    display: block;
}

.chat-next-btn.loading .btn-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------
   Error Messages
---------------------------------------- */
.chat-error {
    margin-top: 8px;
    color: #e11d48;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
}

.chat-error.visible {
    display: block;
}

/* ----------------------------------------
   VIN Link
---------------------------------------- */
.vin-toggle-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.825rem;
    color: var(--chat-text-muted);
    font-weight: 500;
    background: var(--chat-input-bg);
    border: 1px solid var(--chat-border);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
}


.vin-toggle-link:hover {
    border-color: var(--chat-text-muted);
    color: var(--chat-text);
}

.manual-entry-fields {
    display: none;
    margin-top: 16px;
}

.manual-entry-fields.visible {
    display: block;
}

/* ----------------------------------------
   Vehicle Confirm Box
---------------------------------------- */
.vehicle-confirm-box {
    margin-top: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1.5px solid var(--chat-green);
    background: rgba(5, 150, 105, 0.05);
    display: none;
}

.vehicle-confirm-box.visible {
    display: block;
}

.vehicle-confirm-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--chat-text);
    margin-bottom: 4px;
}

.vehicle-confirm-sub {
    font-size: 0.85rem;
    color: var(--chat-text-muted);
    margin-bottom: 14px;
}

.vehicle-confirm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.vehicle-confirm-yes {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: var(--chat-green);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.vehicle-confirm-yes:hover {
    background: var(--chat-green-hover);
}

.vehicle-confirm-no {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1.5px solid var(--chat-border);
    background: #fff;
    color: var(--chat-text);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s;
}

.vehicle-confirm-no:hover {
    border-color: var(--chat-text-muted);
}

/* ----------------------------------------
   Warning Box
---------------------------------------- */
.chat-warning {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #92400e;
    font-size: 0.9rem;
    display: none;
}

.chat-warning.visible {
    display: block;
}

/* ----------------------------------------
   Ack Step
---------------------------------------- */
.ack-body {
    font-size: 1rem;
    color: var(--chat-text);
    line-height: 1.65;
    margin-bottom: 28px;
    padding: 20px;
    background: var(--chat-input-bg);
    border-radius: 10px;
    border: 1px solid var(--chat-border);
}

.ack-body a {
    color: var(--chat-blue);
    font-weight: 600;
}

/* ----------------------------------------
   Back button
---------------------------------------- */
.chat-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--chat-text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 28px;
    font-family: inherit;
    font-weight: 500;
    transition: color 0.15s;
}

.chat-back-btn:hover {
    color: var(--chat-text);
}

/* ----------------------------------------
   Repair sub-fields
---------------------------------------- */
.repair-detail-fields {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: var(--chat-input-bg);
    border-radius: 10px;
    border: 1px solid var(--chat-border);
}

.repair-detail-fields.visible {
    display: block;
}

.repair-detail-fields .chat-input-group {
    margin-bottom: 14px;
}

.repair-detail-fields .chat-input-group:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------
   Password input
---------------------------------------- */
.password-input-wrap {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--chat-text-muted);
    padding: 4px;
    font-size: 14px;
}

.password-strength {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
}

.password-strength.visible {
    display: block;
}

.password-strength.weak { color: #dc2626; }
.password-strength.fair { color: #d97706; }
.password-strength.strong { color: var(--chat-green); }

/* ----------------------------------------
   Responsive
---------------------------------------- */
/* ----------------------------------------
   Mobile section bar (replaces sidebar on small screens)
---------------------------------------- */
.mobile-section-bar {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid var(--chat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 40px;
}

.mobile-section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--chat-text);
    letter-spacing: 0.01em;
}

.mobile-section-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.msd {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: #e2e8f0;
    transition: background 0.2s, width 0.2s;
}

.msd.msd-active {
    background: var(--chat-green);
    width: 20px;
}

.msd.msd-done {
    background: var(--chat-green);
    opacity: 0.4;
}

@media (max-width: 768px) {
    .chat-sidebar {
        display: none !important;
    }

    .chat-layout {
        padding-top: 56px; /* header only; mobile bar handled separately */
    }

    /* Shift content down to clear mobile section bar when it's visible */
    .chat-layout.has-sidebar .chat-content {
        padding-top: 56px;
    }

    .chat-content {
        padding: 32px 16px 80px;
    }

    .chat-input-row {
        flex-direction: column;
        gap: 0;
    }

    .condition-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .welcome-question {
        font-size: 1.5rem;
    }
}

/* Hide mobile section bar on desktop */
@media (min-width: 769px) {
    .mobile-section-bar {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .chat-segment-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ----------------------------------------
   Progress Bar (inside fixed header)
---------------------------------------- */
.chat-header {
    overflow: visible;
}

.chat-progress-bar {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--chat-border);
    z-index: 99;
    display: none;
}

@media (max-width: 768px) {
    .chat-progress-bar {
        top: 96px; /* below header (56px) + mobile section bar (40px) */
    }
}

.chat-progress-bar.visible {
    display: block;
}

.chat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--chat-green) 0%, var(--chat-blue) 100%);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
}

/* ----------------------------------------
   Chat Thread (Q&A History)
---------------------------------------- */
.chat-thread {
    width: 100%;
    max-width: var(--chat-content-max);
    margin-bottom: 0;
    /* No height clipping — all history lives in the DOM.
       The "peek" comes from the scroll position:
       goToStep scrolls to show the current step with ~80px of thread visible above it. */
}

.thread-exchange {
    margin-bottom: 24px;
    animation: threadIn 0.3s ease forwards;
}

.thread-exchange .pitch-user-bubble-row {
    padding-left: 42px;
}

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

.thread-toby {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.thread-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    opacity: 0.7;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.thread-q-text {
    font-size: 0.875rem;
    color: var(--chat-text-muted);
    background: var(--chat-input-bg);
    border: 1px solid var(--chat-border);
    border-radius: 0 12px 12px 12px;
    padding: 8px 12px;
    line-height: 1.45;
    max-width: 85%;
}

.thread-user {
    display: flex;
    justify-content: flex-end;
    margin-left: 38px;
}

.thread-user-bubble {
    background: #e8f5f0;
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: var(--chat-text);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px 12px 0 12px;
    padding: 8px 14px;
    max-width: 85%;
    line-height: 1.4;
}

/* ----------------------------------------
   History / Scroll Mode
   Sidebar hides when user scrolls UP into thread.
   In normal mode the sidebar is visible; in history-mode it hides.
---------------------------------------- */
.chat-layout.history-mode.has-sidebar .chat-sidebar {
    display: none;
}

/* In history mode: thread is already full-height; sidebar just hides */

/* ----------------------------------------
   Resume Banner
---------------------------------------- */
.resume-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.resume-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
}

.resume-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.resume-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--chat-text);
    margin-bottom: 8px;
}

.resume-card p {
    font-size: 0.95rem;
    color: var(--chat-text-muted);
    margin-bottom: 24px;
}

.resume-actions {
    display: flex;
    gap: 10px;
}

.resume-btn-continue {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, var(--chat-green) 0%, var(--chat-blue) 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.resume-btn-continue:hover {
    opacity: 0.9;
}

.resume-btn-fresh {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1.5px solid var(--chat-border);
    background: #fff;
    color: var(--chat-text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}

.resume-btn-fresh:hover {
    border-color: var(--chat-text-muted);
    color: var(--chat-text);
}

/* ----------------------------------------
   Restart confirm overlay
---------------------------------------- */
.restart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.restart-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(15,23,42,0.15);
    text-align: center;
}

.restart-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.restart-msg {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--chat-text);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.restart-sub {
    font-size: 0.9rem;
    color: var(--chat-text-muted);
    margin: 0 0 28px;
    line-height: 1.5;
}

.restart-actions {
    display: flex;
    gap: 10px;
}

/* Never mind = recommended = colored */
.restart-btn-no {
    flex: 1;
    padding: 13px 20px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(90deg, var(--chat-green) 0%, var(--chat-blue) 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.restart-btn-no:hover { opacity: 0.9; }

/* Start over = secondary = outlined */
.restart-btn-yes {
    flex: 1;
    padding: 13px 20px;
    border-radius: 12px;
    border: 1.5px solid var(--chat-border);
    background: #fff;
    color: var(--chat-text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}

.restart-btn-yes:hover {
    border-color: var(--chat-text-muted);
    color: var(--chat-text);
}

/* ----------------------------------------
   Tooltip
---------------------------------------- */
.step-question-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 28px;
}

.step-question-wrap .step-question {
    margin-bottom: 0;
    flex: 1;
}

.tooltip-wrap {
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.tooltip-trigger {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--chat-border);
    background: var(--chat-input-bg);
    color: var(--chat-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    line-height: 1;
}

.tooltip-trigger:hover,
.tooltip-wrap.open .tooltip-trigger {
    border-color: var(--chat-blue);
    color: var(--chat-blue);
    background: rgba(38, 71, 165, 0.06);
}

.tooltip-box {
    display: none;
    position: absolute;
    right: 0;
    top: 30px;
    width: 260px;
    background: #fff;
    border: 1.5px solid var(--chat-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--chat-text);
    line-height: 1.5;
    box-shadow: 0 8px 20px rgba(15,23,42,0.12);
    z-index: 50;
    font-weight: 400;
}

.tooltip-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: var(--chat-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tooltip-wrap.open .tooltip-box {
    display: block;
}

/* ----------------------------------------
   Loading Step (inline estimate builder)
   Uses the standard .chat-step + .step-avatar/.step-question layout.
   No card container — consistent with the rest of the flow.
---------------------------------------- */

.loading-top-bar {
    height: 4px;
    background: var(--chat-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 28px;
}

.loading-top-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--chat-green) 0%, var(--chat-blue) 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-checklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    margin-bottom: 20px;
}

.lci {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    /* No background, no border — just clean rows */
}

.lci-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lci-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--chat-border);
    border-top-color: var(--chat-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    display: none;
}

.lci-check {
    display: none;
    width: 22px;
    height: 22px;
    background: var(--chat-green);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    position: absolute;
    animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lci-check::after {
    content: '';
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
    display: block;
}

.lci.active .lci-spinner { display: block; }
.lci.done .lci-spinner { display: none; }
.lci.done .lci-check { display: flex; }

.lci-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--chat-text-muted); /* pending = muted */
    flex: 1;
    line-height: 1.3;
    transition: color 0.3s;
}

.lci.active .lci-label {
    color: var(--chat-text);
    font-weight: 600;
}

.lci.done .lci-label {
    color: var(--chat-green);
    font-weight: 500;
}

.loading-footnote {
    font-size: 0.82rem;
    color: var(--chat-text-muted);
}

/* ----------------------------------------
   Combined Ack Checklist
---------------------------------------- */
.step1-terms {
    margin: 16px 0 20px;
}

.terms-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--chat-text-muted);
    line-height: 1.5;
    cursor: pointer;
}

.terms-check-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--chat-green);
    cursor: pointer;
}

.terms-check-label a {
    color: var(--chat-green);
    text-decoration: underline;
}

.ack-body-text {
    background: #f1f5f9;
    border-radius: 0 14px 14px 14px;
    padding: 16px 20px;
    margin-bottom: 28px;
    max-width: 480px;
}

.ack-plain-body {
    font-size: 0.88rem;
    color: var(--chat-text-muted);
    line-height: 1.6;
    margin: 0;
}

.ack-plain-body + .ack-plain-body {
    margin-top: 12px;
}

.ack-plain-body strong {
    color: var(--chat-text);
}

.ack-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.ack-check-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--chat-border);
    background: var(--chat-input-bg);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
}

.ack-check-item:has(input:checked) {
    border-color: var(--chat-green);
    background: rgba(5, 150, 105, 0.05);
}

.ack-check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--chat-green);
    cursor: pointer;
}

.ack-check-content {
    flex: 1;
}

.ack-check-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--chat-text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.ack-check-body {
    font-size: 0.82rem;
    color: var(--chat-text-muted);
    line-height: 1.5;
}

.ack-check-body a {
    color: var(--chat-blue);
    font-weight: 600;
}

.chat-next-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}



/* ==================== RESULTS STEP ==================== */

/* Position: relative so .res-aside can anchor to it */
#step-results {
    max-width: 620px;
    width: 100%;
    padding-bottom: 48px;
    position: relative;
}

/* ---- Headline area — wraps intro + main text + sidenote ---- */
.res-hl-area {
    position: relative;
    margin-bottom: 32px;
}

/* ---- Intro "making it rain" line ---- */
.res-hl-intro {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-weight: 700;
    color: var(--chat-text);
    text-align: center;
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

/* ---- Main eligible-for line ---- */
.res-hl-main {
    font-size: clamp(1.25rem, 2.8vw, 1.65rem);
    font-weight: 700;
    color: var(--chat-text);
    text-align: center;
    line-height: 1.45;
    margin: 0;
    letter-spacing: -0.015em;
}

.res-hl-num { color: #059669; }
.res-hl-muted { color: #94a3b8; }

/* ---- Desktop always-visible sidenote ---- */
.res-aside {
    display: none; /* hidden on mobile */
}

@media (min-width: 900px) {
    .res-aside {
        display: block;
        position: absolute;
        left: calc(100% + 28px);
        top: 50%;
        transform: translateY(-50%);
        width: 190px;
        border: 1.5px dashed #cbd5e1;
        border-radius: 10px;
        padding: 12px 14px;
        text-align: left;
    }
    /* Dotted connecting line from left edge of aside back toward content */
    .res-aside::before {
        content: '';
        position: absolute;
        right: 100%;
        top: 50%;
        width: 28px;
        border-top: 1.5px dashed #cbd5e1;
    }
}

.res-aside-line {
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 6px;
}

.res-aside-line:last-child { margin-bottom: 0; }

.res-aside-line strong {
    color: #64748b;
    font-weight: 600;
}

/* ---- ? Tooltip (mobile fallback) ---- */
.res-tooltip-wrap {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin-left: 5px;
}

/* Hide ? on desktop since sidenote is always visible */
@media (min-width: 900px) {
    .res-tooltip-wrap { display: none; }
}

.res-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    transition: background 0.15s;
}

.res-tooltip-wrap:hover .res-tooltip-icon { background: #cbd5e1; }

.res-tooltip-box {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.55;
    padding: 12px 14px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 100;
    text-align: left;
    letter-spacing: 0;
}

.res-tooltip-box strong { color: #fff; }
.res-tooltip-wrap:hover .res-tooltip-box { display: block; }

/* ---- Reasoning section — chat-bubble layout ---- */
.res-reasoning {
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Avatar + bubble wrapper */
.res-reason-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.res-reason-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.res-reason-item {
    flex: 1;
    min-width: 0;
    background: var(--chat-input-bg);
    border: 1px solid var(--chat-border);
    border-radius: 0 12px 12px 12px;
    padding: 12px 14px;
    text-align: left;
}

.res-reason-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.res-reason-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
}

.res-reason-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: #059669;
    white-space: nowrap;
}

/* Dotted separator + supporting fact row (no white box) */
.res-reason-fact {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    border-top: 1px dashed #cbd5e1;
    padding: 8px 0 10px;
    margin-bottom: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

.res-reason-fact span { flex: 1; }
.res-reason-fact strong { white-space: nowrap; }

.res-reason-fact strong {
    color: #475569;
    font-weight: 600;
}

.res-reason-fact-highlight {
    border-top-style: solid;
    border-top-color: #e2e8f0;
}

.res-fact-green {
    color: #059669 !important;
}

.res-reason-text {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

/* Only add top border when a fact row precedes the text */
.res-reason-fact + .res-reason-text {
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
}

/* ---- "Payout nerd" pitch ---- */
/* ---- Pitch bubble (same wrap/item structure as reasoning cards) ---- */
.res-pitch-item {
    border-radius: 0 12px 12px 12px !important;
    margin-bottom: 24px;
}

.res-pitch-line {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--chat-text);
    line-height: 1.45;
    margin: 0 0 8px;
}

.res-pitch-sub {
    font-size: 0.875rem;
    color: var(--chat-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ---- Strategy card ---- */
.res-strategy-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.res-strategy-bullet {
    font-size: 0.875rem;
    color: var(--chat-text-muted);
    line-height: 1.55;
    padding-left: 18px;
    position: relative;
    font-weight: 400;
}

.res-strategy-bullet::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--chat-text-muted);
    font-weight: 400;
}

/* ---- Claim CTA — looks like a selected chat option ---- */
.res-claim-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 20px;
    background: rgba(5, 150, 105, 0.06);
    border: 1.5px solid #059669;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #059669 !important;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, box-shadow 0.15s;
    margin-bottom: 12px;
}

.res-claim-btn:hover {
    background: rgba(5, 150, 105, 0.11);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.15);
}

/* ---- Disclaimer ---- */
.res-disclaimer {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* ==================== NEXT-STEPS STRIP ==================== */

/* Full-bleed strip — sits outside .chat-layout */
.res-next-strip {
    width: 100%;
    background: #eef1f5;
    color: #1e293b;
    padding: 64px 24px 56px;
}

.res-next-inner {
    max-width: 900px;
    margin: 0 auto 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.res-next-left, .res-next-right { }

@media (max-width: 700px) {
    .res-next-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

.res-next-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #059669;
    margin-bottom: 10px;
}

.res-next-title {
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.res-next-desc {
    font-size: 0.825rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 24px;
}

.res-next-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.res-next-steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.res-next-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #059669;
    color: #059669;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.res-next-steps li strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.res-next-steps li p {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
}

.res-next-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 28px;
}

.res-next-stat-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: #059669;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.res-next-stat-label {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

.res-next-video-wrap {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.res-next-caption {
    font-size: 0.72rem;
    color: #64748b;
    text-align: center;
    margin: 0;
}

.res-next-ctas {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
}

.res-next-claim-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    background: #fff;
    border: 2px solid #059669;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #059669 !important;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.res-next-claim-btn:hover {
    background: rgba(5, 150, 105, 0.06);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.15);
    transform: translateY(-1px);
}

@media (max-width: 700px) {
    .res-next-strip { padding: 48px 20px 40px; }
}

@media (max-width: 600px) {
    .res-hl-main { font-size: 1.2rem; }
    .res-tooltip-box { width: 220px; left: auto; right: 0; transform: none; }
}

/* ==================== PITCH STRIP ==================== */

.pitch-strip {
    width: 100%;
    background: #fff;
    padding: 56px 24px 28vh;
    border-top: 1px solid #e2e8f0;
}

.pitch-strip-inner {
    max-width: 560px;
    margin: 0 auto;
}

.pitch-bubble-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
}

.pitch-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.pitch-bubble {
    flex: 1;
    background: var(--chat-input-bg, #f8fafc);
    border: 1px solid var(--chat-border, #e2e8f0);
    border-radius: 0 12px 12px 12px;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.65;
}

.pitch-bubble strong {
    color: #0f172a;
}

.pitch-refund-link {
    color: #059669;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pitch-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 48px;
}

.pitch-choice-btn {
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.pitch-choice-btn:hover,
.pitch-choice-btn.selected {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.04);
    color: #059669;
}

/* ── Chat payment flow ──────────────────────────────── */
.pitch-back-btn {
    background: none;
    border: none;
    color: var(--chat-text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    margin-top: 8px;
    padding-left: 48px;
    display: block;
}
.pitch-back-btn:hover { color: #334155; }

.pitch-email-input-wrap {
    display: flex;
    gap: 8px;
    padding-left: 48px;
    margin-top: 10px;
    align-items: center;
}
.pitch-email-input {
    flex: 1;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
}
.pitch-email-input:focus { border-color: #059669; }
.pitch-email-submit-btn {
    padding: 11px 16px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.pitch-email-submit-btn:hover { background: #047857; }

.pitch-price-strike {
    text-decoration: line-through;
    color: var(--chat-text-muted);
    font-size: 0.95rem;
}
.pitch-price-now { font-size: 1.1rem; color: #059669; }
.pitch-price-sub { font-size: 0.82rem; color: var(--chat-text-muted); display: block; margin-top: 4px; }

#pitch-step-payment .pitch-bubble-wrap {
    margin-bottom: 10px;
}

.pitch-payment-wrap {
    padding-left: 48px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pitch-card-error {
    font-size: 0.83rem;
    color: #dc2626;
    min-height: 18px;
}
.pitch-pay-btn {
    padding: 14px;
    background: rgba(5, 150, 105, 0.06);
    color: #059669;
    border: 1.5px solid #059669;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}
.pitch-pay-btn:hover:not(:disabled) { background: rgba(5, 150, 105, 0.11); box-shadow: 0 4px 16px rgba(5, 150, 105, 0.15); }
.pitch-pay-btn:disabled { opacity: 0.65; cursor: default; }

#pitch-payment-element {
    margin-bottom: 4px;
}

.pitch-discount-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pitch-discount-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.82rem;
    color: var(--chat-text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-align: left;
}
.pitch-discount-toggle:hover { color: #059669; }
.pitch-discount-fields {
    display: flex;
    gap: 8px;
}
.pitch-discount-input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fff;
    color: var(--chat-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pitch-discount-input:focus { outline: none; border-color: #059669; }
.pitch-discount-input:disabled { background: #f8fafc; color: var(--chat-text-muted); }
.pitch-discount-apply-btn {
    padding: 10px 16px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.pitch-discount-apply-btn:hover:not(:disabled) { background: #1e293b; }
.pitch-discount-apply-btn:disabled { opacity: 0.6; cursor: default; }
.pitch-discount-msg {
    font-size: 0.82rem;
    min-height: 18px;
}
.pitch-discount-msg.success { color: #059669; font-weight: 600; }
.pitch-discount-msg.error { color: #dc2626; }

/* ── Pitch chat-inline area ─────────────────────────── */
.pitch-chat-area {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pitch-chat-bubble.pitch-choices {
    padding-left: 0;
}

.pitch-chat-bubble.pitch-email-input-wrap {
    padding-left: 0;
    margin-top: 0;
}

.pitch-chat-bubble.pitch-payment-wrap {
    padding-left: 0;
    margin-top: 0;
    gap: 8px;
}

.pitch-bubble-past {
    background: var(--chat-input-bg) !important;
    color: var(--chat-text-muted) !important;
    border-color: var(--chat-border) !important;
}
.pitch-bubble-past strong,
.pitch-bubble-past a { color: inherit !important; }

.pitch-user-bubble-row {
    display: flex;
    justify-content: flex-end;
}

.pitch-user-bubble {
    background: #e8f5f0;
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: var(--chat-text);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px 12px 0 12px;
    padding: 10px 16px;
    max-width: 85%;
    line-height: 1.4;
}
