#doktorland-theme-toggle {
  position: fixed;
  top: max(116px, calc(env(safe-area-inset-top) + 104px));
  left: max(14px, env(safe-area-inset-left));
  z-index: 1001;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d9c4ed;
  border-radius: 50%;
  background: #fff;
  color: #55079d;
  box-shadow: 0 3px 14px #24103926;
  cursor: pointer;
}

#doktorland-theme-toggle:hover { background: #f4eafd; }
#doktorland-theme-toggle:focus-visible { outline: 3px solid #9655cf; outline-offset: 3px; }
#doktorland-theme-toggle svg { width: 22px; height: 22px; }
#doktorland-theme-toggle .dl-theme-sun,
#doktorland-theme-toggle[aria-pressed="true"] .dl-theme-moon { display: none; }
#doktorland-theme-toggle[aria-pressed="true"] .dl-theme-sun { display: block; }

@media (max-width: 767px) {
  #doktorland-theme-toggle {
    top: auto;
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
    left: max(12px, env(safe-area-inset-left));
  }

  .single-product #doktorland-theme-toggle {
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px));
  }
}

@media print {
  #doktorland-theme-toggle { display: none; }
}

@media screen {
  html[data-doktorland-theme="dark"] {
    color-scheme: dark;
    --dl-bg: #15111e;
    --dl-surface: #211a2d;
    --dl-raised: #2c213a;
    --dl-line: #514263;
    --dl-ink: #f7efff;
    --dl-muted: #d0c2dd;
    --dl-link: #d9b6ff;
    --dl-gold: #ffd365;
    --dl-button: #6830a0;
    --dl-button-hover: #7740ad;
    background: var(--dl-bg);
    color: var(--dl-ink);
  }

  [data-doktorland-theme="dark"] body {
    background-color: var(--dl-bg) !important;
    color: var(--dl-ink);
    --e-global-color-text: var(--dl-ink);
    --e-global-color-af05961: var(--dl-line);
    --e-global-color-e2ef6c3: var(--dl-surface);
    --e-global-color-dfa917b: var(--dl-ink);
    --e-global-color-66d9fd4: var(--dl-muted);
  }

  [data-doktorland-theme="dark"] #doktorland-theme-toggle {
    background: var(--dl-raised);
    border-color: var(--dl-line);
    color: var(--dl-gold);
  }
  [data-doktorland-theme="dark"] #doktorland-theme-toggle:hover { background: #39294c; }
  [data-doktorland-theme="dark"] #doktorland-theme-toggle:focus-visible { outline-color: var(--dl-gold); }

  [data-doktorland-theme="dark"] :is(.elementor-location-header, .elementor-location-footer) {
    background-color: var(--dl-surface);
    color: var(--dl-ink);
  }

  [data-doktorland-theme="dark"] :is(
    .elementor-location-header .elementor-nav-menu--dropdown,
    .elementor-menu-cart__main, .slide-modal-panel, .account-submenu,
    .spwp-modal-content, .spwp-results-container, .log__outPP-modal,
    .woocommerce-cart-form, .woocommerce .cart_totals, .woocommerce #payment,
    .woocommerce #payment div.payment_box, .wc-block-components-sidebar,
    .sfp-panel, .sfp-filter-box, .sfp-card, .sfp-skeleton__card,
    .msotp__card, .msotp-popup__panel, .msotp__choice-panel,
    .faq-item, .faq-answer, .product-qa-container, .product-answer-result, .drl-comment-login,
    .drl-article-hero, .drl-article-paper, .drl-article-summary, .drl-article-toc, .drl-article-promo,
    .drl-vote-card, .drl-article-discussion, .drl-comments-empty,
    .woocommerce #reviews #comments ol.commentlist li .comment-text, .logged-in-as,
    .full-comparison-table, .toggle-details-btn
  ) {
    background: var(--dl-surface) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink);
  }

  [data-doktorland-theme="dark"] :is(.sfp-shop, .drl-article, .msotp:not(.msotp-popup .msotp)) {
    background-color: var(--dl-bg) !important;
    color: var(--dl-ink);
  }

  [data-doktorland-theme="dark"] :is(
    .sfp-chip, .sfp-tabs__btn, .sfp-mobile-toggle, .sfp-skeleton__image, .sfp-skeleton__line,
    .drl-ref-cell, .drl-ref-action, .drl-article-meta, .drl-article-category,
    .full-comparison-table th, .full-comparison-table .feature-name,
    .product-extra-fields-table th, .product-extra-fields-table td,
    .woocommerce table.shop_table th, .woocommerce .woocommerce-info, .woocommerce .woocommerce-message
  ) {
    background: var(--dl-raised) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink) !important;
  }

  [data-doktorland-theme="dark"] :is(.sfp-chip, .sfp-tabs__btn):is(:hover, .is-active, .active, [aria-pressed="true"], [aria-selected="true"]) {
    background: var(--dl-button) !important;
    color: #fff !important;
  }

  [data-doktorland-theme="dark"] :is(
    .elementor-heading-title, .elementor-icon-box-title, .elementor-icon-box-description,
    .elementor-widget-text-editor, .elementor-widget-theme-post-content,
    .elementor-location-header .elementor-item, .elementor-location-header .elementor-sub-item,
    .slide-modal-btn, .slide-modal-close, .submenu-item, .spwp-modal-title, .spwp-modal-close,
    .e-n-accordion-item-title, .e-n-accordion-item-title-text,
    .sfp-card__title, .sfp-card__title a, .sfp-filter-label,
    .faq-question, .faq-answer, .msotp__title, .msotp__toggle-pass,
    .drl-article-title, .drl-article-copy :is(p, li, h2, h3, h4),
    .drl-summary-heading, .drl-comments-heading, .drl-related-title,
    .elementor-menu-cart__subtotal, .elementor-menu-cart__product-name a,
    .woocommerce table.shop_table, .woocommerce label, .gform-field-label, .gform_title,
    .entry-title, .coursetitle-loop, .coursetitle-loop a
  ) { color: var(--dl-ink) !important; }

  [data-doktorland-theme="dark"] :is(
    .drl-summary-text, .drl-ref-label, .drl-vote-copy, .drl-vote-stats,
    .sfp-result-count, .msotp__subtitle, .msotp__choice-note,
    .woocommerce-product-details__short-description, .gfield_description
  ) { color: var(--dl-muted) !important; }

  [data-doktorland-theme="dark"] :is(
    .drl-article-copy a, .drl-article-toc a, .drl-comment-login-link,
    .drl-article .post-to-pdf-button, .drl-article-category a, .drl-comment-login a,
    .msotp__link, .msotp__resend, .sfp-reset, .woocommerce-breadcrumb a
  ) { color: var(--dl-link) !important; }

  [data-doktorland-theme="dark"] :is(
    input:not([type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="range"], [type="checkbox"], [type="radio"], [type="color"]),
    textarea, select, .select2-dropdown, .select2-container .select2-selection--single
  ) {
    background-color: var(--dl-bg) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink) !important;
  }

  [data-doktorland-theme="dark"] :is(input, textarea)::placeholder {
    color: var(--dl-muted) !important;
    opacity: 1;
  }
  [data-doktorland-theme="dark"] :is(input, textarea, select):focus-visible {
    outline: 2px solid var(--dl-link);
    outline-offset: 2px;
  }
  [data-doktorland-theme="dark"] .select2-container .select2-selection__rendered { color: var(--dl-ink) !important; }

  [data-doktorland-theme="dark"] :is(
    .sfp-card__btn, .msotp__btn--primary, .gform_button,
    .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
    .elementor-menu-cart__footer-buttons .elementor-button
  ) {
    background: var(--dl-button) !important;
    border-color: var(--dl-line) !important;
    color: #fff !important;
  }
  [data-doktorland-theme="dark"] :is(
    .sfp-card__btn, .msotp__btn--primary, .gform_button,
    .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
    .elementor-menu-cart__footer-buttons .elementor-button
  ):hover { background: var(--dl-button-hover) !important; }

  [data-doktorland-theme="dark"] .woocommerce .woocommerce-error {
    background: #442334 !important;
    border-color: #a95b79 !important;
    color: #ffe3eb !important;
  }

  [data-doktorland-theme="dark"] .footer-2025 {
    --primary-light: var(--dl-raised);
    --bg-light: var(--dl-surface);
    --bg-white: var(--dl-raised);
    --text: var(--dl-ink);
    --text-light: var(--dl-muted);
    color: var(--dl-muted);
  }
  [data-doktorland-theme="dark"] .footer-wave { background: var(--dl-bg); }
  [data-doktorland-theme="dark"] .elementor-location-footer :is(.footer-title, a:not(.elementor-button, .elementor-social-icon)) {
    color: var(--dl-muted) !important;
  }
}

@media screen {
  /* These published Elementor containers use light background colors directly. */
  [data-doktorland-theme="dark"] .e-con:is(
    .elementor-element-c8c5f4b, .elementor-element-2aa5ac2, .elementor-element-4d37b04,
    .elementor-element-fc93b5d, .elementor-element-6a3c2cb, .elementor-element-dc2ae7e,
    .elementor-element-36dc81e, .elementor-element-bc74e95, .elementor-element-4291bb8,
    .elementor-element-6cfb05d, .elementor-element-6ae085a, .elementor-element-159fab5,
    .elementor-element-fc79132, .elementor-element-2f6c4fd, .elementor-element-3023a49,
    .elementor-element-5e9ebed, .elementor-element-612e49c, .elementor-element-0de9650,
    .elementor-element-9124611, .elementor-element-dd3724d, .elementor-element-b0302d1,
    .elementor-element-72ffe79, .elementor-element-63c6695, .elementor-element-45e88f3
  ) { background-color: var(--dl-surface) !important; }

  [data-doktorland-theme="dark"] .elementor-element-5d549ac.e-con {
    background-image: linear-gradient(180deg, var(--dl-surface) 86%, var(--dl-bg)) !important;
  }

  [data-doktorland-theme="dark"] :is(
    .elementor-element-f78f8f1, .elementor-element-98eec47, .elementor-element-3f62834,
    .elementor-element-787312a .elementor-button, .elementor-element-e1e6d2d .elementor-button,
    .woo-feature-badge, .dl-course-syllabus, .dl-course-syllabus details,
    .wc-block-components-notice-banner, .woocommerce .woocommerce-customer-details address
  ) {
    background: var(--dl-surface) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink) !important;
  }

  [data-doktorland-theme="dark"] :is(
    .elementor-element-f15aef4 .elementor-button, .elementor-element-20fb404 .elementor-button,
    .dl-course-syllabus summary,
    .dl-course-syllabus h2, .dl-course-syllabus p, .dl-course-syllabus li,
    .dl-course-syllabus summary span, .dl-course-syllabus details div,
    .dl-course-syllabus details div > span, .title__bot__img h3,
    .sfp-card__price, .woocommerce .woocommerce-Price-amount,
    .drl-article-copy strong, .drl-article-copy blockquote,
    .msotp__switch-btn, .msotp__back, .woocommerce #review_form #respond label
  ) {
    border-color: var(--dl-line) !important;
    color: var(--dl-ink) !important;
  }

  [data-doktorland-theme="dark"] :is(.sfp-card__price ins, .course-price ins, .drl-meta-rating-value) {
    color: var(--dl-gold);
  }

  [data-doktorland-theme="dark"] :is(.drl-article, .drl-article-paper) {
    --drl-brand: var(--dl-link);
    --drl-soft: var(--dl-raised);
    --drl-line: var(--dl-line);
  }

  [data-doktorland-theme="dark"] :is(
    .home .dlt-host, .home .dlt-host .dlt-visual, .home .dlt-host .dlt-text,
    .home .elementor-element-581164a .elementor-heading-title,
    .home .elementor-element-bb7a710 .elementor-heading-title p,
    .home .elementor-element-dcaeb00 .elementor-heading-title,
    .home .elementor-element-dcaeb00 .elementor-widget-heading h3.elementor-heading-title,
    .home .elementor-element-dcaeb00 .elementor-icon-list-text,
    .drland-shop-guide :is(h2, h3), .dl5-start, .dl5-end
  ) { color: var(--dl-ink) !important; }

  [data-doktorland-theme="dark"] :is(.wc-account-btn, .elementor-menu-cart__toggle_button) {
    background-color: var(--dl-raised) !important;
    border-color: var(--dl-line) !important;
    color: var(--dl-ink) !important;
  }

  [data-doktorland-theme="dark"] .elementor-location-header :is(
    .elementor-item-active, .elementor-item:hover, .elementor-sub-item:hover
  ) { color: var(--dl-link) !important; }
}

@media screen {
  /* Home page consultation plans and educational video carousel. */
  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e > .e-con {
    --dl-plan-accent: #d9b6ff;
    --dl-plan-tint: #322346;
    --dl-plan-border: #67527e;
    background-image: linear-gradient(120deg, var(--dl-surface), var(--dl-plan-tint), var(--dl-bg)) !important;
    background-color: var(--dl-surface) !important;
    border-color: var(--dl-plan-border) !important;
    box-shadow: 0 12px 30px #0c081780 !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e > .elementor-element-c4bc1fc {
    --dl-plan-accent: var(--dl-gold);
    --dl-plan-tint: #473520;
    --dl-plan-border: #8c6937;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e > .elementor-element-fe69ff1 {
    --dl-plan-accent: #ffd1a0;
    --dl-plan-tint: #402b33;
    --dl-plan-border: #795464;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e :is(
    .elementor-element-40cc084, .elementor-element-1f99039, .elementor-element-4966104
  ) .elementor-heading-title {
    background: var(--dl-bg) !important;
    border-color: var(--dl-plan-border) !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e ins,
  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e ins .amount {
    color: var(--dl-plan-accent) !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e del,
  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e del .amount {
    color: var(--dl-muted) !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e .elementor-icon-list-item::after {
    border-color: var(--dl-plan-border) !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e .elementor-button,
  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-3a9f7e4 .elementor-button {
    background: var(--dl-raised) !important;
    border-color: var(--dl-plan-border, var(--dl-line)) !important;
    color: var(--dl-plan-accent, var(--dl-ink)) !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e .elementor-element-c4bc1fc .elementor-button {
    background: var(--dl-gold) !important;
    border-color: var(--dl-gold) !important;
    color: #241728 !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-ba9667e .elementor-button:hover,
  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-3a9f7e4 .elementor-button:hover {
    box-shadow: 0 0 0 2px var(--dl-plan-accent, var(--dl-link));
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-3a9f7e4 {
    background: linear-gradient(180deg, var(--dl-raised), var(--dl-bg)) !important;
  }

  html[data-doktorland-theme="dark"] body.home .elementor-5719 .elementor-element-3a9f7e4 .elementor-element-0478e6a {
    border-color: var(--dl-line) !important;
  }
}
