/* Discovery Call page styles */

.discovery-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-white);
}

.discovery-back-btn {
    font-weight: 600;
}

.discovery-progress {
    font-size: 0.85em;
    color: var(--text-secondary);
    flex: 1;
    text-align: center;
}

.discovery-save-indicator {
    font-size: 0.8em;
    padding: 4px 10px;
    border-radius: 4px;
}

.discovery-save-indicator.saved {
    color: #166534;
    background: #dcfce7;
}

.discovery-save-indicator.saving {
    color: #92400e;
    background: #fef3c7;
}

.discovery-save-indicator.unsaved {
    color: #991b1b;
    background: #fef2f2;
}

.discovery-readonly-badge {
    font-size: 0.8em;
    padding: 4px 10px;
    border-radius: 4px;
    background: #e5e7eb;
    color: #374151;
}

/* Contact bar */

.discovery-contact-bar {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: #f9fafb;
}

.discovery-contact-picker-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.discovery-new-contact-fields {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.discovery-new-contact-fields .discovery-input,
.discovery-new-contact-fields .discovery-select {
    flex: 1;
    min-width: 140px;
}

/* Two-pane body */

.discovery-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.discovery-script-pane {
    width: 40%;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 16px 20px;
    background: #fafbfc;
}

.discovery-capture-pane {
    width: 60%;
    overflow-y: auto;
    padding: 16px 24px;
}

.discovery-capture-pane h4 {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section nav */

.discovery-section-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.discovery-section-tab {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-white);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.discovery-section-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.discovery-section-tab:hover:not(.active) {
    border-color: var(--accent);
}

/* Section content */

.discovery-section-subtitle {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin: 0 0 16px 0;
}

.discovery-question {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 6px;
    background: var(--bg-white);
    border: 1px solid var(--border);
}

.discovery-question.discovery-optional {
    border-left: 3px solid #fbbf24;
}

.discovery-question-text {
    font-size: 0.95em;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    font-style: italic;
}

.discovery-question-why {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.3;
}

.discovery-optional-tag {
    display: inline-block;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 3px;
    background: #fef3c7;
    color: #92400e;
    margin-top: 6px;
}

/* Capture fields */

.discovery-field {
    margin-bottom: 16px;
}

.discovery-field-label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.discovery-input,
.discovery-textarea,
.discovery-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.discovery-input:focus,
.discovery-textarea:focus,
.discovery-select:focus {
    border-color: var(--accent);
}

.discovery-input:disabled,
.discovery-textarea:disabled,
.discovery-select:disabled {
    background: #f3f4f6;
    color: #6b7280;
}

.discovery-input-sm {
    width: auto;
    flex: 1;
    min-width: 100px;
}

.discovery-select-sm {
    width: auto;
    flex: 1;
    min-width: 100px;
}

/* Radio buttons — large and clickable */

.discovery-radio-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.discovery-radio-btn {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--bg-white);
    font-size: 0.85em;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}

.discovery-radio-btn:hover:not(:disabled) {
    border-color: var(--accent);
}

.discovery-radio-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.discovery-radio-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Checkboxes */

.discovery-checkbox-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.discovery-checkbox-label {
    font-size: 0.875em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Additional contacts */

.discovery-contact-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
}

/* Footer */

.discovery-footer {
    display: flex;
    gap: 12px;
    padding: 12px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-white);
    justify-content: flex-end;
}

/* Page container */

#page-discovery-call {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Responsive: collapse to single pane on narrow screens */
@media (max-width: 900px) {
    .discovery-body {
        flex-direction: column;
    }
    .discovery-script-pane,
    .discovery-capture-pane {
        width: 100%;
        border-right: none;
    }
    .discovery-script-pane {
        max-height: 40vh;
        border-bottom: 1px solid var(--border);
    }
}
