/* Shared look for editable form controls (text/number/select/textarea/checkbox)
   across every profile edit form. Keep this the single source of truth instead
   of redeclaring .form-input/.form-textarea per-page — see CLAUDE.md gotchas
   for why the per-page duplication existed before this file. */

.form-input,
.form-textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    font: inherit;
    font-size: 13px;
    line-height: 1.4;
    background: var(--surface-1);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:hover,
.form-textarea:hover {
    border-color: var(--border-strong);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px var(--bg-accent);
}

.form-input:disabled,
.form-textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-textarea {
    resize: vertical;
}

/* Selects: replace the browser's generic chevron with one that matches the
   accent colour, and stop it colliding with the option text. */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23aeb8cc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

select.form-input:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23ff9c5c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select.form-input option {
    background: var(--surface-1);
    color: var(--text-primary);
}

/* Numbers: the native up/down stepper reads as a stock browser widget next to
   the flat text/select fields, so drop it and let the field look identical
   to a text input. */
input[type="number"].form-input {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"].form-input::-webkit-outer-spin-button,
input[type="number"].form-input::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--orange-500);
    cursor: pointer;
}
