/* Shared accessible form treatment for the staff system, shop and account flows.
   Control geometry is intentionally modest so existing forms keep their layout. */
body.dark-mode form :is(input:is([type="text"], [type="email"], [type="password"], [type="tel"], [type="url"], [type="search"], [type="number"], [type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]), select, textarea),
body.auth-page form :is(input:is([type="text"], [type="email"], [type="password"], [type="tel"], [type="url"], [type="search"], [type="number"], [type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]), select, textarea) {
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgb(177 195 230 / 22%);
    border-radius: 11px;
    outline: none;
    color: #f3f5fc;
    background-color: rgb(8 15 31 / 74%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
    font-size: 13px;
    line-height: 1.4;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

body.dark-mode form :is(select, select option),
body.auth-page form :is(select, select option) {
    color-scheme: dark;
}
body.dark-mode form select option,
body.auth-page form select option { color: #f3f5fc; background: #10182c; }

body.dark-mode form :is(input, select, textarea)::placeholder,
body.auth-page form :is(input, select, textarea)::placeholder { color: #a1abc1; opacity: 1; }

body.dark-mode form :is(input, select, textarea):focus,
body.auth-page form :is(input, select, textarea):focus {
    border-color: rgb(151 174 255 / 78%);
    background-color: rgb(9 17 35 / 96%);
    box-shadow: 0 0 0 3px rgb(106 132 255 / 16%), inset 0 1px 0 rgb(255 255 255 / 4%);
}

body.dark-mode form :is(input, select, textarea):disabled,
body.auth-page form :is(input, select, textarea):disabled {
    color: #a4aec2;
    background-color: rgb(110 122 151 / 12%);
    cursor: not-allowed;
    opacity: .72;
}

body.dark-mode form label,
body.auth-page form label { color: #e1e6f3; }
body.dark-mode form input[type="checkbox"],
body.dark-mode form input[type="radio"],
body.auth-page form input[type="checkbox"],
body.auth-page form input[type="radio"] { accent-color: #aab5ff; }

body.dark-mode form :is(input[type="file"]),
body.auth-page form :is(input[type="file"]) {
    min-height: 42px;
    padding: 7px;
    border: 1px dashed rgb(177 195 230 / 30%);
    border-radius: 11px;
    color: #dce3f2;
    background: rgb(8 15 31 / 52%);
}
body.dark-mode form input[type="file"]::file-selector-button,
body.auth-page form input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 7px 11px;
    border: 1px solid rgb(177 195 230 / 25%);
    border-radius: 8px;
    color: #f1f4fc;
    background: rgb(123 137 195 / 20%);
    font: inherit;
    cursor: pointer;
}

/* Keep the compact utility forms in data tables compact. */
body.dark-mode td form :is(input:not([type="hidden"]), select),
body.auth-page td form :is(input:not([type="hidden"]), select) {
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 12px;
}

@media (max-width: 560px) {
    body.dark-mode form :is(input:is([type="text"], [type="email"], [type="password"], [type="tel"], [type="url"], [type="search"], [type="number"], [type="date"]), select, textarea),
    body.auth-page form :is(input:is([type="text"], [type="email"], [type="password"], [type="tel"], [type="url"], [type="search"], [type="number"], [type="date"]), select, textarea) {
        min-height: 44px;
        font-size: 16px;
    }
}
