/* =====================================================================
   DGA Design System: Input + Dropdown, for the whole application.
   Source of truth: the DGA design system's own component CSS
   (design.dga.gov.sa, components "Input" <DgaTextInput size="lg"
   variant="default"> and "Dropdown" <Dropdown size="lg" style="default">,
   light theme).

   Turned on per page by the class "dga-forms" on the page wrapper
   (contact, innovate, service guide, event card). Dropdowns need
   static/scripts/dga-select.js on the same page. Load this file AFTER the
   page's own stylesheet: it overrides older field rules, some of which
   use !important. The Django admin is deliberately not included.
   ===================================================================== */
.dga-forms {
  --dga-field-bg: #ffffff;
  --dga-field-border: #9da4ae;           /* form-field-border-default */
  --dga-field-border-hover: #384250;     /* form-field-border-hovered */
  --dga-field-bar: #0c111b;              /* form-field-border-pressed */
  --dga-field-text: #384250;             /* form-field-text-focused */
  --dga-field-placeholder: #6c727e;      /* form-field-text-placeholder */
  --dga-field-error: #b42318;            /* form-field-border-error */
  --dga-field-disabled: #9da4ae;         /* border-disabled / text-default-disabled */
  --dga-field-readonly-border: #d2d6db;  /* border-neutral-primary */
  --dga-dd-text: #101828;                /* colors-text-primary */
  --dga-dd-placeholder: #667085;         /* colors-text-placeholder */
  --dga-dd-chevron: #384250;             /* gray-neutral-700 */
  --dga-dd-bar: #0d121c;                 /* gray-neutral-950 */
  --dga-dd-error: #d92d20;               /* colors-error-600 */
  --dga-dd-disabled: #d2d6db;            /* gray-neutral-300 */
  --dga-menu-border: #d0d5dd;            /* colors-border-primary */
  --dga-option-hover: #f3f4f6;           /* gray-neutral-100 */
  --dga-option-pressed: #e5e7eb;         /* gray-neutral-200 */
  --dga-label: #000000;
  --dga-required: #b42318;
  --dga-readonly-text: #000000;
  --dga-dd-pressed-bg: #f9fafb;          /* gray-neutral-50 */
  --dga-menu-bg: #ffffff;
  --dga-scrollbar: #d2d6db;              /* gray-neutral-300 */
  --dga-focus-outline: #000000;
  --dga-radius: 6px;                     /* radius-sm */
  --dga-shadow-md: 0 2px 4px -2px rgba(16, 24, 40, .06), 0 4px 8px -2px rgba(16, 24, 40, .1);
  --dga-shadow-xl: 0 8px 8px -4px rgba(16, 24, 40, .03), 0 20px 24px -4px rgba(16, 24, 40, .08);
  --dga-font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

/* ---- Labels (dga-label, md) ---------------------------------------- */
.dga-forms label:has(+ .form-control),
.dga-forms label:has(+ select),
.dga-forms label:has(+ .cu-dd),
.dga-forms label:has(+ .cu-input-wrap),
.dga-forms label:has(+ input:not([type="radio"]):not([type="checkbox"])),
.dga-forms label:has(+ textarea),
.dga-forms .form-group > label,
.dga-forms .cu-form-card label.form-label {
  display: flex;
  gap: 4px;
  margin: 0 0 8px;
  font: 400 14px/20px var(--dga-font);
  color: var(--dga-label);
}
.dga-forms .cu-required,
.dga-forms .asteriskField,
.dga-forms .form-group label.required::after {
  color: var(--dga-required) !important;
}

/* ---- Input + textarea (Input lg, style default) --------------------- */
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp) {
  height: 40px !important;
  min-height: 40px;
  width: 100%;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 1px solid var(--dga-field-border) !important;
  border-radius: var(--dga-radius) !important;
  /* The DGA focus bar: 2px, grows from the centre of the bottom edge. */
  background: linear-gradient(var(--dga-bar-color, var(--dga-field-bar)), var(--dga-bar-color, var(--dga-field-bar))) center bottom / 0% 2px no-repeat,
              var(--dga-field-bg) !important;
  box-shadow: none !important;
  color: var(--dga-field-text);
  font: 400 16px/24px var(--dga-font);
  outline: none;
  transition: border-color .15s ease-in-out, background-size .2s ease-in-out, box-shadow .2s ease-in-out;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):is(textarea) {
  height: auto !important;
  min-height: 96px;
  padding: 8px !important;
  resize: vertical;
}
:is(.dga-forms .form-control, .dga-forms .form-group input, .dga-forms .form-group textarea, .dga-forms .sg-search-box input, .dga-forms input.cu-captcha-input, .dga-forms input.inp)::placeholder {
  color: var(--dga-field-placeholder);
  opacity: 1;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):hover {
  border-color: var(--dga-field-border-hover) !important;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):focus,
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):focus-visible {
  outline: none !important;
  background-size: 100% 2px, auto !important;
  box-shadow: var(--dga-shadow-md) !important;
}
.dga-forms .form-control:active:not(:focus) {
  background-size: 50% 2px, auto !important;
}
/* Error: red border (also on hover), red focus bar and the DGA error
   feedback icon (feedbackIconType="error") at the end of the field. */
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp).is-invalid,
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp).is-invalid:hover {
  --dga-bar-color: var(--dga-field-error);
  border-color: var(--dga-field-error) !important;
  padding-inline-end: 40px !important;
  background: linear-gradient(var(--dga-field-error), var(--dga-field-error)) center bottom / 0% 2px no-repeat,
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23fee4e2'/%3E%3Ccircle cx='12' cy='12' r='8.33' fill='none' stroke='%23b42318' stroke-width='1.67'/%3E%3Cpath d='M12 8.67V12M12 15.33h.01' stroke='%23b42318' stroke-width='1.67' stroke-linecap='round'/%3E%3C/svg%3E") right 8px center / 24px 24px no-repeat,
              var(--dga-field-bg) !important;
}
/* Icon sits at the END of the field: right in English, left in Arabic;
   at the top for textareas. Same weight as the error rule so it applies. */
[dir="rtl"] :is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp).is-invalid,
[dir="rtl"] :is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp).is-invalid:hover {
  background-position: center bottom, left 8px center, 0 0 !important;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):is(textarea).is-invalid,
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):is(textarea).is-invalid:hover {
  background-position: center bottom, right 8px top 8px, 0 0 !important;
}
[dir="rtl"] :is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):is(textarea).is-invalid,
[dir="rtl"] :is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):is(textarea).is-invalid:hover {
  background-position: center bottom, left 8px top 8px, 0 0 !important;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp).is-invalid:focus {
  background-size: 100% 2px, 24px 24px, auto !important;
}
/* DGA shows success with a feedback icon, not a coloured field. */
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp).is-valid {
  border-color: var(--dga-field-border) !important;
  background-color: var(--dga-field-bg) !important;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp).is-valid:hover {
  border-color: var(--dga-field-border-hover) !important;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp)[readonly],
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp)[readonly]:hover {
  border-color: var(--dga-field-readonly-border) !important;
  color: var(--dga-readonly-text);
  background-size: 0 0, auto !important;
  box-shadow: none !important;
}
:is(.dga-forms .form-control:not(.cu-dd__native):not([type="file"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    .dga-forms .form-group textarea,
    .dga-forms .sg-search-box input,
    .dga-forms input.cu-captcha-input,
    .dga-forms input.inp):disabled {
  border-color: var(--dga-field-disabled) !important;
  color: var(--dga-field-disabled);
  -webkit-text-fill-color: var(--dga-field-disabled);
  background-size: 0 0, auto !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
.dga-forms .form-control:disabled::placeholder {
  color: var(--dga-field-disabled);
}

/* Helper / error text (dga-helper-text--error) */
.dga-forms .cu-field-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font: 400 14px/20px var(--dga-font);
  color: var(--dga-field-error);
}
.dga-forms .cu-field-error::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.33' fill='none' stroke='%23b42318' stroke-width='1.67'/%3E%3Cpath d='M10 6.67V10M10 13.33h.01' stroke='%23b42318' stroke-width='1.67' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.dga-forms .cu-valid-icon {
  top: 8px;
}

/* ---- Dropdown (lg, style default) ---------------------------------- */
.dga-forms .cu-dd {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}
.dga-forms .cu-dd__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}
.dga-forms .cu-dd__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--dga-field-border);
  border-radius: var(--dga-radius);
  background: var(--dga-field-bg);
  color: var(--dga-dd-text);
  font: 400 16px/24px var(--dga-font);
  text-align: start;
  cursor: pointer;
  transition: border-color .15s ease-in-out, box-shadow .2s ease-in-out;
}
.dga-forms .cu-dd__btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  background: var(--dga-dd-bar);
  transition: width .2s ease-in-out;
}
.dga-forms .cu-dd__value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dga-forms .cu-dd--placeholder .cu-dd__value {
  color: var(--dga-dd-placeholder);
}
.dga-forms .cu-dd__chevron {
  display: flex;
  flex: 0 0 auto;
  color: var(--dga-dd-chevron);
  transition: transform .4s ease-in-out;
}
.dga-forms .cu-dd__btn:hover {
  border-color: var(--dga-field-border-hover);
}
.dga-forms .cu-dd__btn:focus,
.dga-forms .cu-dd__btn:focus-visible {
  outline: none !important;
}
/* Open, and keyboard focus (visible focus indicator), use the DGA bar. */
.dga-forms .cu-dd.is-open .cu-dd__btn,
.dga-forms .cu-dd__btn:focus-visible {
  box-shadow: var(--dga-shadow-md);
}
.dga-forms .cu-dd.is-open .cu-dd__btn::after,
.dga-forms .cu-dd__btn:focus-visible::after {
  width: 100%;
}
.dga-forms .cu-dd.is-open .cu-dd__chevron {
  transform: rotate(180deg);
}
.dga-forms .cu-dd__btn:active:not(:disabled) {
  background-color: var(--dga-dd-pressed-bg);
}
.dga-forms .cu-dd__btn:active:not(:disabled)::after {
  width: 50%;
}
.dga-forms .cu-dd--error .cu-dd__btn,
.dga-forms .cu-dd--error .cu-dd__btn:hover {
  border-color: var(--dga-dd-error);
}
.dga-forms .cu-dd--error .cu-dd__btn::after {
  background: var(--dga-dd-error);
}
.dga-forms .cu-dd--disabled .cu-dd__btn,
.dga-forms .cu-dd--disabled .cu-dd__btn:hover {
  border-color: var(--dga-dd-disabled);
  box-shadow: none;
  cursor: not-allowed;
}
.dga-forms .cu-dd--disabled .cu-dd__btn::after {
  display: none;
}
.dga-forms .cu-dd--disabled .cu-dd__value,
.dga-forms .cu-dd--disabled .cu-dd__chevron {
  color: var(--dga-dd-disabled);
}

/* Menu */
.dga-forms .cu-dd__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  display: none;
  flex-direction: column;
  max-height: 376px;
  margin: 4px 0 0;
  padding: 8px;
  list-style: none;
  overflow-y: auto;
  border: 1px solid var(--dga-menu-border);
  border-radius: var(--dga-radius);
  background: var(--dga-menu-bg);
  box-shadow: var(--dga-shadow-xl);
  scrollbar-width: thin;
  scrollbar-color: var(--dga-scrollbar) transparent;
}
.dga-forms .cu-dd--up .cu-dd__list {
  top: auto;
  bottom: 100%;
  margin: 0 0 4px;
}
.dga-forms .cu-dd.is-open .cu-dd__list {
  display: flex;
}
.dga-forms .cu-dd__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border-radius: var(--dga-radius);
  color: var(--dga-dd-text);
  font: 400 14px/20px var(--dga-font);
  text-align: start;
  cursor: pointer;
  user-select: none;
}
.dga-forms .cu-dd__option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.dga-forms .cu-dd__check {
  display: flex;
  flex: 0 0 auto;
  color: var(--dga-dd-text);
  opacity: 0;
}
.dga-forms .cu-dd__option.is-selected .cu-dd__check {
  opacity: 1;
}
.dga-forms .cu-dd__option:hover,
.dga-forms .cu-dd__option.is-active {
  background-color: var(--dga-option-hover);
}
/* Keyboard focus on an option: 2px black outline (DGA :focus). */
.dga-forms .cu-dd__btn:focus-visible ~ .cu-dd__list .cu-dd__option.is-active {
  outline: 2px solid var(--dga-focus-outline);
  outline-offset: -2px;
}
.dga-forms .cu-dd__option:active {
  background-color: var(--dga-option-pressed);
}
.dga-forms .cu-dd__option[aria-disabled="true"] {
  color: var(--dga-dd-disabled);
  cursor: not-allowed;
  background: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .dga-forms .cu-dd__btn,
  .dga-forms .cu-dd__btn::after,
  .dga-forms .cu-dd__chevron,
  .dga-forms .form-control {
    transition: none;
  }
}

/* ---- Page-specific layout ----------------------------------------- */
/* Service guide toolbar: dropdowns sit in a wrapping flex row. */
.dga-forms .sg-toolbar > .cu-dd {
  flex: 0 0 auto;
  width: auto;
  min-width: 200px;
}
/* Leading search icon: keep the text clear of it. The id beats the
   general field rule's padding. */
.dga-forms #sgSearchInput {
  padding-inline-start: 40px !important;
}
.dga-forms .sg-search-box i {
  z-index: 1;
  color: var(--dga-field-placeholder);
}
@media (max-width: 768px) {
  .dga-forms .sg-toolbar > .cu-dd {
    width: 100%;
    min-width: 0;
  }
}
/* Captcha: code input + refresh button share the 40px DGA field height. */
.dga-forms .cu-captcha-refresh {
  width: 40px;
  height: 40px;
  border-radius: var(--dga-radius);
}
/* Event card: fields stack inside the tool cards. */
.dga-forms input.inp {
  margin-bottom: 12px !important;
}
.dga-forms input.inp:last-child {
  margin-bottom: 0 !important;
}

/* ---- Dark theme ------------------------------------------------------
   Same tokens, DGA gray-neutral scale inverted. Applies when the page sets
   data-theme="dark", or follows the OS setting when the page does not pin
   data-theme="light" (the public pages currently pin light).
   ------------------------------------------------------------------- */
[data-theme="dark"] .dga-forms {
  --dga-field-bg: #1f2a37;               /* gray-neutral-800 */
  --dga-field-border: #6c737f;           /* gray-neutral-500 */
  --dga-field-border-hover: #d2d6db;     /* gray-neutral-300 */
  --dga-field-bar: #f9fafb;              /* gray-neutral-50 */
  --dga-field-text: #f3f4f6;             /* gray-neutral-100 */
  --dga-field-placeholder: #9da4ae;      /* gray-neutral-400 */
  --dga-field-error: #f97066;            /* error-400 */
  --dga-field-disabled: #4d5761;         /* gray-neutral-600 */
  --dga-field-readonly-border: #384250;  /* gray-neutral-700 */
  --dga-dd-text: #f3f4f6;
  --dga-dd-placeholder: #9da4ae;
  --dga-dd-chevron: #d2d6db;
  --dga-dd-bar: #f9fafb;
  --dga-dd-error: #f97066;
  --dga-dd-disabled: #4d5761;
  --dga-menu-border: #384250;
  --dga-option-hover: #384250;
  --dga-option-pressed: #4d5761;
  --dga-label: #f3f4f6;
  --dga-required: #f97066;
  --dga-readonly-text: #f3f4f6;
  --dga-dd-pressed-bg: #111927;          /* gray-neutral-900 */
  --dga-menu-bg: #1f2a37;
  --dga-scrollbar: #4d5761;
  --dga-focus-outline: #ffffff;
  --dga-shadow-md: 0 2px 4px -2px rgba(0, 0, 0, .4), 0 4px 8px -2px rgba(0, 0, 0, .5);
  --dga-shadow-xl: 0 8px 8px -4px rgba(0, 0, 0, .3), 0 20px 24px -4px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dga-forms {
    --dga-field-bg: #1f2a37;
    --dga-field-border: #6c737f;
    --dga-field-border-hover: #d2d6db;
    --dga-field-bar: #f9fafb;
    --dga-field-text: #f3f4f6;
    --dga-field-placeholder: #9da4ae;
    --dga-field-error: #f97066;
    --dga-field-disabled: #4d5761;
    --dga-field-readonly-border: #384250;
    --dga-dd-text: #f3f4f6;
    --dga-dd-placeholder: #9da4ae;
    --dga-dd-chevron: #d2d6db;
    --dga-dd-bar: #f9fafb;
    --dga-dd-error: #f97066;
    --dga-dd-disabled: #4d5761;
    --dga-menu-border: #384250;
    --dga-option-hover: #384250;
    --dga-option-pressed: #4d5761;
    --dga-label: #f3f4f6;
    --dga-required: #f97066;
    --dga-readonly-text: #f3f4f6;
    --dga-dd-pressed-bg: #111927;
    --dga-menu-bg: #1f2a37;
    --dga-scrollbar: #4d5761;
    --dga-focus-outline: #ffffff;
    --dga-shadow-md: 0 2px 4px -2px rgba(0, 0, 0, .4), 0 4px 8px -2px rgba(0, 0, 0, .5);
    --dga-shadow-xl: 0 8px 8px -4px rgba(0, 0, 0, .3), 0 20px 24px -4px rgba(0, 0, 0, .5);
  }
}

/* ---- Utility -----------------------------------------------------------
   Initially hidden element (replaces inline style="display:none", which the
   CSP no longer allows). Loaded last on every page, so it wins over the
   component's own display rule; scripts show the element with
   el.style.display = "block"/"flex" or by removing the class.
   ------------------------------------------------------------------- */
.cu-hidden {
  display: none;
}
