/* =========================================================
   style_input.css — updated for Option B (modal-friendly)
   Changes:
   - Make radio dot positioning reliable (position: relative on input)
   - Slightly better spacing + padding for inputs/textarea
   - Consistent focus ring for input/select/textarea
   - Keep your existing look, avoid breaking layout
   ========================================================= */

/* === Unified placeholders (site-wide) === */
::placeholder,
input::placeholder,
textarea::placeholder {
    opacity: 0.6;
    font-size: var(--fs-sm);
    color: var(--Light_Text);
    font-family: var(--font-main);
    font-weight: var(--fw-light);
}

/* Base fields */
textarea, input, select {
    margin: 0.25em;
    border: 1px solid var(--element_border);
    border-radius: 8px;                 /* was 4px -> matches your newer rounded UI */
    background-color: var(--element);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* === Text sizing consistency for form fields === */
select,
textarea,
input:not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]) {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-main);
    font-size: var(--fs-md);
    font-weight: var(--fw-regular);
    line-height: 1.25;
}

/* Textarea */
textarea {
    resize: vertical;
    min-height: 80px;
    padding: 0.75rem 0.6rem;            /* was 0.75rem 0.2rem */
}

/* Select */
select {
    padding: var(--small-padding);
    height: 2.5em;
    flex-grow: 1;
}

/* Inputs */
input:not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]) {
    width: 100%;
    height: 2.5em;
    padding: 0 0.6rem;
}

/* Number inputs: keep compact if desired */
input[type="number" i] {
    flex-grow: 0;
    width: auto;
}

/* Focus ring (applies to all form controls) */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0px 4px 8px var(--orange_shadow);
}

/* Radios */
input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--Default_Text);
    border-radius: 50%;
    background-color: white;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
    flex-grow: 0 !important;
    position: relative;                /* IMPORTANT: anchors ::before dot */
    margin: 0 8px;
}

/* Checked dot */
input[type="radio"]:checked::before {
    content: "";
    width: 10px;
    height: 10px;
    background-color: var(--navy);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Checked ring */
input[type="radio"]:checked {
    border: 2px solid var(--navy);
}

/* Alignment for radio groups */
.radio-group, .radio-option {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;         /* was nowrap -> avoids overflow in modals/mobile */
    column-gap: 14px !important;
    row-gap: 10px !important;
    padding: 5px 0 !important;
}

.radio-group input[type="radio"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Field error highlight */
.field-error {
    border: 2px solid red !important;
    background-color: #ffe6e6;
}
