/* ===========================================
   Native form controls
   Full styling for input/select/textarea/checkbox/radio that PicoCSS
   previously provided. forms.css layers component-level helpers
   (.form-group, .btn-*, filters) on top of this base.
   Token-only — no hardcoded colors.
   =========================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input:not([type]),
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-family: var(--font);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    appearance: none;
}

select {
    /* native chevron via inline SVG tinted to text-secondary */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2rem;
    cursor: pointer;
}

textarea {
    min-height: 6rem;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--surface-alt);
}

/* Native checkbox / radio — accent the theme action color */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--c-secondary);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

label { color: var(--text-primary); }

fieldset {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1rem;
    margin: 0 0 1rem;
}
legend {
    padding: 0 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}
