/*
 * Mobile off-canvas menu redesign (hand-written, NOT compiled from src/sass).
 * src/sass compiles to assets/css/main.css independently and must stay untouched —
 * this file only overrides/extends .sd-offcanvas-menu visuals, loaded last.
 */

:root {
  --sd-mm-accent: #2f7fd1;
  --sd-mm-accent-light: #f3f8fd;
  --sd-mm-border: #eef1f5;
  --sd-mm-text: #0f172a;
  --sd-mm-text-muted: #64748b;
}

/* Lock page scroll behind the open off-canvas menu. CSS-only (no JS edits needed,
   main.js stays compiled/untouched) — :has() checks the body for the --open class
   the existing click handler already toggles. */
body:has(.sd-offcanvas-menu--open) {
  overflow: hidden;
}

/* Panel shell */
.sd-offcanvas-menu {
  width: min(360px, 92vw);
  max-width: 400px;
  background: #fff;
  border-radius: 22px 0 0 22px;
  box-shadow: -16px 0 56px -16px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sd-offcanvas-menu--open {
  transform: translateX(0);
}

.sd-offcanvas-menu::before {
  backdrop-filter: blur(2px);
}

/* Decorative blue wave band behind the logo/close row. `::before` on this element is
   already the dark page overlay (from the compiled offcanvas.sass), so the band lives
   on `::after` instead; the gradient + wave curve are baked into one SVG background so
   the shape doesn't depend on separate CSS clip-path support. */
.sd-offcanvas-menu::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 172px;
  z-index: 0;
  border-radius: 22px 0 0 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='400' y2='200'%3E%3Cstop offset='0' stop-color='%2378bdec'/%3E%3Cstop offset='1' stop-color='%232f7fd1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0,0 H400 V150 Q200,195 0,150 Z' fill='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Top bar: logo, floating as a white card over the wave band */
.sd-offcanvas-menu__top {
  position: relative;
  z-index: 1;
  margin: 14px;
  padding: 1.1rem 3.75rem 1.1rem 1.1rem;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px -14px rgba(15, 23, 42, 0.15);
}

.sd-offcanvas-menu__logo img {
  height: 40px;
  width: auto;
  max-width: 160px;
  display: block;
}

/* Flex-centered ::before icon instead of background-position: center on the button
   itself — main.css already declares its own display:flex/align-items/justify-content
   for this exact class (uncontested, so it still applies), and centering the X through
   that same flex context is more robust than trusting background-position math to agree
   with whatever box-sizing math is already in play from that other rule. */
.sd-offcanvas-menu__close {
  z-index: 2;
  top: 1.6rem;
  right: 1.6rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff !important;
  box-shadow: 0 6px 20px -8px rgba(15, 23, 42, 0.15);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sd-offcanvas-menu__close::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  transition: transform 0.5s ease;
}

.sd-offcanvas-menu__close:hover {
  background-color: #eaf3fd !important;
}

.sd-offcanvas-menu__close:hover::before {
  transform: rotate(360deg);
}

.sd-offcanvas-menu__close .ad-burger {
  display: none;
}

/* Nav/footer sit above the decorative band in stacking order and need their own
   background so the band doesn't show through the gap below the white top card. */
.sd-offcanvas-menu__nav,
.sd-offcanvas-menu__footer {
  position: relative;
  z-index: 1;
  background: #fff;
}

/* Nav scroll area. header-fix.css also puts `overflow-y:auto` on `.sd-mobile-menu`
   itself (a child further down inside .menu-column) alongside this one on `__nav` —
   two independent scroll containers, so `.menu-new` (Головна / Лікування алкоголізму)
   sat outside the inner one and stayed pinned while only the WP menu list scrolled
   beneath it. Neutralizing the inner container makes `__nav` the single scroller. */
.sd-offcanvas-menu__nav {
  padding: 0;
}

.sd-offcanvas-menu .sd-mobile-menu {
  flex: 0 0 auto;
  overflow: visible;
}

/* main.css's own `.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-column` (3 classes)
   outranks a plain `.sd-offcanvas-menu .menu-column` (2 classes) and was quietly
   winning with a wider 1.5rem side padding — the real source of the "not full width"
   feel, not the rows themselves. Matching the prefix and tightening it fixes that. */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-column {
  padding: 0.5rem 1rem 1.5rem !important;
}

/* Row reset for both the fixed "city-page-ul" replacement (.menu-new ul) and the real menu.
   main.css's own `.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-new ul{padding:1.5rem 0 0 0!important}`
   (3-class prefix) was winning over a plain `.menu-new > ul` and adding an unwanted gap
   above "Головна" — matching the prefix here removes it. */
.menu-new > ul,
.sd-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-new ul {
  padding-top: 0 !important;
}

.menu-new li,
.sd-mobile-menu > li {
  border-bottom: 1px solid var(--sd-mm-border);
}

.menu-new li:last-child,
.sd-mobile-menu > li:last-child {
  border-bottom: none;
}

/* Root cause of the icon-above-text bug: assets/css/main.css (compiled from a sass
   version that has drifted from what's in src/, per the project owner) already ships
   its own !important mobile-menu skin at
   `.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li>a{display:block !important;...}`
   — 3 classes + 2 types of specificity. Our old `.sd-mobile-menu > li > a` (1 class +
   2 types) lost that fight even with !important, because equal-or-lower specificity
   never beats !important regardless of source order. Matching their exact selector
   prefix (and specificity) is what actually wins it. */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-new ul li a,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-new ul li span,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li > a,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li > span {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 14px !important;
  min-height: 26px;
  padding: 15px 2px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--sd-mm-text) !important;
  position: relative;
  line-height: 1.3 !important;
  border-bottom: none !important;
  text-decoration: none !important;
}

/* Chevrons landing at different distances from the right edge ("Лікарі"/"Філіали" sat
   further left than leaf rows like "Про клініку"): main.css adds an extra
   `.sd-mobile-menu .menu-item-has-children>a{padding-right:2.5rem!important}` at (0,4,1)
   specificity, beating our (0,3,2) row rule for that one longhand only, on parent rows
   only — leaf rows never had it, hence the misalignment. Adding `li` to the selector
   bumps us to (0,4,2), which wins. */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li.menu-item-has-children > a,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li.menu-item-has-children > span {
  padding-right: 2px !important;
}


/* Icon slot: a normal flex item (not absolute), so spacing/centering come free from
   the row's flex+gap instead of a hand-tuned padding-left. Every top-level row gets one —
   rows past the known set fall back to a generic marker so the left edge stays aligned
   even if items are added/reordered in wp-admin.
   Plain background-image (not mask-image): masks on flex-item pseudo-elements are flaky
   in WebKit/Chrome unless the pseudo has an explicit display, so a baked-color SVG
   background is used instead — it has no such gotcha. */
.menu-new li > a::before,
.menu-new li > span::before,
.sd-mobile-menu > li > a::before,
.sd-mobile-menu > li > span::before {
  content: "";
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

/* Головна — house */
.menu-new li:nth-child(1) > a::before,
.menu-new li:nth-child(1) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Cpath d='M3 11.5 12 4l9 7.5'/%3E%3Cpath d='M5.5 10v9a1 1 0 0 0 1 1H10v-5a2 2 0 0 1 4 0v5h3.5a1 1 0 0 0 1-1v-9'/%3E%3C/svg%3E");
}

/* Лікування алкоголізму — heart */
.menu-new li:nth-child(2) > a::before,
.menu-new li:nth-child(2) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Cpath d='M12 20s-7-4.35-9.5-8.7C.9 8 2.2 4.5 5.6 4a4.7 4.7 0 0 1 6.4 2 4.7 4.7 0 0 1 6.4-2c3.4.5 4.7 4 3.1 7.3C19 15.65 12 20 12 20Z'/%3E%3C/svg%3E");
}

/* Послуги — clipboard */
.sd-mobile-menu > li:nth-child(1) > a::before,
.sd-mobile-menu > li:nth-child(1) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 4V3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1'/%3E%3Cpath d='M9 11h6M9 15h6M9 19h3'/%3E%3C/svg%3E");
}

/* Про клініку — info circle */
.sd-mobile-menu > li:nth-child(2) > a::before,
.sd-mobile-menu > li:nth-child(2) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6'/%3E%3Ccircle cx='12' cy='7.5' r='0.9' fill='%23475569' stroke='none'/%3E%3C/svg%3E");
}

/* Лікарі — person */
.sd-mobile-menu > li:nth-child(3) > a::before,
.sd-mobile-menu > li:nth-child(3) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20c0-3.6 3.1-6.5 7-6.5s7 2.9 7 6.5'/%3E%3C/svg%3E");
}

/* Філіали — map pin */
.sd-mobile-menu > li:nth-child(4) > a::before,
.sd-mobile-menu > li:nth-child(4) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Cpath d='M12 21s7-6.5 7-12a7 7 0 0 0-14 0c0 5.5 7 12 7 12Z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E");
}

/* Ціни — price tag */
.sd-mobile-menu > li:nth-child(5) > a::before,
.sd-mobile-menu > li:nth-child(5) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Cpath d='M12.6 3.4 20 10.8a2 2 0 0 1 0 2.8l-6.4 6.4a2 2 0 0 1-2.8 0L4.2 13.4A2 2 0 0 1 3.6 12V5a1.6 1.6 0 0 1 1.6-1.6h7a2 2 0 0 1 1.4.6Z'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.3' fill='%23475569' stroke='none'/%3E%3C/svg%3E");
}

/* Блог — file/text */
.sd-mobile-menu > li:nth-child(6) > a::before,
.sd-mobile-menu > li:nth-child(6) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Cpath d='M6 3h9l4 4v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z'/%3E%3Cpath d='M14 3v4h4M8 12h8M8 16h8M8 20h5'/%3E%3C/svg%3E");
}

/* ЗМІ про нас — megaphone */
.sd-mobile-menu > li:nth-child(7) > a::before,
.sd-mobile-menu > li:nth-child(7) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Cpath d='M3 10v4a1 1 0 0 0 1 1h2l9 4V5L6 9H4a1 1 0 0 0-1 1Z'/%3E%3Cpath d='M19 9.5a4 4 0 0 1 0 5'/%3E%3C/svg%3E");
}

/* Відгуки — star */
.sd-mobile-menu > li:nth-child(8) > a::before,
.sd-mobile-menu > li:nth-child(8) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='m12 3.5 2.6 5.3 5.9.8-4.3 4.1 1 5.8L12 16.6l-5.2 2.9 1-5.8-4.3-4.1 5.9-.8Z'/%3E%3C/svg%3E");
}

/* Контакт — envelope */
.sd-mobile-menu > li:nth-child(9) > a::before,
.sd-mobile-menu > li:nth-child(9) > span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3.5 6 8.5 7 8.5-7'/%3E%3C/svg%3E");
}

/* Chevron affordance on every top-level row. Baked-color SVG background-image
   (not a border-corner + transform trick) — the border trick rendered inconsistently
   on parent rows in testing, an SVG asset has no such ambiguity. Default points
   right; the opened state swaps to a separate up-pointing accent-colored asset
   instead of rotating, so there's nothing for a stray inherited rule to fight over.
   Same specificity story as the row rule above: main.css already draws its own
   border-corner ::after at `position:absolute;right:.75rem` — without matching its
   selector prefix, that absolute-positioned arrow rendered on top of/underneath ours
   in the same spot ("arrow under arrow"). `position: static` cancels its offset. */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-new ul li a::after,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .menu-new ul li span::after,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li > a::after,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li > span::after {
  content: "" !important;
  position: static !important;
  display: block !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  margin-left: auto !important;
  margin-top: 0 !important;
  border: none !important;
  opacity: 1 !important;
  /* !important: cancels main.css's own leftover `transform:rotate(45deg)` on nested
     .sub-menu .menu-item-has-children chevrons (no animation depends on this anymore). */
  transform: none !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6c2d1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E");
}

.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li.opened > .dropdown-toggle::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7fd1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 15 7-7 7 7'/%3E%3C/svg%3E") !important;
}

/* Rows that expand always show an accent-colored, down-pointing chevron (not just once
   open, and not the same right-arrow leaf rows use) — a quiet, permanent "this opens
   downward" cue. Opened state further overrides this to point up (rule above already
   covers li.opened, which loads after this and wins). */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li.menu-item-has-children > a::after,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu li.menu-item-has-children > span::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7fd1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E") !important;
}

/* Level 1 submenu — a light-blue rounded card (per reference), rows separated by
   faint dividers, active row marked with a blue dot instead of a border rail.
   Same specificity story as the row/chevron rules above: main.css has its own
   `.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu .sub-menu a{...!important}`
   skin for nested items (padding, color, border-bottom, background), all at (0,4,1)
   specificity — our old plain `.sd-mobile-menu > li > .sub-menu > li > a` (0,2,3) lost
   that fight silently, so half the "nesting" was actually main.css's own generic
   styling bleeding through instead of ours. Matching their prefix fixes that for real. */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu {
  background: var(--sd-mm-accent-light) !important;
  border-radius: 14px !important;
  margin: 4px 0 10px !important;
  padding: 2px 14px !important;
}

.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li {
  border-left: none !important;
  border-bottom: 1px solid rgba(47, 127, 209, 0.14) !important;
  transition: background-color 0.2s ease;
}

.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li:last-child {
  border-bottom: none !important;
}

.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li > a,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li > span {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 2px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #1e293b !important;
  background: transparent !important;
}

/* Sub-items that are themselves expandable (e.g. "Кодування алкоголізму") stay bold
   so the eye can tell "this is a group header" from "this is a destination link". */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li.menu-item-has-children > a,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li.menu-item-has-children > span {
  font-weight: 600 !important;
}

/* Current page inside a submenu: a blue dot in front of the label, like the reference —
   one flat layer on the card, no extra border/pill (works in evergreen browsers with :has). */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li:has(> [data-seolink="self"]) {
  background: transparent !important;
}

.sd-mobile-menu [data-seolink="self"] {
  color: var(--sd-mm-accent) !important;
  font-weight: 600 !important;
}

.sd-mobile-menu > li > .sub-menu > li > [data-seolink="self"]::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sd-mm-accent);
  flex-shrink: 0;
  margin-right: 10px;
}

/* Level 2 submenu — plain bullet list (e.g. "Виведення із запою ..."), indented further
   under its own parent's rail so 3 levels read as a clear tree, not 3 flat lists. */
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li > .sub-menu {
  padding: 0 0 6px 18px !important;
  margin: 0 !important;
  background: transparent !important;
}

.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li > .sub-menu > li {
  border-bottom: none !important;
  border-left: none !important;
}

.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li > .sub-menu > li > a,
.sd-offcanvas-menu .sd-offcanvas-menu__nav .sd-mobile-menu > li > .sub-menu > li > .sub-menu > li > span {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 7px 2px 7px 16px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--sd-mm-text-muted) !important;
  background: transparent !important;
  position: relative;
}

.sd-mobile-menu > li > .sub-menu > li > .sub-menu > li > a::after,
.sd-mobile-menu > li > .sub-menu > li > .sub-menu > li > span::after {
  content: none !important;
}

.sd-mobile-menu > li > .sub-menu > li > .sub-menu > li > a::before,
.sd-mobile-menu > li > .sub-menu > li > .sub-menu > li > span::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #94a3b8;
}

/* Footer: call button, messengers, language switch */
.sd-offcanvas-menu__footer {
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sd-mm-border);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sd-offcanvas-menu__call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #52a2dd, var(--sd-mm-accent));
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 18px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(47, 127, 209, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sd-offcanvas-menu__call:hover,
.sd-offcanvas-menu__call:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -8px rgba(47, 127, 209, 0.4);
}

.sd-offcanvas-menu__call svg {
  flex-shrink: 0;
}

.sd-offcanvas-menu__call svg path {
  stroke: #fff;
}

.sd-offcanvas-menu__messengers {
  padding-top: 0;
  padding-bottom: 0;
}

.sd-offcanvas-menu__messengers .cosiness-social {
  justify-content: center;
  gap: 14px;
  padding-top: 1rem;
  padding-bottom: 0;
}

.sd-offcanvas-menu__messengers .cosiness-social .title {
  display: none;
}

.sd-offcanvas-menu__messengers .cosiness-social a {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sd-offcanvas-menu__messengers .cosiness-social a svg {
  width: 34px;
  height: 34px;
}

.sd-offcanvas-menu__footer .header__lang {
  padding: 0;
  margin: 0;
  background: transparent;
  max-width: none;
}

.sd-offcanvas-menu__footer .header__lang ul.list {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  justify-content: center;
}

.sd-offcanvas-menu__footer .header__lang ul.list li {
  flex: 1;
  list-style: none;
}

/* main.css's `.sd-offcanvas-menu .header__lang a{height:40px;line-height:40px;...}`
   is an inline-block + line-height centering trick. It's uncontested by our old rule
   (which never set height/line-height), so it stayed active underneath our own
   padding — a fixed 40px line-box centered inside a box that padding had made taller,
   which is what read as "labels not aligned". Neutralizing height/line-height and
   centering with flex instead removes the conflict outright. */
.sd-offcanvas-menu__footer .header__lang ul.list li a,
.sd-offcanvas-menu__footer .header__lang ul.list li span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  line-height: normal !important;
  text-align: center;
  padding: 10px 0 !important;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sd-mm-text-muted);
}

.sd-offcanvas-menu__footer .header__lang ul.list li.current-lang a,
.sd-offcanvas-menu__footer .header__lang ul.list li.current-lang span {
  background: var(--sd-mm-accent) !important;
  color: #fff !important;
}

