/* create-assistant-page.css — create-assistant wizard, hosted in dlg-modal
 * (content variant). The wizard body is a cloned <template> from the
 * Assistants Manager page.
 */

.ca-wizard {
    display: flex;
    flex-direction: column;
}

/* Padded field area above the footer */
.ca-wizard-body {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ca-wizard-type {
    font-size: 14px;
    color: #555;
}

.ca-wizard-type strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* ── Fields ─────────────────────────────────────────────────── */

.ca-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* The `hidden` attribute must beat the `display: flex` rules — otherwise
 * JS-toggled views (source picker, the Retrieval sub-views) all show at once. */
.ca-form-group[hidden],
.ca-extras-view[hidden] {
    display: none;
}

.ca-form-group > label {
    font-weight: 600;
    font-size: 14px;
}

.ca-form-group input[type=text],
.ca-form-group input[type=password],
.ca-form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}

.ca-form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.ca-form-group--checkbox label {
    font-weight: normal;
    font-size: 14px;
}

/* Row layout: label sits above, dropdown + button share a single line. */
.ca-form-group--row {
    flex-direction: column;
}

.ca-source-row__controls {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.ca-source-row__controls select {
    flex: 1;
    min-width: 0;
}

.ca-source-row__create-btn {
    flex-shrink: 0;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.ca-source-row__create-btn:hover {
    background: #f5f5f7;
}

.ca-source-back-btn {
    align-self: flex-start;
}

/* ── Status / error slots ───────────────────────────────────── */

.ca-name-error,
.ca-status {
    display: block;
    min-height: 1.1em;
    font-size: 13px;
    margin: 0;
}

.dlg-status--err { color: #dc172e; }
.dlg-status--ok  { color: #38a169; }

/* ── Footer ─────────────────────────────────────────────────── */

.ca-wizard-footer {
    display: flex;
    gap: 10px;
    padding: 16px 30px;
    border-top: 1px solid #eee;
}

.ca-cancel-btn,
.ca-create-btn {
    flex: 1;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.ca-cancel-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
}

.ca-cancel-btn:hover {
    background: #f5f5f7;
}

.ca-create-btn {
    background: #212121;
    border: 1px solid #212121;
    color: #f5f5f5;
}

.ca-create-btn:hover:not(:disabled) {
    background: #333;
}

.ca-create-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Extras (the Retrieval section) ─────────────────────────── */

.ca-extras {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f8fc;
}

.ca-extras h2 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.ca-extras-hint {
    font-size: 13px;
    color: #555;
    margin: 0;
}

.ca-extras-notice {
    padding: 10px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    color: #6d5300;
    font-size: 13px;
}

.ca-extras-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ca-actions {
    display: flex;
    gap: 8px;
}

.ca-back-btn {
    padding: 7px 14px;
    background: transparent;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.ca-back-btn:hover {
    background: #f5f5f7;
}
