/*
 * Aurora MyCRM — Installer semantic visual closure 7.2.4
 * Exact contract is injected server-side in auth.php:
 *   [data-syntrix-installer-step][aria-current]
 */

/* Do not allow a legacy theme to turn the selected step into white-on-white. */
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step] {
  opacity: 1 !important;
  color: #dce8f8 !important;
  background: #08182a !important;
  border-color: #29435f !important;
  text-shadow: none !important;
}
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step] * {
  opacity: 1 !important;
  color: inherit !important;
  text-shadow: none !important;
}
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step][aria-current="step"],
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step].is-active {
  color: #ffffff !important;
  background: #1769ff !important;
  border-color: #4d8cff !important;
  box-shadow: inset 0 -3px 0 rgba(255,255,255,.18) !important;
}
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step][aria-current="step"] *,
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step].is-active * {
  color: #ffffff !important;
  opacity: 1 !important;
}
/* Number badge remains strongly distinguishable. */
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step][aria-current="step"] > :first-child,
html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step].is-active > :first-child {
  background: #ffffff !important;
  color: #1769ff !important;
  border-color: rgba(255,255,255,.9) !important;
}

/* Dark form fields: explicit readable foreground/background. */
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form,
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form label,
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form legend,
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form strong {
  color: #f4f8ff !important;
}
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form select,
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form textarea {
  background: #0c1b2e !important;
  border-color: #38516f !important;
  color: #f4f8ff !important;
  caret-color: #ffffff !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form input::placeholder,
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form textarea::placeholder {
  color: #91a6c2 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body.mycrm-installer-page .sf-wizard-form select option {
  background: #0c1b2e !important;
  color: #f4f8ff !important;
}

/* Light theme keeps the same hierarchy without dark-theme leakage. */
html[data-theme="light"] body.mycrm-installer-page [data-syntrix-installer-step]:not([aria-current="step"]) {
  color: #26364d !important;
  background: #f5f8fd !important;
  border-color: #cbd7e6 !important;
}
html[data-theme="light"] body.mycrm-installer-page .sf-wizard-form input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] body.mycrm-installer-page .sf-wizard-form select,
html[data-theme="light"] body.mycrm-installer-page .sf-wizard-form textarea {
  background: #ffffff !important;
  color: #101828 !important;
  border-color: #b9c7d8 !important;
}

body.mycrm-installer-page .sf-wizard-form input:focus,
body.mycrm-installer-page .sf-wizard-form select:focus,
body.mycrm-installer-page .sf-wizard-form textarea:focus,
body.mycrm-installer-page .sf-wizard-form button:focus-visible,
body.mycrm-installer-page .sf-wizard-form a:focus-visible {
  outline: none !important;
  border-color: #4f86ff !important;
  box-shadow: 0 0 0 3px rgba(11,92,255,.22) !important;
}

@media (max-width: 720px) {
  html[data-theme] body.mycrm-installer-page[data-syntrix-installer-current-step] [data-syntrix-installer-step] {
    min-width: 180px;
  }
}
