:root { --ddm-transition: 320ms; }

html, body { transition: background-color var(--ddm-transition) ease, color var(--ddm-transition) ease; }
html.ddm-dark { background: var(--ddm-bg) !important; color-scheme: dark; }
html.ddm-dark::before { content:""; position:fixed; inset:0; background:var(--ddm-bg); z-index:-1; pointer-events:none; }
html.ddm-dark body {
  background: var(--ddm-bg) !important;
  color: var(--ddm-text) !important;
  color-scheme: dark;
}

/* Elementor / common WordPress page wrappers. These intentionally target wrappers,
   not every widget, so card and component surfaces can keep their own dark color. */
html.ddm-dark body > #page,
html.ddm-dark #page > main,
html.ddm-dark main,
html.ddm-dark .site,
html.ddm-dark .site-content,
html.ddm-dark .content-area,
html.ddm-dark .elementor-location-header,
html.ddm-dark .elementor-location-footer,
html.ddm-dark .elementor-location-single,
html.ddm-dark .elementor-location-archive,
html.ddm-dark .elementor-location-page,
html.ddm-dark [data-elementor-type="wp-header"],
html.ddm-dark [data-elementor-type="wp-footer"],
html.ddm-dark [data-elementor-type="wp-page"],
html.ddm-dark [data-elementor-type="wp-post"],
html.ddm-dark [data-elementor-type="archive"],
html.ddm-dark [data-elementor-type="single-post"] {
  background-color: var(--ddm-bg) !important;
  color: var(--ddm-text) !important;
  transition: background-color var(--ddm-transition) ease, color var(--ddm-transition) ease;
}

html.ddm-dark .elementor-section,
html.ddm-dark .elementor-container,
html.ddm-dark .elementor-column,
html.ddm-dark .e-con,
html.ddm-dark .e-con-inner,
html.ddm-dark .elementor-element.e-con {
  border-color: var(--ddm-border) !important;
  transition: background-color var(--ddm-transition) ease, color var(--ddm-transition) ease, border-color var(--ddm-transition) ease;
}

html.ddm-dark h1, html.ddm-dark h2, html.ddm-dark h3,
html.ddm-dark h4, html.ddm-dark h5, html.ddm-dark h6,
html.ddm-dark .elementor-heading-title { color: var(--ddm-heading) !important; }
html.ddm-dark p, html.ddm-dark li, html.ddm-dark label,
html.ddm-dark small { color: var(--ddm-text); }
html.ddm-dark blockquote { color: var(--ddm-heading) !important; }
html.ddm-dark blockquote p,
html.ddm-dark blockquote li,
html.ddm-dark blockquote b,
html.ddm-dark blockquote em,
html.ddm-dark blockquote span { color: inherit !important; }
html.ddm-dark blockquote strong { color: #000000 !important; }
html.ddm-dark .ddm-muted { color: var(--ddm-muted) !important; }
html.ddm-dark a { color: var(--ddm-link) !important; }
html.ddm-dark a:hover, html.ddm-dark a:focus { color: var(--ddm-link-hover) !important; }

html.ddm-dark button:not(.ddm-switch),
html.ddm-dark input[type="button"],
html.ddm-dark input[type="submit"],
html.ddm-dark input[type="reset"],
html.ddm-dark .elementor-button {
  --ddm-text: var(--ddm-button-text) !important;
  --ddm-link: var(--ddm-button-text) !important;
  background-color: var(--ddm-button-bg) !important;
  color: var(--ddm-button-text) !important;
  border-color: var(--ddm-border) !important;
}

html.ddm-dark input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
html.ddm-dark select {
  background-color: var(--ddm-input-bg) !important;
  color: var(--ddm-input-text) !important;
  border-color: #3d3d3d !important;
}

html.ddm-dark textarea {
  background-color: var(--ddm-input-bg) !important;
  color: var(--ddm-input-text) !important;
  border-color: #3d3d3d !important;
}

html.ddm-dark input::placeholder,
html.ddm-dark textarea::placeholder {
  color: var(--ddm-input-text) !important;
  opacity: .72;
}

html.ddm-dark .ddm-preserve,
html.ddm-dark .ddm-preserve * { color: inherit !important; background: inherit !important; filter: none !important; }

/* Switch shell */
.ddm-floating { position: fixed; z-index: 2147483000; margin: 0; isolation: isolate; }
.ddm-floating--bottom-right { right: 24px; bottom: 24px; }
.ddm-floating--bottom-left { left: 24px; bottom: 24px; }
.ddm-floating--top-right { right: 24px; top: 24px; }
.ddm-floating--top-left { left: 24px; top: 24px; }

.ddm-switch {
  --s-bg: rgba(255,255,255,.78);
  --s-text: #101828;
  --s-accent: #111827;
  --s-accent-2: #4f46e5;
  --s-shadow: 0 14px 38px rgba(15,23,42,.16), 0 3px 9px rgba(15,23,42,.10);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 62px;
  height: 48px;
  padding: 5px 7px;
  border: 1px solid rgba(16,24,40,.10) !important;
  border-radius: 999px;
  background: var(--s-bg) !important;
  color: var(--s-text) !important;
  box-shadow: var(--s-shadow);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  cursor: pointer;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .36s cubic-bezier(.2,.75,.2,1), box-shadow .36s ease, background-color .36s ease, border-color .36s ease;
}
.ddm-switch:hover { transform: translateY(-2px) scale(1.018); box-shadow: 0 18px 45px rgba(15,23,42,.19), 0 4px 12px rgba(15,23,42,.12); }
.ddm-switch:active { transform: translateY(0) scale(.97); }
.ddm-switch:focus-visible { outline: 3px solid rgba(79,70,229,.25); outline-offset: 4px; }
.ddm-switch__glow, .ddm-switch__decor { position:absolute; pointer-events:none; }
.ddm-switch__glow { width: 90px; height: 90px; border-radius: 50%; left: -18px; top: -22px; background: radial-gradient(circle, rgba(255,214,102,.48), transparent 64%); opacity: .72; transition: all .45s ease; }
.ddm-switch__decor { inset: 0; background: linear-gradient(110deg, rgba(255,255,255,.35), transparent 40%, rgba(255,255,255,.12)); opacity: .9; }
.ddm-switch__icon { position:relative; z-index:3; display:flex; width:18px; height:18px; align-items:center; justify-content:center; flex:0 0 auto; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .4s ease; }
.ddm-switch__icon svg { width:100%; height:100%; fill:currentColor; }
.ddm-switch__track { position:relative; z-index:2; display:block; width:39px; height:25px; border-radius:999px; background:rgba(15,23,42,.10); box-shadow:inset 0 1px 2px rgba(15,23,42,.12); flex:0 0 auto; transition:background .4s ease; }
.ddm-switch__knob { position:absolute; top:3px; left:3px; width:19px; height:19px; border-radius:50%; background:#fff; box-shadow:0 3px 8px rgba(15,23,42,.22); transition:transform .45s cubic-bezier(.18,.8,.2,1), background .4s ease, box-shadow .4s ease; }
.ddm-switch.is-active .ddm-switch__knob { transform:translateX(14px); background:#e8eefc; }
.ddm-switch__label { position:relative; z-index:3; font-size:13px; font-weight:700; line-height:1; letter-spacing:-.01em; }
.ddm-switch.is-active .ddm-switch__sun { transform:rotate(55deg) scale(.72); opacity:.22; }
.ddm-switch.is-active .ddm-switch__moon { transform:rotate(-8deg) scale(1.05); opacity:1; }
.ddm-switch__moon { opacity:.25; }
.ddm-switch:not(.is-active) .ddm-switch__sun { opacity:1; }
.ddm-switch:not(.is-active) .ddm-switch__moon { opacity:.18; }

/* Glass: clean premium capsule */
.ddm-switch--glass { width:100px; }
.ddm-switch--glass.is-active { --s-bg: rgba(15,23,42,.94); --s-text:#fff; --s-accent:#dbeafe; --s-shadow:0 16px 42px rgba(2,6,23,.34), 0 0 0 1px rgba(129,140,248,.18), 0 0 30px rgba(99,102,241,.12); border-color:rgba(255,255,255,.10) !important; }
.ddm-switch--glass.is-active .ddm-switch__track { background:rgba(129,140,248,.23); }
.ddm-switch--glass.is-active .ddm-switch__glow { left:48px; background:radial-gradient(circle, rgba(129,140,248,.36), transparent 66%); }

/* Orbital: celestial sun/moon movement */
.ddm-switch--orbital { width:58px; height:58px; min-width:58px; padding:0; border-radius:50%; }
.ddm-switch--orbital .ddm-switch__track { position:absolute; inset:5px; width:auto; height:auto; background:radial-gradient(circle at 30% 30%, #fff5c7 0 8%, #f5c84b 9% 26%, rgba(245,200,75,.18) 27% 100%); box-shadow:inset 0 0 20px rgba(255,255,255,.35); }
.ddm-switch--orbital .ddm-switch__knob { top:12px; left:11px; width:26px; height:26px; background:#fff3bf; box-shadow:0 0 0 5px rgba(255,214,102,.13), 0 0 25px rgba(255,193,7,.45); }
.ddm-switch--orbital .ddm-switch__sun { position:absolute; right:8px; top:8px; }
.ddm-switch--orbital .ddm-switch__moon { position:absolute; left:8px; bottom:8px; }
.ddm-switch--orbital.is-active { --s-bg:#09111f; border-color:rgba(129,140,248,.25) !important; box-shadow:0 14px 40px rgba(2,6,23,.34), 0 0 28px rgba(99,102,241,.22); }
.ddm-switch--orbital.is-active .ddm-switch__track { background:radial-gradient(circle at 68% 28%, #eef4ff 0 8%, #b8c8ec 9% 27%, rgba(96,165,250,.16) 28% 100%); }
.ddm-switch--orbital.is-active .ddm-switch__knob { transform:translate(16px,0); background:#e8efff; box-shadow:0 0 0 5px rgba(147,197,253,.10), 0 0 27px rgba(96,165,250,.62); }
.ddm-switch--orbital .ddm-switch__label { display:none; }

/* Aurora: glow + rotating gradient atmosphere */
.ddm-switch--aurora { width:104px; border-color:rgba(255,255,255,.22) !important; }
.ddm-switch--aurora::before { content:""; position:absolute; inset:-30%; background:conic-gradient(from 0deg, #f8d66d, #ff9ecb, #a7c7ff, #9d8cff, #f8d66d); filter:blur(20px); opacity:.45; animation:ddm-spin 8s linear infinite; }
.ddm-switch--aurora.is-active { --s-bg:#0c1020; --s-text:#fff; border-color:rgba(167,139,250,.35) !important; box-shadow:0 16px 42px rgba(2,6,23,.38), 0 0 36px rgba(129,140,248,.26); }
.ddm-switch--aurora .ddm-switch__track { background:rgba(255,255,255,.14); }
.ddm-switch--aurora.is-active .ddm-switch__track { background:rgba(129,140,248,.25); }
.ddm-switch--aurora.is-active .ddm-switch__knob { box-shadow:0 0 18px rgba(139,92,246,.8); }

/* Morph: distinctive blob-like active state */
.ddm-switch--morph { width:88px; border-radius:22px; }
.ddm-switch--morph .ddm-switch__track { width:29px; height:29px; background:linear-gradient(145deg,#f7cc56,#f08b59); box-shadow:0 5px 15px rgba(240,139,89,.25); }
.ddm-switch--morph .ddm-switch__knob { inset:6px; width:17px; height:17px; background:#fff7e9; }
.ddm-switch--morph.is-active { --s-bg:#10172a; --s-text:#fff; border-radius:999px; box-shadow:0 14px 40px rgba(2,6,23,.32), 0 0 24px rgba(96,165,250,.16); }
.ddm-switch--morph.is-active .ddm-switch__track { background:linear-gradient(145deg,#6d6ff6,#38bdf8); transform:rotate(45deg); }
.ddm-switch--morph.is-active .ddm-switch__knob { transform:rotate(-45deg) scale(.82); background:#eef2ff; box-shadow:0 0 16px rgba(125,211,252,.55); }

/* iOS: understated, polished */
.ddm-switch--ios { width:62px; min-width:62px; height:34px; padding:3px; background:#d8dde7 !important; border:0 !important; box-shadow:inset 0 1px 2px rgba(0,0,0,.15), 0 5px 18px rgba(15,23,42,.13); }
.ddm-switch--ios .ddm-switch__track { position:absolute; inset:3px; width:auto; height:auto; background:transparent; box-shadow:none; }
.ddm-switch--ios .ddm-switch__knob { top:0; left:0; width:28px; height:28px; box-shadow:0 2px 6px rgba(15,23,42,.20); }
.ddm-switch--ios .ddm-switch__sun { position:absolute; left:9px; font-size:12px; color:#7a8497; z-index:4; }
.ddm-switch--ios .ddm-switch__moon { position:absolute; right:9px; font-size:12px; color:#bfc7d8; z-index:4; }
.ddm-switch--ios.is-active { --s-bg:#30384a; box-shadow:inset 0 1px 2px rgba(0,0,0,.25), 0 8px 20px rgba(2,6,23,.26); }
.ddm-switch--ios.is-active .ddm-switch__knob { transform:translateX(28px); background:#fff; }
.ddm-switch--ios .ddm-switch__label { display:none; }

/* Icon: no chrome, only an elegant animated icon */
.ddm-switch--icon { width:42px; min-width:42px; height:42px; padding:0; background:transparent !important; border:0 !important; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.ddm-switch--icon .ddm-switch__track { display:none; }
.ddm-switch--icon .ddm-switch__icon { position:absolute; width:23px; height:23px; }
.ddm-switch--icon .ddm-switch__sun { opacity:1; transform:rotate(0) scale(1); color:#f59e0b; }
.ddm-switch--icon .ddm-switch__moon { opacity:0; transform:rotate(65deg) scale(.55); color:#c4b5fd; }
.ddm-switch--icon.is-active .ddm-switch__sun { opacity:0; transform:rotate(-75deg) scale(.55); }
.ddm-switch--icon.is-active .ddm-switch__moon { opacity:1; transform:rotate(0) scale(1); filter:drop-shadow(0 0 10px rgba(196,181,253,.65)); }
.ddm-switch--icon .ddm-switch__label { display:none; }

@keyframes ddm-spin { to { transform:rotate(360deg); } }

@media (max-width:767px) {
  .ddm-floating--bottom-right { right:14px; bottom:14px; }
  .ddm-floating--bottom-left { left:14px; bottom:14px; }
  .ddm-floating--top-right { right:14px; top:14px; }
  .ddm-floating--top-left { left:14px; top:14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ddm-switch, .ddm-switch *, html, body { transition:none !important; animation:none !important; }
}
