/* Global form-element styling.
 * Loaded after Tailwind's CDN preflight so these rules win.
 * Use element selectors + !important so utility classes set per-input
 * (text-sm, p-1, etc.) get overridden consistently across the app.
 */

html {
    scroll-behavior: smooth;
}

/* ---------- Inputs, selects, textareas ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
select,
textarea {
    font-size: 1rem !important;          /* 16px — bigger than Tailwind's text-sm */
    line-height: 1.5 !important;
    padding: 0.625rem 0.875rem !important; /* ~10px / 14px */
    border-width: 1.5px !important;
    border-color: #94a3b8 !important;    /* slate-400 — darker than the default slate-300 */
    border-radius: 0.5rem !important;    /* rounded-lg */
    background-color: #ffffff !important;
    color: #0f172a !important;           /* slate-900 */
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"])::placeholder,
textarea::placeholder {
    color: #94a3b8 !important; /* slate-400 — clearly placeholder-y */
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):hover,
select:hover,
textarea:hover {
    border-color: #64748b !important; /* slate-500 */
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: #0f172a !important;                       /* slate-900 */
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.15) !important;
}

input:disabled, select:disabled, textarea:disabled {
    background-color: #f1f5f9 !important; /* slate-100 */
    color: #94a3b8 !important;
    cursor: not-allowed;
}

/* ---------- Select-specific tweaks ---------- */
select {
    /* Re-add a visible caret since some Tailwind utility classes nuke the native arrow. */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem !important;
}

/* ---------- Checkboxes / radios — make them bigger and easier to click ---------- */
input[type="checkbox"],
input[type="radio"] {
    width: 1.125rem !important;
    height: 1.125rem !important;
    accent-color: #0f172a;
    cursor: pointer;
}

/* ---------- File inputs — distinguish the "Choose File" button ---------- */
input[type="file"] {
    font-size: 0.875rem;
}
input[type="file"]::file-selector-button {
    padding: 0.5rem 0.875rem;
    border: 0;
    border-radius: 0.375rem;
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    margin-right: 0.75rem;
}
input[type="file"]::file-selector-button:hover {
    background-color: #334155;
}

/* ---------- Form labels — make them stand out a bit more ---------- */
label > span:first-child {
    color: #334155; /* slate-700 */
}
