/* Hand-written dark-mode base for axolt.com.
   This file (plus the generated dark-auto.css) is what will later move into
   wp-content/themes/hub-child/. Edit freely, then refresh the browser. */

:root { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* 1. Elementor Global Colors (kit 5) */
html[data-theme="dark"] .elementor-kit-5 {
  --e-global-color-primary: #E5484F;   /* #C31C23 lifted for contrast on dark */
  --e-global-color-text: #A3A9B8;      /* #7A7A7A */
  --e-global-color-accent: #6E93F5;    /* #336AEA */
  --e-global-color-6b48e83: #E7E9F2;   /* #181B31 navy (headings) */
  color: #A3A9B8;
}

/* 2. Page surfaces + base typography (Hub theme) */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] #wrap,
html[data-theme="dark"] #lqd-site-content,
html[data-theme="dark"] #lqd-contents-wrap {
  background-color: #0E1017;
}
html[data-theme="dark"] body { color: #A3A9B8; }
html[data-theme="dark"] :where(h1, h2, h3, h4, h5, h6) { color: #E7E9F2; }

/* 3. Logo: dark-text logo on a dark header -> show it as white.
   For production, upload a white logo and swap it instead of using a filter. */
html[data-theme="dark"] .mm2-logo { filter: brightness(0) invert(1); }

/* 4. Media that should not look like glowing white boxes */
html[data-theme="dark"] img:is([src$=".png"], [src$=".webp"]):not(.mm2-logo) { filter: brightness(.92); }

/* 5. Form fields */
html[data-theme="dark"] :is(input, select, textarea):not([type="submit"]):not([type="button"]):not(.axs-input):not(.axsp__input) {
  background-color: #151925; color: #E7E9F2; border-color: #2A3042;
}

/* 6. Theme switch: round button + Light / Dark / System menu
      (production: [axolt_theme_toggle] shortcode in the header) */
.axolt-theme-switch { position: relative; display: inline-flex; flex: 0 0 auto; align-self: center; }

.axolt-theme-switch .axolt-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 999px; padding: 0; margin: 0;
  border: 1px solid #E1E3E8; background: #FFFFFF; color: #1F2328; cursor: pointer;
  box-shadow: none; text-transform: none; letter-spacing: normal; line-height: 1;
  transition: background-color .15s, border-color .15s, color .15s;
}
.axolt-theme-switch .axolt-theme-toggle:hover,
.axolt-theme-switch .axolt-theme-toggle:focus,
.axolt-theme-switch.is-open .axolt-theme-toggle { background: #F1F2F4; border-color: #E1E3E8; color: #1F2328; }
/* Outline icons: never filled by Elementor's global button/svg styles */
.axolt-theme-switch svg, .axolt-theme-switch svg * { fill: none; stroke: currentColor; }
.axolt-theme-switch .axolt-theme-option:focus:not(:focus-visible) { background: transparent; color: inherit; }
.axolt-theme-switch .axolt-theme-toggle:focus-visible { outline: 2px solid #C31C23; outline-offset: 2px; }
html[data-theme="dark"] .axolt-theme-switch .axolt-theme-toggle { border-color: #2A3042; background: transparent; color: #E7E9F2; }
html[data-theme="dark"] .axolt-theme-switch .axolt-theme-toggle:hover,
html[data-theme="dark"] .axolt-theme-switch .axolt-theme-toggle:focus,
html[data-theme="dark"] .axolt-theme-switch.is-open .axolt-theme-toggle { background: #1A1E2A; border-color: #2A3042; color: #E7E9F2; }

/* Button icon = the visitor's choice (System shows a monitor) */
.axolt-theme-switch .axolt-ts-icon { display: none; }
html:not([data-theme-pref]) .axolt-theme-switch .axolt-ts-icon--system,
html[data-theme-pref="system"] .axolt-theme-switch .axolt-ts-icon--system,
html[data-theme-pref="light"] .axolt-theme-switch .axolt-ts-icon--light,
html[data-theme-pref="dark"] .axolt-theme-switch .axolt-ts-icon--dark { display: block; }

/* Menu */
.axolt-theme-switch .axolt-theme-menu {
  --axolt-menu-shift: 0px;
  position: absolute; top: calc(100% + 8px); left: 50%; z-index: 1000;
  transform: translateX(calc(-50% + var(--axolt-menu-shift)));
  display: grid; gap: 2px; min-width: 168px; padding: 6px; margin: 0;
  border-radius: 12px; border: 1px solid #E1E3E8; background: #FFFFFF;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
  font-family: inherit;
}
.axolt-theme-switch .axolt-theme-menu[hidden] { display: none; }
.axolt-theme-switch .axolt-theme-menu::before { /* hover bridge across the 8px gap */
  content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}
@media (prefers-reduced-motion: no-preference) {
  .axolt-theme-switch .axolt-theme-menu:not([hidden]) { animation: axolt-menu-in .14s ease-out; }
  @keyframes axolt-menu-in {
    from { opacity: 0; transform: translateX(calc(-50% + var(--axolt-menu-shift))) translateY(-4px); }
    to   { opacity: 1; transform: translateX(calc(-50% + var(--axolt-menu-shift))) translateY(0); }
  }
}

.axolt-theme-switch .axolt-theme-option {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  color: #1F2328; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; font-style: normal; text-align: left;
  text-transform: none; letter-spacing: normal; white-space: nowrap; cursor: pointer;
}
.axolt-theme-switch .axolt-theme-option svg { flex: 0 0 auto; display: block; }
.axolt-theme-switch .axolt-theme-option:hover,
.axolt-theme-switch .axolt-theme-option:focus-visible { background: #F1F2F4; outline: none; }
.axolt-theme-switch .axolt-theme-option[aria-checked="true"] { color: #C31C23; }
.axolt-theme-switch .axolt-ts-check { margin-left: auto; visibility: hidden; }
.axolt-theme-switch .axolt-theme-option[aria-checked="true"] .axolt-ts-check { visibility: visible; }

html[data-theme="dark"] .axolt-theme-switch .axolt-theme-menu {
  border-color: #2A3042; background: #151925;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .axolt-theme-switch .axolt-theme-option { color: #E7E9F2; }
html[data-theme="dark"] .axolt-theme-switch .axolt-theme-option:hover,
html[data-theme="dark"] .axolt-theme-switch .axolt-theme-option:focus-visible { background: #1F2433; }
html[data-theme="dark"] .axolt-theme-switch .axolt-theme-option[aria-checked="true"] { color: #FF6B71; }

@media (max-width: 1199px) { .axolt-theme-switch .axolt-theme-toggle--header { width: 38px; height: 38px; } }
@media (max-width: 380px)  { .axolt-theme-switch .axolt-theme-toggle--header { width: 34px; height: 34px; } }

/* Header "Book a demo": navy pill disappears on a dark header -> brand red */
html[data-theme="dark"] .elementor .mm2-header .mm2-cta > a { background-color: #C31C23; border-color: #C31C23; color: #FFFFFF; }
html[data-theme="dark"] .elementor .mm2-header .mm2-cta > a:hover,
html[data-theme="dark"] .elementor .mm2-header .mm2-cta > a:focus-visible { background-color: #DB3A41; border-color: #DB3A41; }

@media (prefers-reduced-motion: no-preference) {
  html.axolt-theme-anim, html.axolt-theme-anim * { transition: background-color .2s ease, color .2s ease, border-color .2s ease !important; }
}
