/**
 * PropelDesk global form defaults (Tailwind CDN Preflight).
 * - Preflight sets border-width: 0 on * — :where() ties *; we load after Tailwind so borders apply.
 * - Preflight sets padding: 0 on input/textarea/select (0,0,0,1). :where() has 0 specificity, so padding was ignored.
 *   body + element (0,0,0,2) beats Preflight; single-class utilities (.px-3, etc.) still override.
 */

:where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]),
    textarea,
    select
) {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    border-width: 1px;
    border-style: solid;
    border-color: #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    font-size: 0.875rem;
    color: #111827;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    vertical-align: middle;
}

body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]),
body textarea,
body select {
    padding: 0.5rem 0.75rem;
    line-height: 1.5;
    min-height: 2.5rem;
}

body textarea {
    min-height: 6rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

body select:not([multiple]) {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    appearance: none;
}

body select[multiple] {
    min-height: 6rem;
    padding-right: 0.75rem;
    background-image: none;
    appearance: auto;
}

:where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]),
    textarea,
    select
)::placeholder {
    color: #9ca3af;
    opacity: 1;
}

:where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]):disabled,
    textarea:disabled,
    select:disabled
) {
    opacity: 0.65;
    cursor: not-allowed;
    background-color: #f9fafb;
}
