/* =====================================================================
   Vital UI tokens: ONE size system for every button and form control.
   Flat (no shadows), brand red #e71143, borders #eceef1, font Alexandria.
   Loaded on every public page (after tailwind.build.css) and in the cpanel.
   ===================================================================== */
:root {
	--vx-red: #e71143;
	--vx-red-hover: #c8103a;
	--vx-line: #eceef1;
	--vx-line-strong: #d6dae1;
	--vx-ink: #0f172a;
	--vx-radius: 12px;
	/* buttons */
	--vx-btn-h: 44px;    --vx-btn-px: 20px; --vx-btn-fs: 15px;
	--vx-btn-h-sm: 36px; --vx-btn-px-sm: 14px; --vx-btn-fs-sm: 13.5px;
	--vx-btn-h-lg: 52px; --vx-btn-px-lg: 28px; --vx-btn-fs-lg: 16px;
	/* inputs */
	--vx-in-h: 48px; --vx-in-px: 14px; --vx-in-fs: 15px; --vx-in-border: 1.5px;
	--vx-ta-min: 110px;
}

/* ---------- Buttons ---------- */
.vx-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: var(--vx-btn-h); min-height: var(--vx-btn-h); padding: 0 var(--vx-btn-px);
	border-radius: var(--vx-radius) !important; font-size: var(--vx-btn-fs); font-weight: 700; line-height: 1.2;
	white-space: nowrap; text-align: center; text-decoration: none; cursor: pointer;
	box-shadow: none !important; transform: none;
	transition: background-color .15s, border-color .15s, color .15s; -webkit-tap-highlight-color: transparent;
}
:where(.vx-btn) { border: 1px solid transparent; }
.vx-btn:focus-visible { outline: 2px solid var(--vx-red); outline-offset: 2px; }
.vx-btn:disabled, .vx-btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; }
.vx-btn-primary { background: var(--vx-red) !important; color: #fff !important; border-color: var(--vx-red); }
.vx-btn-primary:hover { background: var(--vx-red-hover) !important; border-color: var(--vx-red-hover); }
/* secondary uses :where() so a page's colour utilities (e.g. text-[#e71143], border-white/20) still win */
:where(.vx-btn-sec, .vx-btn-ghost) { background: #fff; color: var(--vx-ink); border-color: var(--vx-line-strong); }
:where(.vx-btn-sec, .vx-btn-ghost):hover { border-color: var(--vx-ink); }
.vx-btn-sm { height: var(--vx-btn-h-sm); min-height: var(--vx-btn-h-sm); padding: 0 var(--vx-btn-px-sm); font-size: var(--vx-btn-fs-sm); gap: 6px; }
.vx-btn-lg { height: var(--vx-btn-h-lg); min-height: var(--vx-btn-h-lg); padding: 0 var(--vx-btn-px-lg); font-size: var(--vx-btn-fs-lg); }
.vx-btn-field { height: var(--vx-in-h); min-height: var(--vx-in-h); } /* sits on the same row as a 48px input */
.vx-btn-block { display: flex; width: 100%; }
.vx-btn.hidden, .vx-btn[hidden] { display: none !important; }
@media (min-width: 640px) { .vx-btn.sm\:hidden { display: none; } }
@media (min-width: 768px) { .vx-btn.md\:hidden { display: none; } }
@media (min-width: 1024px) { .vx-btn.lg\:hidden { display: none; } }
/* phones: long Arabic labels may wrap to two lines instead of overflowing (min-height keeps the 44px floor) */
@media (max-width: 639px) { .vx-btn { padding: 0 16px; height: auto; white-space: normal; } .vx-btn-lg { padding: 0 22px; } }
@media (prefers-reduced-motion: reduce) { .vx-btn { transition: none; } }

/* ---------- Form controls (global; replaces includes/Sections/inputs-style.php) ----------
   The ID in :not(#vxNo) lifts specificity so page-level styles cannot drift the size.
   Opt out with class .vx-raw (or .num for the phone/OTP digit inputs). */
.vx-input,
html body input:is([type=text],[type=email],[type=tel],[type=number],[type=password],[type=url],[type=date],[type=datetime-local],[type=time],[type=month],[type=search],:not([type])):not(.num):not(.vx-raw):not(#vxNo),
html body select:not(.vx-raw):not([multiple]):not([size]):not(#vxNo),
html body textarea:not(.vx-raw):not(#vxNo) {
	border: var(--vx-in-border) solid var(--vx-line) !important; border-radius: var(--vx-radius) !important;
	background-color: #fafafa !important; color: #111827; font-family: inherit;
	font-size: var(--vx-in-fs) !important; line-height: 1.4;
	padding-top: 0 !important; padding-bottom: 0 !important; padding-right: var(--vx-in-px) !important; padding-left: var(--vx-in-px);
	box-shadow: none !important; outline: 0 !important; --tw-ring-shadow: 0 0 #0000 !important; --tw-ring-offset-shadow: 0 0 #0000 !important;
	transition: border-color .15s ease, background-color .15s ease;
}
.vx-input,
html body input:is([type=text],[type=email],[type=tel],[type=number],[type=password],[type=url],[type=date],[type=datetime-local],[type=time],[type=month],[type=search],:not([type])):not(.num):not(.vx-raw):not(#vxNo),
html body select:not(.vx-raw):not([multiple]):not([size]):not(#vxNo) {
	height: var(--vx-in-h) !important; min-height: var(--vx-in-h) !important;
}
html body textarea:not(.vx-raw):not(#vxNo), textarea.vx-input {
	height: auto !important; min-height: var(--vx-ta-min); padding-top: 12px !important; padding-bottom: 12px !important; line-height: 1.7;
}
.vx-input:focus,
html body input:is([type=text],[type=email],[type=tel],[type=number],[type=password],[type=url],[type=date],[type=datetime-local],[type=time],[type=month],[type=search],:not([type])):not(.num):not(.vx-raw):not(#vxNo):focus,
html body select:not(.vx-raw):not(#vxNo):focus, html body textarea:not(.vx-raw):not(#vxNo):focus {
	border-color: var(--vx-red) !important; background-color: #fff !important; box-shadow: none !important; outline: 0 !important;
}
/* iOS zooms into inputs under 16px: keep 16px on phones only */
@media (max-width: 639px) {
	.vx-input,
	html body input:is([type=text],[type=email],[type=tel],[type=number],[type=password],[type=url],[type=date],[type=datetime-local],[type=time],[type=month],[type=search],:not([type])):not(.num):not(.vx-raw):not(#vxNo),
	html body select:not(.vx-raw):not(#vxNo), html body textarea:not(.vx-raw):not(#vxNo) { font-size: 16px !important; }
}
/* a bordered box that hosts an icon + a .vx-raw input (search bars) */
.vx-input-wrap { height: var(--vx-in-h); padding: 0 var(--vx-in-px); border: var(--vx-in-border) solid var(--vx-line); border-radius: var(--vx-radius); background: #fafafa; transition: border-color .15s, background-color .15s; }
.vx-input-wrap:focus-within { border-color: var(--vx-red); background: #fff; }
.vx-input-wrap > input { height: 100%; border: 0; background: transparent; font-size: var(--vx-in-fs); padding: 0; }
@media (max-width: 639px) { .vx-input-wrap > input { font-size: 16px; } }
/* inputs with an icon button inside (show password etc.) keep room for it */
html body .relative:has(> button) > input:not(.num) { padding-left: 48px !important; }

/* phone field component: same outer box as every input */
html body .vx-phone { box-sizing: border-box; min-height: var(--vx-in-h); border: var(--vx-in-border) solid var(--vx-line) !important; border-radius: var(--vx-radius) !important; box-shadow: none !important; }
html body .vx-phone:focus-within { border-color: var(--vx-red) !important; box-shadow: none !important; background: #fff; }
html body .vx-phone.err { border-color: #dc2626 !important; }
html body .vx-phone .cc-btn { min-height: calc(var(--vx-in-h) - 2 * var(--vx-in-border)) !important; height: calc(var(--vx-in-h) - 2 * var(--vx-in-border)); border-right-color: var(--vx-line) !important; border-radius: 10px 0 0 10px; }
html body .vx-phone .num, html body .vx-phone .num:focus { box-shadow: none !important; border: 0 !important; background: transparent !important; height: calc(var(--vx-in-h) - 2 * var(--vx-in-border)); padding: 0 14px !important; font-size: var(--vx-in-fs); }
@media (max-width: 639px) { html body .vx-phone .num { font-size: 16px; } }

/* plain form submits (login/signup/settings forms that have no utility classes) */
html body form input[type=submit]:not(.vx-raw):not([class*="vx-btn"]) { border-radius: var(--vx-radius) !important; }
