/* =========================================================
   MELQ preferences menu + dark theme polish
   Light mode keeps the existing template palette.
   ========================================================= */

:root {
  --melq-theme-page: #ffffff;
  --melq-theme-card: #ffffff;
  --melq-theme-card-2: #f5f7fb;
  --melq-theme-line: #e7ebf2;
  --melq-theme-line-strong: #d7deea;
  --melq-theme-text: #101a3a;
  --melq-theme-muted: #697386;
  --melq-theme-icon: #243b73;
  --melq-theme-shadow: rgba(16, 26, 58, 0.12);
  --melq-theme-control: #ffffff;
  --melq-theme-control-hover: #f5f8ff;

  /* Exact light-mode values from the original template. */
  --melq-surface-base: #ffffff;
  --melq-surface-muted: #f1f2f3;
  --melq-surface-soft: #f0f1f1;
  --melq-surface-soft-alt: #f2f3f3;
  --melq-surface-subtle: #f4f4f4;
  --melq-surface-elevated: #f6f8fa;
  --melq-surface-elevated-2: #f5f7f9;
  --melq-surface-neutral: #eeeeee;
  --melq-surface-warm-1: #fdf3eb;
  --melq-surface-warm-2: #f1e7e0;
  --melq-surface-warm-3: #fbe6d7;
  --melq-surface-warm-4: #f3e9e1;
  --melq-surface-warm-5: #fef3ec;
  --melq-border-gray-1: #e8e8e8;
  --melq-border-gray-2: #dddddd;
  --melq-border-gray-3: #e7e7e7;
  --melq-border-gray-4: #cecfd0;
  --melq-border-gray-5: #e9e9ea;
  --melq-border-gray-6: #eaebeb;
  --melq-border-gray-7: #dddbdb;
}

html,
body {
  transition:
    background-color 0.24s ease,
    color 0.24s ease;
}

/* =========================================================
   Navbar action area
   Keep the original light navbar untouched. Only reserve
   a little breathing room for the new preferences control.
   ========================================================= */
.homepage2-body .vl-main-menu.menu2 > .melq-preferences {
  margin-inline-start: 2px;
}

.homepage3-body .vl-transparent-header .vl-hero-btn > .melq-preferences,
.homepage4-body .vl-transparent-header .vl-hero-btn > .melq-preferences {
  margin-inline-end: 10px;
}

/* =========================================================
   One compact preferences icon
   ========================================================= */
.melq-preferences {
  position: relative;
  z-index: 140;
  display: inline-flex;
  flex: 0 0 auto;
}

.melq-preferences__trigger {
  position: relative;
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  border: 1px solid rgba(36, 59, 115, 0.14);
  border-radius: 50%;
  background: #ffffff;
  color: #1c4fa8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 26, 58, 0.1);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

.melq-preferences__trigger::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 28%,
    rgba(80, 148, 255, 0.16),
    rgba(37, 93, 204, 0.04) 58%,
    transparent 72%
  );
  pointer-events: none;
}

.melq-preferences__trigger::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: linear-gradient(
      145deg,
      rgba(72, 137, 255, 0.55),
      rgba(17, 57, 137, 0.08),
      rgba(72, 137, 255, 0.28)
    )
    border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.48;
  pointer-events: none;
}

.melq-preferences__trigger-icon {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.melq-preferences__trigger-icon svg {
  width: 25px;
  height: 25px;
  display: block;
  overflow: visible;
}

.melq-preferences__trigger-icon .melq-pref-orbit,
.melq-preferences__trigger-icon .melq-pref-meridian,
.melq-preferences__trigger-icon .melq-pref-equator {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.melq-preferences__trigger-icon .melq-pref-spark {
  fill: #4d8eff;
  stroke: #ffffff;
  stroke-width: 0.8;
}

.melq-preferences__trigger:hover,
.melq-preferences.is-open .melq-preferences__trigger {
  transform: translateY(-2px);
  color: #ffffff;
  border-color: rgba(59, 120, 235, 0.44);
  background: linear-gradient(145deg, #3d82f5 0%, #245dcc 58%, #163b87 100%);
  box-shadow: 0 13px 30px rgba(30, 79, 171, 0.25);
}

.melq-preferences__trigger:hover::before,
.melq-preferences.is-open .melq-preferences__trigger::before {
  background: radial-gradient(
    circle at 32% 28%,
    rgba(255, 255, 255, 0.24),
    rgba(255, 255, 255, 0.04) 62%,
    transparent 72%
  );
}

.melq-preferences__trigger:hover .melq-pref-spark,
.melq-preferences.is-open .melq-pref-spark {
  fill: #9cc5ff;
}

.melq-preferences__trigger:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(52, 111, 232, 0.14),
    0 12px 28px rgba(16, 26, 58, 0.14);
}

.melq-preferences__menu {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-end: 0;
  width: 274px;
  padding: 10px;
  border: 1px solid var(--melq-theme-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--melq-theme-text);
  box-shadow: 0 24px 60px rgba(16, 26, 58, 0.18);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

html[dir="rtl"] .melq-preferences__menu {
  transform-origin: top left;
}

.melq-preferences.is-open .melq-preferences__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.melq-preferences__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 10px;
  text-align: start;
}

.melq-preferences__header-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 11px;
  background: #eef4ff;
  color: #245dcc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.melq-preferences__header strong,
.melq-preferences__language-copy strong,
.melq-preferences__theme-copy strong {
  display: block;
  color: var(--melq-theme-text);
  font-family: var(--ztc-family-font1);
  font-weight: 700;
}

.melq-preferences__header strong {
  font-size: 14px;
  line-height: 18px;
}

.melq-preferences__header small,
.melq-preferences__language-copy small,
.melq-preferences__theme-copy small {
  display: block;
  color: var(--melq-theme-muted);
  font-family: var(--ztc-family-font1);
  font-weight: 500;
}

.melq-preferences__header small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 15px;
}

.melq-preferences__languages {
  display: grid;
  gap: 6px;
}

.melq-preferences__language,
.melq-preferences__theme {
  width: 100%;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--melq-theme-text);
  cursor: pointer;
  display: grid;
  align-items: center;
  text-align: start;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.melq-preferences__language {
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  gap: 10px;
  padding: 8px;
}

.melq-preferences__language:hover,
.melq-preferences__theme:hover {
  background: #f3f6fb;
}

.melq-preferences__language.is-active {
  background: #eef4ff;
}

.melq-preferences__language-badge {
  width: 44px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid #e0e7f3;
  background: #ffffff;
  color: #183f91;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ztc-family-font1);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.melq-preferences__language-copy {
  min-width: 0;
}

.melq-preferences__language-copy strong,
.melq-preferences__theme-copy strong {
  font-size: 13px;
  line-height: 17px;
}

.melq-preferences__language-copy small,
.melq-preferences__theme-copy small {
  margin-top: 1px;
  font-size: 11px;
  line-height: 15px;
}

.melq-preferences__check {
  width: 21px;
  height: 21px;
  border-radius: 999px;
  color: #ffffff;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.melq-preferences__language.is-active .melq-preferences__check {
  background: #3478ef;
}

.melq-preferences__divider {
  height: 1px;
  margin: 8px 7px;
  background: var(--melq-theme-line);
}

.melq-preferences__theme {
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  gap: 10px;
  padding: 8px;
}

.melq-preferences__theme-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff5d8;
  color: #ae7300;
  font-size: 13px;
}

.melq-preferences__theme-switch {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: #dce3ee;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  transition: background-color 0.2s ease;
}

.melq-preferences__theme-switch > span {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(16, 26, 58, 0.18);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.melq-preferences__theme-switch.is-dark {
  background: #3478ef;
}

.melq-preferences__theme-switch.is-dark > span {
  transform: translateX(17px);
}

html[dir="rtl"] .melq-preferences__theme-switch.is-dark > span {
  transform: translateX(-17px);
}

/* Homepage 2 sits over photography before sticky state. */
.homepage2-body .vl-header-area:not(.header-sticky) .melq-preferences__trigger {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(12, 34, 76, 0.22);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(5, 18, 48, 0.12);
  backdrop-filter: blur(14px);
}

.homepage2-body .vl-header-area:not(.header-sticky) .melq-preferences__trigger::before {
  background: rgba(255, 255, 255, 0.05);
}

.homepage2-body .vl-header-area:not(.header-sticky) .melq-preferences__trigger:hover,
.homepage2-body
  .vl-header-area:not(.header-sticky)
  .melq-preferences.is-open
  .melq-preferences__trigger {
  background: rgba(52, 111, 232, 0.92);
  border-color: rgba(255, 255, 255, 0.38);
}

/* =========================================================
   Dark theme tokens
   ========================================================= */
html[data-theme="dark"] {
  --color-melq-primary: #0d1730;
  --color-melq-secondary: #6f9fff;

  --ztc-text-text-1: #ffffff;
  --ztc-text-text-2: #f3f6ff;
  --ztc-text-text-3: #aeb8cd;
  --ztc-text-text-4: #7fa7ff;
  --ztc-text-text-5: #dce7ff;
  --ztc-text-text-7: #dce7ff;
  --ztc-text-text-9: #ffffff;

  --ztc-bg-bg-1: #11192b;
  --ztc-bg-bg-2: #09101f;
  --ztc-bg-bg-3: #3478ef;
  --ztc-bg-bg-4: #0c1425;
  --ztc-bg-bg-8: #3478ef;

  --ztc-border-border-1: #27334d;
  --ztc-border-border-2: #303c56;

  --melq-surface-base: #11192b;
  --melq-surface-muted: #141e32;
  --melq-surface-soft: #10192b;
  --melq-surface-soft-alt: #151f34;
  --melq-surface-subtle: #172238;
  --melq-surface-elevated: #19243a;
  --melq-surface-elevated-2: #162136;
  --melq-surface-neutral: #1a263d;
  --melq-surface-warm-1: #211c22;
  --melq-surface-warm-2: #1f1b21;
  --melq-surface-warm-3: #241c20;
  --melq-surface-warm-4: #211b20;
  --melq-surface-warm-5: #251d1f;

  --melq-border-gray-1: #293650;
  --melq-border-gray-2: #2d3953;
  --melq-border-gray-3: #2a3750;
  --melq-border-gray-4: #34415d;
  --melq-border-gray-5: #2d3953;
  --melq-border-gray-6: #2e3a54;
  --melq-border-gray-7: #303d58;

  --Gray-Color: #151f34;
  --bg-2: #151f34;
  --bg-1: #182238;
  --Main-Secondary: #33415d;
  --vl-heading-color: #f3f6ff;
  --tg-color-white-default: #ffffff;
  --color-black: #f3f6ff;

  --melq-theme-page: #080e1a;
  --melq-theme-card: #11192b;
  --melq-theme-card-2: #151f34;
  --melq-theme-line: #293650;
  --melq-theme-line-strong: #35435f;
  --melq-theme-text: #f3f6ff;
  --melq-theme-muted: #9ba8c1;
  --melq-theme-icon: #dbe7ff;
  --melq-theme-shadow: rgba(0, 0, 0, 0.34);
  --melq-theme-control: #121c30;
  --melq-theme-control-hover: #192640;
}

html[data-theme="dark"] body {
  background: var(--melq-theme-page);
  color: var(--ztc-text-text-3);
}

html[data-theme="dark"] .homepage1-body,
html[data-theme="dark"] .homepage2-body,
html[data-theme="dark"] .homepage3-body,
html[data-theme="dark"] .homepage4-body {
  color: var(--ztc-text-text-3);
}

/* Header + navigation */
html[data-theme="dark"] .homepage1-body .vl-transparent-header,
html[data-theme="dark"] .homepage2-body .vl-transparent-header,
html[data-theme="dark"] .homepage3-body .vl-transparent-header,
html[data-theme="dark"] .homepage4-body .vl-transparent-header,
html[data-theme="dark"] .homepage1-body .header-sticky,
html[data-theme="dark"] .homepage2-body .header-sticky,
html[data-theme="dark"] .homepage3-body .header-sticky,
html[data-theme="dark"] .homepage4-body .header-sticky {
  background: rgba(11, 18, 33, 0.92);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .homepage3-body .row-bg1,
html[data-theme="dark"] .homepage4-body .row-bg1 {
  border-color: rgba(127, 167, 255, 0.12);
}

html[data-theme="dark"] .homepage1-body .vl-main-menu ul > li .sub-menu,
html[data-theme="dark"] .homepage2-body .vl-main-menu ul > li .sub-menu,
html[data-theme="dark"] .homepage3-body .vl-main-menu ul > li .sub-menu,
html[data-theme="dark"] .homepage4-body .vl-main-menu ul > li .sub-menu,
html[data-theme="dark"] .homepage1-body .vl-mega-menu,
html[data-theme="dark"] .homepage2-body .vl-mega-menu,
html[data-theme="dark"] .homepage3-body .vl-mega-menu,
html[data-theme="dark"] .homepage4-body .vl-mega-menu {
  background: #111a2d;
  border-color: rgba(127, 167, 255, 0.12);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .homepage1-body .vl-main-menu ul > li .sub-menu li a,
html[data-theme="dark"] .homepage2-body .vl-main-menu ul > li .sub-menu li a,
html[data-theme="dark"] .homepage3-body .vl-main-menu ul > li .sub-menu li a,
html[data-theme="dark"] .homepage4-body .vl-main-menu ul > li .sub-menu li a,
html[data-theme="dark"] .vl-home-menu a {
  color: #e8eefc;
}

/* Right-side controls */
html[data-theme="dark"] .homepage3-body .header__search > a,
html[data-theme="dark"] .homepage4-body .header__search > a,
html[data-theme="dark"] .btn-area1.dashboard .hamburger_menu,
html[data-theme="dark"] .melq-mobile-nav-actions .vl-offcanvas-toggle,
html[data-theme="dark"] .melq-preferences__trigger {
  border-color: rgba(127, 167, 255, 0.16);
  background: rgba(18, 28, 48, 0.96);
  color: #dce7ff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .melq-preferences__trigger::before {
  background: linear-gradient(145deg, rgba(93, 146, 255, 0.14), rgba(93, 146, 255, 0.03));
}

html[data-theme="dark"] .homepage3-body .header__search > a:hover,
html[data-theme="dark"] .homepage4-body .header__search > a:hover,
html[data-theme="dark"] .btn-area1.dashboard .hamburger_menu:hover,
html[data-theme="dark"] .melq-mobile-nav-actions .vl-offcanvas-toggle:hover,
html[data-theme="dark"] .melq-preferences__trigger:hover,
html[data-theme="dark"] .melq-preferences.is-open .melq-preferences__trigger {
  border-color: rgba(127, 167, 255, 0.34);
  background: linear-gradient(145deg, #285fbf 0%, #173d83 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"]
  .homepage2-body
  .vl-header-area:not(.header-sticky)
  .melq-preferences__trigger {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(10, 18, 34, 0.42);
  color: #ffffff;
}

/* Preferences dropdown */
html[data-theme="dark"] .melq-preferences__menu {
  background: rgba(15, 24, 42, 0.98);
  border-color: #293650;
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.44);
}

html[data-theme="dark"] .melq-preferences__header-icon {
  background: #182744;
  color: #82aaff;
}

html[data-theme="dark"] .melq-preferences__language:hover,
html[data-theme="dark"] .melq-preferences__theme:hover {
  background: #172239;
}

html[data-theme="dark"] .melq-preferences__language.is-active {
  background: #182947;
}

html[data-theme="dark"] .melq-preferences__language-badge {
  border-color: #2d3b57;
  background: #121d31;
  color: #dce7ff;
  box-shadow: none;
}

html[data-theme="dark"] .melq-preferences__theme-icon {
  background: #1a2740;
  color: #9db8f5;
}

html[data-theme="dark"] .melq-preferences__theme-switch {
  background: #34415a;
}

html[data-theme="dark"] .melq-preferences__theme-switch.is-dark {
  background: #3478ef;
}

/* Forms and filter controls */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .nice-select {
  color: #eef3ff;
  border-color: #2b3852;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #8390a8;
  opacity: 1;
}

html[data-theme="dark"] .nice-select,
html[data-theme="dark"] .nice-select .list,
html[data-theme="dark"] .nice-select.open .list {
  background-color: #121c30;
  border-color: #2c3954;
  color: #eef3ff;
}

html[data-theme="dark"] .nice-select .option:hover,
html[data-theme="dark"] .nice-select .option.focus,
html[data-theme="dark"] .nice-select .option.selected.focus {
  background-color: #1b2943;
}

html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="time"] {
  color-scheme: dark;
}

html[data-theme="dark"] input[type="range"]::-webkit-slider-thumb {
  background: #dbe7ff;
}

html[data-theme="dark"] .search-box-cover .wd-search-form,
html[data-theme="dark"] .others-section-area .wd-search-form,
html[data-theme="dark"] .s-properties4 .s-porpeties-video .wd-search-form {
  border-color: #2b3852;
}

html[data-theme="dark"] .search-box-cover .wd-search-form .slider,
html[data-theme="dark"] .others-section-area .wd-search-form .slider,
html[data-theme="dark"] .s-properties4 .s-porpeties-video .wd-search-form .slider {
  background: #33405a;
}

/* Tables and dashboard separators */
html[data-theme="dark"] .dashboard-section-area .dashboad-all-details-section .table-row,
html[data-theme="dark"] .dashboard-section-area .dashboad-all-details-section .pagination-area,
html[data-theme="dark"] .property-other-widget ul,
html[data-theme="dark"] .copyright-area,
html[data-theme="dark"] .footer-time-area {
  border-color: #293650;
}

html[data-theme="dark"] table,
html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border-color: #293650;
}

/* Search overlay and mobile drawer */
html[data-theme="dark"] .header-search-form-wrapper,
html[data-theme="dark"] .search__popup,
html[data-theme="dark"] .vl-offcanvas {
  background: #0b1323;
}

html[data-theme="dark"] .vl-offcanvas,
html[data-theme="dark"] .vl-offcanvas a,
html[data-theme="dark"] .vl-offcanvas button,
html[data-theme="dark"] .vl-offcanvas h1,
html[data-theme="dark"] .vl-offcanvas h2,
html[data-theme="dark"] .vl-offcanvas h3,
html[data-theme="dark"] .vl-offcanvas h4,
html[data-theme="dark"] .vl-offcanvas p {
  color: #eef3ff;
}

html[data-theme="dark"] .header-search-form-wrapper .tx-search-close {
  color: #eef3ff;
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .header-search-form-wrapper .search-submit {
  color: #dce7ff;
}

html[data-theme="dark"] .header-search-form-wrapper .search-form input[type="search"]::placeholder {
  color: #8390a8;
  opacity: 1;
}

/* Fix inline SVG colors used across generated template blocks. */
html[data-theme="dark"] svg path[stroke="#111111"],
html[data-theme="dark"] svg path[stroke="#31353D"],
html[data-theme="dark"] svg path[stroke="#31353d"],
html[data-theme="dark"] svg path[stroke="#424242"] {
  stroke: #dce7ff !important;
}

html[data-theme="dark"] svg path[fill="#424242"] {
  fill: #dce7ff !important;
}

html[data-theme="dark"] .header__search svg path,
html[data-theme="dark"] .search-icon svg path {
  stroke: currentColor !important;
}

/* Cards and elevated areas that still use explicit template wrappers. */
html[data-theme="dark"] .property-boxarea,
html[data-theme="dark"] .property-boxarea2,
html[data-theme="dark"] .property-boxarea3,
html[data-theme="dark"] .property-boxarea4,
html[data-theme="dark"] .pricing-boxarea,
html[data-theme="dark"] .pricing-boxarea2,
html[data-theme="dark"] .testimonial-boxarea,
html[data-theme="dark"] .testimonial-boxarea2,
html[data-theme="dark"] .team-boxarea,
html[data-theme="dark"] .team-boxarea2,
html[data-theme="dark"] .blog-boxarea,
html[data-theme="dark"] .blog-boxarea2,
html[data-theme="dark"] .contact-boxarea,
html[data-theme="dark"] .dashboardboxarea {
  border-color: #293650;
}

html[data-theme="dark"] .dashboard-section-area,
html[data-theme="dark"] .profile-section-area,
html[data-theme="dark"] .add-property-section,
html[data-theme="dark"] .property-inner-section-find,
html[data-theme="dark"] .property-details-section,
html[data-theme="dark"] .blog-inner-section,
html[data-theme="dark"] .contact-inner-section,
html[data-theme="dark"] .faq-inner-section-area,
html[data-theme="dark"] .pricing1,
html[data-theme="dark"] .privacy-policy-area {
  color: var(--ztc-text-text-3);
}

html[data-theme="dark"] .melq-brand-logo {
  filter: brightness(1.14) saturate(1.06) drop-shadow(0 6px 14px rgba(52, 120, 239, 0.15)) !important;
}

html[data-theme="dark"] img,
html[data-theme="dark"] video,
html[data-theme="dark"] iframe {
  color-scheme: normal;
}

/* Keep existing blue branded buttons crisp in dark mode. */
html[data-theme="dark"] .vl-btn1,
html[data-theme="dark"] .vl-btn2,
html[data-theme="dark"] .vl-btn3,
html[data-theme="dark"] .vl-btn4 {
  box-shadow: none;
}

/* Unused standalone theme button remains safe if reused elsewhere. */
.melq-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .melq-preferences__trigger {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
  }
}

@media (max-width: 991.98px) {
  .melq-preferences__trigger {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
  }

  .melq-preferences__trigger-icon,
  .melq-preferences__trigger-icon svg {
    width: 23px;
    height: 23px;
  }

  .melq-preferences__menu {
    width: min(274px, calc(100vw - 28px));
    top: calc(100% + 10px);
  }
}

@media (max-width: 575.98px) {
  .melq-preferences__menu {
    position: fixed;
    top: 74px;
    inset-inline-end: 14px;
    width: min(292px, calc(100vw - 28px));
    transform-origin: top right;
  }

  html[dir="rtl"] .melq-preferences__menu {
    transform-origin: top left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body,
  .melq-preferences__trigger,
  .melq-preferences__menu,
  .melq-preferences__language,
  .melq-preferences__theme,
  .melq-preferences__theme-switch,
  .melq-preferences__theme-switch > span {
    transition: none !important;
  }
}
