/* Shared appearance controls. Photographs and brand artwork are never filtered. */
:root { color-scheme: light; }
.felexia-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  min-width: 42px;
  padding: 9px 11px;
  border: 1px solid #dbe1ef;
  border-radius: 8px;
  background: #fff;
  color: #0b1340;
  font: 500 12px/1.3 Inter, Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.felexia-theme-toggle:hover { background: #eef1ff; border-color: #b3bfe8; }
.felexia-theme-toggle:focus-visible { outline: 3px solid #2446d8; outline-offset: 3px; }
.felexia-theme-toggle svg { width: 18px; height: 18px; flex: 0 0 18px; }
.felexia-theme-toggle [hidden],
html:not([data-theme="dark"]) [data-theme-icon="sun"],
html[data-theme="dark"] [data-theme-icon="moon"] { display: none !important; }
[dir="rtl"] .felexia-theme-toggle { font-family: 'Noto Sans Arabic', Inter, Arial, sans-serif; }

html[data-theme="dark"] {
  color-scheme: dark;
  --theme-background: #09152b;
  --theme-surface: #13223d;
  --theme-raised: #192c4c;
  --theme-text: #f1f5ff;
  --theme-muted: #bcc9e0;
  --theme-link: #a9bfff;
  --theme-line: #344865;
  --color-brand-midnight: #09152b;
  --color-brand-steel: #bcc9e0;
  --color-brand-pale: #344865;
  --color-brand-cloud: #162744;
  --color-brand-fog: #112139;
  --ink: var(--theme-text);
  --muted: var(--theme-muted);
  --surface: var(--theme-surface);
  --line: var(--theme-line);
  --silver: #253652;
  --indigo: #a9bfff;
  --surface-shadow: 0 12px 32px #02071133, 0 2px 6px #02071133;
  background: var(--theme-background);
  color: var(--theme-text);
}
html[data-theme="dark"] body { background: var(--theme-background); color: var(--theme-text); }
html[data-theme="dark"] ::selection { background: #a9bfff; color: #09152b; }
html[data-theme="dark"] :is(a, button, summary, input, select, textarea):focus-visible {
  outline-color: #aec3ff;
}
html[data-theme="dark"] .felexia-theme-toggle {
  background: #192c4c;
  border-color: #415775;
  color: #f1f5ff;
}
html[data-theme="dark"] .felexia-theme-toggle:hover { background: #263d60; }

/* Complete the reference site's native dark variants and custom Felexia blocks. */
html[data-theme="dark"] :is(.bg-white, .bg-white\/70, .bg-white\/95) {
  background-color: var(--theme-surface);
}
html[data-theme="dark"] :is(.text-brand-midnight, .text-brand-midnight\/80, .text-brand-midnight\/85) {
  color: var(--theme-text);
}
html[data-theme="dark"] :is(.text-brand-ocean, .hover\:text-brand-ocean:hover) { color: var(--theme-link); }
html[data-theme="dark"] .bg-brand-midnight .text-brand-ocean { color: var(--theme-link); }
html[data-theme="dark"] :is(.text-brand-steel, .text-brand-steel\/80) { color: var(--theme-muted); }
html[data-theme="dark"] :is(.hover\:bg-white:hover, .hover\:bg-brand-cloud:hover, .hover\:bg-brand-fog:hover) {
  background-color: var(--theme-raised);
}
html[data-theme="dark"] :is(.hover\:text-brand-midnight:hover, .hover\:text-foreground:hover) { color: #fff; }
/* Keep existing dark gradient variants and translucent header decorations. */
html[data-theme="dark"] .from-white:not([class*="dark:from-"]) { --tw-gradient-from: #13223d; }
html[data-theme="dark"] .from-white\/40:not([class*="dark:from-"]) { --tw-gradient-from: #13223d66; }
html[data-theme="dark"] .from-white\/85:not([class*="dark:from-"]) { --tw-gradient-from: #13223dd9; }
html[data-theme="dark"] .via-white:not([class*="dark:via-"]) { --tw-gradient-via: #13223d; }
html[data-theme="dark"] .via-white\/75:not([class*="dark:via-"]) { --tw-gradient-via: #13223dbf; }
html[data-theme="dark"] .via-white\/80:not([class*="dark:via-"]) { --tw-gradient-via: #13223dcc; }
html[data-theme="dark"] .to-white:not([class*="dark:to-"]) { --tw-gradient-to: #13223d; }
/* Content must stay above decorative gradient layers in the floating header. */
html[data-theme="dark"] body > header:not(.header) > div > .mx-auto,
html[data-theme="dark"] body > header:not(.header) .felexia-header-tools {
  position: relative;
  z-index: 1;
}
html[data-theme="dark"] :is(.felexia-contact-title, .felexia-extra-section) { color: var(--theme-text); }
html[data-theme="dark"] :is(.felexia-extra-section > p, .felexia-contact-details) { color: var(--theme-muted); }
html[data-theme="dark"] :is(.felexia-eyebrow, .felexia-languages a:hover, header nav a[aria-current="page"]) {
  color: var(--theme-link);
}
html[data-theme="dark"] .felexia-languages { border-color: var(--theme-line); }
html[data-theme="dark"] :is(.felexia-account-note, .felexia-map-link) {
  background: var(--theme-surface);
  border-color: var(--theme-line);
  color: var(--theme-link);
}
html[data-theme="dark"] :is(.felexia-action.secondary, .felexia-skip, .skip) {
  background: var(--theme-surface);
  border-color: var(--theme-line);
  color: var(--theme-text);
}
html[data-theme="dark"] .felexia-photo-caption { background: #09152bed; color: #f1f5ff; }
html[data-theme="dark"] .felexia-editorial-ink {
  color: var(--theme-muted);
}
html[data-theme="dark"] .felexia-editorial-link { color: var(--theme-link); }
html[data-theme="dark"] .prose {
  --tw-prose-body: #bcc9e0;
  --tw-prose-headings: #f1f5ff;
  --tw-prose-links: #a9bfff;
  --tw-prose-bold: #f1f5ff;
  --tw-prose-counters: #bcc9e0;
  --tw-prose-bullets: #a9bfff;
  --tw-prose-hr: #344865;
  --tw-prose-quotes: #d8e3fa;
  --tw-prose-quote-borders: #344865;
  --tw-prose-captions: #bcc9e0;
  --tw-prose-code: #e4ecff;
  --tw-prose-pre-bg: #13223d;
  --tw-prose-th-borders: #344865;
  --tw-prose-td-borders: #344865;
}
html[data-theme="dark"] .prose :is(h1, h2, h3, h4, strong, th) { color: var(--theme-text); }
html[data-theme="dark"] .prose a { color: var(--theme-link); }

/* Forms, errors and the four-step company creation journey. */
html[data-theme="dark"] .felexia-form-zone {
  --form-blue: #a9bfff;
  --form-ink: #f1f5ff;
  --form-muted: #bcc9e0;
  --form-line: #344865;
}
html[data-theme="dark"] :is(.form-card, .felexia-form-zone .form-card) {
  background: var(--theme-surface);
  border-color: var(--theme-line);
  box-shadow: 0 12px 32px #02071133;
}
html[data-theme="dark"] :is(.field input, .field select, .field textarea, input.search) {
  background: #0c1930;
  color: var(--theme-text);
  border-color: #526686;
}
html[data-theme="dark"] :is(.field input, .field textarea, input.search)::placeholder { color: #a9b8d0; }
html[data-theme="dark"] :is(.felexia-form-zone .field input, .felexia-form-zone .field select, .felexia-form-zone .field textarea) {
  background: #0c1930;
  color: var(--theme-text);
  border-color: #526686;
}
html[data-theme="dark"] :is(.felexia-form-zone .field input, .felexia-form-zone .field textarea)::placeholder { color: #a9b8d0; }
html[data-theme="dark"] :is(.felexia-form-zone .button, .felexia-legacy .button) {
  background: #2446d8 !important;
  color: #fff !important;
  border-color: #6383ff !important;
  box-shadow: none;
}
html[data-theme="dark"] :is(.felexia-form-zone .button:hover, .felexia-legacy .button:hover) { background: #1938b9 !important; }
html[data-theme="dark"] :is(.button.secondary, .felexia-form-zone .button.secondary, .felexia-legacy .button.secondary) {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: #526686 !important;
}
html[data-theme="dark"] :is(.felexia-form-zone .notice, .notice, .fallback, .felexia-form-zone .fallback, .summary-grid > div, .felexia-form-zone .summary-grid > div) {
  background: #182c4d;
  color: var(--theme-muted);
  border-color: var(--theme-line);
}
html[data-theme="dark"] :is(.choice, .felexia-form-zone .choice) { border-color: var(--theme-line); }
html[data-theme="dark"] :is(.choice:has(input:checked), .felexia-form-zone .choice:has(input:checked)) {
  background: #213861;
  border-color: #a9bfff;
}
html[data-theme="dark"] :is(.status.error, .felexia-form-zone .status.error) {
  background: #381e30;
  color: #ffbfcb;
  border-color: #864858;
}
html[data-theme="dark"] :is(.status.success, .felexia-form-zone .status.success) {
  background: #10352e;
  color: #a1ecce;
  border-color: #397563;
}
html[data-theme="dark"] :is(.field [aria-invalid="true"], .felexia-form-zone [aria-invalid="true"]) { border-color: #ff9dae; }

/* Original multilingual pages share the same surfaces and readable typography. */
html[data-theme="dark"] .felexia-legacy {
  --ink: #f1f5ff;
  --muted: #bcc9e0;
  --surface: #13223d;
  --line: #344865;
  --silver: #253652;
  --indigo: #a9bfff;
  color: var(--theme-text);
}
html[data-theme="dark"] :is(.method, .pale, .service-card:not(.featured), .guide-card, .offer-card, .offer-card:nth-child(2), .side-card, .related-card, .visual-tag) {
  background: linear-gradient(145deg, #152641, #11203a);
  color: var(--theme-text);
  border-color: var(--theme-line);
  box-shadow: var(--surface-shadow);
}
html[data-theme="dark"] :is(.service-card.featured, .felexia-legacy .service-card.featured) {
  background: linear-gradient(140deg, #253979, #192c4c);
  color: var(--theme-text);
  border-color: #4b64a4;
}
html[data-theme="dark"] :is(.service-card.featured p, .felexia-legacy .service-card.featured p) { color: #d0dcf4; }
html[data-theme="dark"] :is(.felexia-legacy .page-hero, .felexia-legacy .cta) {
  background: linear-gradient(120deg, #14223f, #252857 68%, #123d47) !important;
  color: var(--theme-text);
  border-color: var(--theme-line);
}
html[data-theme="dark"] .felexia-legacy .page-hero :is(h1, p, a) { color: var(--theme-text); }
html[data-theme="dark"] :is(.felexia-legacy .page-hero .eyebrow, .felexia-legacy .text-link) { color: var(--theme-link); }
html[data-theme="dark"] .felexia-legacy .cta-section { background: var(--theme-background); }
html[data-theme="dark"] :is(.mega, .whatsapp) { background: var(--theme-surface); color: var(--theme-text); border-color: var(--theme-line); }
html[data-theme="dark"] :is(.mega a:hover, .guide-art, .guide-card:nth-child(2) .guide-art, .guide-card:nth-child(3) .guide-art) {
  background: var(--theme-raised);
  color: var(--theme-link);
}
html[data-theme="dark"] .guide-art.guide-photo { background: transparent; }
html[data-theme="dark"] :is(.check-list li::before, .whatsapp svg) { color: #70dac4; }
html[data-theme="dark"] :is(.card-top > span, .guide-body .eyebrow, .offer-price) { color: var(--theme-link); }
html[data-theme="dark"] :is(table, th, td) { border-color: var(--theme-line); }
html[data-theme="dark"] th { background: var(--theme-raised); color: var(--theme-text); }
html[data-theme="dark"] :is(td, tr:nth-child(even)) { background-color: var(--theme-surface); color: var(--theme-muted); }

@media (max-width: 640px) {
  .felexia-theme-toggle { padding-inline: 10px; }
  .felexia-theme-toggle [data-theme-label] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}
@media print {
  .felexia-theme-toggle { display: none !important; }
}
/* Legacy translated forms use an explicit navy text colour in their base CSS. */
html[data-theme="dark"] .field label,
html[data-theme="dark"] .field>span,
html[data-theme="dark"] .contact-info a,
html[data-theme="dark"] .contact-info p { color:var(--theme-text,#f1f5ff); }
