/* USDSC AI Intake Form — v1.1 */
.usdsc-intake-wrap {
    max-width: 820px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1e293b;
}

.intake-form-header { text-align: center; margin-bottom: 32px; }
.intake-form-title  { font-size: 26px; font-weight: 700; color: #003366; margin: 0 0 8px; }
.intake-form-subtitle { font-size: 15px; color: #64748b; margin: 0; }

/* Success state */
.intake-success {
    text-align: center;
    background: #d1fae5;
    border-radius: 12px;
    padding: 48px 32px;
}
.intake-success-icon { font-size: 3rem; margin-bottom: 12px; color: #065f46; }
.intake-success h3 { font-size: 22px; color: #065f46; margin: 0 0 8px; }
.intake-success p  { color: #047857; margin: 0; }

/* Form sections */
.intake-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
}
.intake-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.intake-step {
    width: 26px; height: 26px;
    background: #003366;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.intake-section-hint { font-size: 12px; color: #64748b; margin: -10px 0 14px; }

/* Grid */
.intake-row { display: grid; gap: 16px; margin-bottom: 16px; }
.intake-row:last-child { margin-bottom: 0; }
.intake-row-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .intake-row-2 { grid-template-columns: 1fr; } }

/* Fields */
.intake-field-wrap { display: flex; flex-direction: column; gap: 5px; }
.intake-label { font-size: 12px; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .4px; }
.req { color: #ef4444; }
.intake-input,
.intake-select,
.intake-textarea {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    color: #1e293b;
    width: 100%;
}
.intake-input:focus,
.intake-select:focus,
.intake-textarea:focus {
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, .1);
}
.intake-input.error,
.intake-select.error { border-color: #ef4444; }
.intake-textarea { resize: vertical; min-height: 100px; }
.intake-error { font-size: 11px; color: #ef4444; min-height: 14px; }

/* Service checkbox cards */
.intake-checkgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.intake-check-card { cursor: pointer; display: block; }
.intake-check-card input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.intake-check-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color .2s, background .2s, box-shadow .2s;
    height: 100%;
    background: #fafbfc;
}
.intake-check-card:hover .intake-check-inner {
    border-color: #003366;
    background: #f0f5ff;
}
.intake-check-card input:checked + .intake-check-inner {
    border-color: #003366;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(0,51,102,.15);
}
.intake-check-icon  { font-size: 1.4rem; margin-bottom: 2px; }
.intake-check-label { font-size: 13px; font-weight: 600; color: #1e293b; }
.intake-check-desc  { font-size: 11px; color: #64748b; line-height: 1.4; }

/* Required note */
.intake-required-note {
    font-size: 12px; color: #64748b; margin-top: 8px;
    background: #f8fafc; border-radius: 6px; padding: 8px 12px;
    border-left: 3px solid #003366;
}

/* Required vs optional section styling */
.intake-section-required { border-color: #003366; border-left-width: 3px; }
.intake-section-optional { background: #fafbfc; }
.intake-section-optional:hover { background: #f8fafc; }

/* Optional badge */
.intake-optional-badge {
    font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    background: #e2e8f0; color: #64748b; padding: 2px 7px; border-radius: 10px;
    margin-left: 6px; vertical-align: middle;
}

/* Section toggle header (clickable) */
.intake-section-toggle {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none;
    margin-bottom: 0;
}
.intake-section-toggle:hover .intake-section-title-toggle { color: #0051a8; }
.intake-section-title-toggle { margin: 0; flex: 1; }
.intake-toggle-chevron {
    font-size: 18px; color: #94a3b8;
    transition: transform .2s;
    flex-shrink: 0;
}

/* Inline toggle (e.g. "Add company & phone") */
.intake-optional-toggle:not(.intake-section-toggle) {
    font-size: 12px; color: #0066cc; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 8px; font-weight: 600;
}
.intake-optional-toggle:not(.intake-section-toggle):hover { text-decoration: underline; }
.intake-toggle-icon { font-size: 14px; font-weight: 700; }

/* Optional body slide */
.intake-optional-body { margin-top: 14px; }

/* Step icon for optional sections */
.intake-step-opt {
    background: #e2e8f0; color: #475569;
    font-size: 1rem; width: auto; height: auto;
    border-radius: 0; padding: 0;
}

/* Field note (sub-hint below input) */
.intake-field-note { font-size: 11px; color: #94a3b8; margin-top: 3px; }

/* Full-width field in 2-col grid */
.intake-field-wrap-full { grid-column: 1 / -1; }

/* Sub-agent cards */
.intake-subagent-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
}
.intake-subagent-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.intake-subagent-header strong { font-size: 13px; color: #003366; }
.intake-remove-subagent {
    font-size: 11px; color: #ef4444; background: none; border: none;
    cursor: pointer; font-weight: 600; padding: 0;
}
.intake-remove-subagent:hover { text-decoration: underline; }

.intake-add-subagent-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eff6ff; color: #003366; border: 1.5px dashed #93c5fd;
    border-radius: 8px; padding: 10px 18px; font-size: 13px; font-weight: 600;
    cursor: pointer; width: 100%; justify-content: center; margin-top: 4px;
    transition: background .2s, border-color .2s;
}
.intake-add-subagent-btn:hover { background: #dbeafe; border-color: #3b82f6; }

/* Submit row */
.intake-submit-row { text-align: center; padding-top: 8px; }
.intake-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #003366;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.intake-submit-btn:hover { background: #0051a8; transform: translateY(-1px); }
.intake-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.intake-privacy {
    font-size: 11px;
    color: #94a3b8;
    margin: 10px 0 0;
}
.intake-submit-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    margin-top: 12px;
    display: inline-block;
}
