/* ============================================================
   LEI UNIVERSAL — RICH GLASS-PILL MEGA HEADER (market-gated)
   Loaded only on blogs with leiu_header_variant='mega' (EE default), and
   scoped under body.leiu-header-mega so it can never touch another market.
   Pill base is promoted from market-v2.css (EE is not on the v2 variant);
   the rich .leiu-mm-* panels are new.
   ============================================================ */

/* ---------- pill bar ---------- */
.leiu-header-mega .main-header-bar,
.leiu-header-mega .leiu-sticky-active .main-header-bar,
.leiu-header-mega .leiu-header-sticky-active .main-header-bar {
  max-width: 1100px;
  width: calc(100% - 48px);
  margin: 20px auto;
  top: 20px;
  position: sticky !important;
  z-index: 9999;
  overflow: visible;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.50);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 2px 16px rgba(0, 0, 0, 0.15);
}

.leiu-header-mega .main-header-bar .main-header-bar-wrap,
.leiu-header-mega .main-header-bar .leiu-container {
  max-width: 100%;
  padding: 0 22px;
}

/* layout — logo left, nav centre, CTA right */
.leiu-header-mega .main-header-bar .leiu-site-identity,
.leiu-header-mega .main-header-bar .site-branding,
.leiu-header-mega .main-header-bar .leiu-header-section-left {
  order: 1;
  flex: 0 0 auto;
  margin: 0;
}
.leiu-header-mega .main-header-bar .main-header-bar-navigation,
.leiu-header-mega .main-header-bar .leiu-builder-menu-1,
.leiu-header-mega .main-header-bar .leiu-header-section-middle,
.leiu-header-mega .main-header-bar [class*="menu-1"] {
  order: 2;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}
.leiu-header-mega .main-header-bar .leiu-header-button-1,
.leiu-header-mega .main-header-bar .leiu-header-section-right {
  order: 3;
  flex: 0 0 auto;
  margin: 0;
}

.leiu-header-mega .site-logo-img .custom-logo {
  max-width: 110px !important;
}

/* focus */
.leiu-header-mega .site-header,
.leiu-header-mega #masthead,
.leiu-header-mega #leiu-desktop-header,
.leiu-header-mega #leiu-mobile-header,
.leiu-header-mega .main-header-bar,
.leiu-header-mega .main-header-bar-wrap {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}
.leiu-header-mega .main-header-bar a:focus:not(:focus-visible),
.leiu-header-mega .main-header-bar button:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}
.leiu-header-mega .main-header-bar a:focus-visible,
.leiu-header-mega .main-header-bar button:focus-visible {
  outline: 2px solid var(--leiu-focus-ring, #386754) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* ---------- top-level nav links ---------- */
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item {
  display: flex;
  align-items: center;
  float: none;
  position: relative;
}
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item > .menu-link {
  color: rgba(28, 28, 28, 0.92);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 13px;
  background: transparent;
  border-radius: 999px;
  transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
  white-space: nowrap;
}
/* hide the legacy injected arrow + toggle on top-level mega links */
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item > .menu-link .leiu-icon.icon-arrow,
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item > .menu-link .dropdown-menu-toggle,
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item > .leiu-menu-toggle {
  display: none !important;
}
/* chevron-down indicator on panel-bearing nav items (pure-CSS border chevron,
   class-driven so it never depends on :has(); rotates to point up when open). */
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item[class*="leiu-mega--"] > .menu-link::after {
  content: '';
  /* header.css sets display:none on every top-level .menu-link::after — must
     re-enable it here or the chevron never shows. */
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.55;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item:hover > .menu-link {
  color: #000;
  background: rgba(128, 177, 155, 0.22);
}
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item:hover > .menu-link::after,
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item.leiu-mm-open > .menu-link::after {
  transform: translateY(1px) rotate(225deg);
}

/* ---------- top-level links over a dark hero (item 1) ----------
   The frosted pill (rgba(255,255,255,.14)) sits on a near-black hero, dropping
   the default dark links (rgba(28,28,28,.92)) to ~1.4:1. Only the ORIGINAL menu
   (#leiu-hf-menu-1) floats over the hero; the scrolled sticky clone
   (#leiu-hf-menu-1-sticky) is over white page content and keeps the dark links.
   `leiu-header-mega` is a BODY class (theme-bootstrap body_class), so it must be
   combined onto the body — `body:has(...) .leiu-header-mega` would look for a
   descendant that never exists, so the rule silently no-ops (the original bug).
   The :has() list is every dark top-of-page hero across the six markets, keyed
   off market-agnostic block classes (not per-site page IDs): the homepage flow
   hero (.lh-root.is-variant-flow), the about hero (.mv2-hero), the search hero
   (.lu-lookup.is-variant-flow) and the order-status hero
   (.lu-order-status.is-variant-flow) — all linear-gradient #0f1a12→#0a120d dark.
   Apply/renew heroes are dark forest surfaces too; keep their nav legible.
   Guarded by :not(.leiu-header-stick-scroll-active) so the links flip back to
   dark the instant the header re-stickies over white content. */
html:not(.leiu-header-stick-scroll-active) body.leiu-header-mega:has(.lh-root.is-variant-flow, .mv2-hero, .lu-lookup.is-variant-flow, .lu-order-status.is-variant-flow, .lu-apply-hero, .lu-renew-hero, .lu-section.is-variant-page-intro-flow) #leiu-hf-menu-1 > .menu-item > .menu-link {
  color: rgba(233, 240, 235, 0.82);
}
html:not(.leiu-header-stick-scroll-active) body.leiu-header-mega:has(.lh-root.is-variant-flow, .mv2-hero, .lu-lookup.is-variant-flow, .lu-order-status.is-variant-flow, .lu-apply-hero, .lu-renew-hero, .lu-section.is-variant-page-intro-flow) #leiu-hf-menu-1 > .menu-item:hover > .menu-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- CTA button ---------- */
@media (min-width: 922px) {
  .leiu-header-mega .leiu-header-button-1 .leiu-custom-button {
    background: #386754;
    color: #fff;
    padding: 10px 27px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: -0.01em;
    border: none;
    white-space: nowrap;
    transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }
  .leiu-header-mega .leiu-header-button-1 .leiu-custom-button:hover {
    background: #2c5243;
  }
}
@media (max-width: 921px) {
  .leiu-header-mega .leiu-header-button-1 .leiu-custom-button {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Mobile popup menu active/current item (item 25) — base header.css paints it
   the light mint #80b19b (~2.15:1 on the popup bg); use the brand green
   (#386754, ~5.76:1) so the active item matches the rest of the site. EE-scoped
   via body.leiu-header-mega so other markets keep their own active colour. */
body.leiu-header-mega .leiu-builder-menu-mobile .main-navigation .menu-item.current-menu-item > .menu-link,
body.leiu-header-mega .leiu-builder-menu-mobile .main-navigation .menu-item.current-menu-item > .leiu-menu-toggle,
body.leiu-header-mega .leiu-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .menu-link,
body.leiu-header-mega .leiu-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .leiu-menu-toggle {
  color: #386754;
}

/* ============================================================
   DROPDOWN PANEL — shell, open/close, hover bridge
   ============================================================ */
.leiu-header-mega .leiu-mm-dd {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 12px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.18s;
}
.leiu-header-mega .leiu-mm-dd.leiu-mm-dd--right {
  left: auto;
  right: 0;
}
/* invisible bridge so the mouse can cross the gap to the panel */
.leiu-header-mega :is(#leiu-hf-menu-1, #leiu-hf-menu-1-sticky) > .menu-item[class*="leiu-mega--"]::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
  height: 16px;
  display: block;
}
.leiu-header-mega .menu-item:hover > .leiu-mm-dd,
.leiu-header-mega .menu-item:focus-within > .leiu-mm-dd,
.leiu-header-mega .menu-item.leiu-mm-open > .leiu-mm-dd {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  /* Above the base z-index 60 so, when switching menus, the panel opening
     under the pointer paints over the neighbour still fading out. */
  z-index: 61;
  transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
/* While the page is scrolling, force every panel closed — the sticky header
   smart-hides on scroll, and an open panel would otherwise orphan. The body
   gets .leiu-mm-scroll-close on scroll (header-mega.js), cleared on mousemove. */
.leiu-header-mega.leiu-mm-scroll-close .leiu-mm-dd {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.leiu-header-mega .leiu-mm-dd-inner {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.08),
    0 24px 48px -12px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  /* The theme sets body{line-height:1.857} (header.css); reset it inside the
     panels so rows/labels/links aren't vertically inflated. */
  line-height: 1.4;
}

/* ---------- shared atoms ---------- */
.leiu-header-mega .leiu-mm-ico { width: 1em; height: 1em; flex: 0 0 auto; }
.leiu-header-mega .leiu-mm-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #636a67;
  line-height: 1.2;
  margin: 0 0 6px;
}
.leiu-header-mega .leiu-mm-meta { display: block; color: #5b6472; font-size: 12px; line-height: 1.35; margin-top: 2px; }
.leiu-header-mega .leiu-mm-eyebrow {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; line-height: 1.25;
  text-transform: uppercase; color: #386754; margin-bottom: 2px;
}
.leiu-header-mega .leiu-mm-thumb { display: block; border-radius: 9px; overflow: hidden; border: 1px solid #ecefed; flex: 0 0 auto; }
.leiu-header-mega .leiu-mm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.leiu-header-mega .leiu-mm-thumb--ph {
  background: repeating-linear-gradient(135deg, #eef4f0 0, #eef4f0 7px, #f6faf8 7px, #f6faf8 14px);
}
.leiu-header-mega .leiu-mm-thumb--wide { width: 100%; aspect-ratio: 16 / 10; }
.leiu-header-mega .leiu-mm-thumb--sq { width: 52px; height: 52px; }
.leiu-header-mega .leiu-mm-viewall {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  color: #386754; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
}
.leiu-header-mega .leiu-mm-viewall .leiu-mm-ico { width: 15px; height: 15px; transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1); }
.leiu-header-mega .leiu-mm-viewall:hover .leiu-mm-ico { transform: translateX(3px); }

/* ---------- TYPE: split (LEI Kood) ---------- */
.leiu-header-mega .leiu-mm-split {
  width: 600px;
  display: grid;
  grid-template-columns: 1fr 240px;
}
.leiu-header-mega .leiu-mm-split-list { padding: 16px 16px 16px 18px; }
.leiu-header-mega .leiu-mm-split-list .leiu-mm-label { padding: 0 14px; }
.leiu-header-mega .leiu-mm-feature {
  display: flex; gap: 13px; align-items: flex-start; text-decoration: none;
  padding: 12px 14px; border-radius: 12px; transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.leiu-header-mega .leiu-mm-feature:hover { background: rgba(56, 103, 84, 0.08); }
.leiu-header-mega .leiu-mm-chip {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(180deg, #f3f7f4, #eef4f0); border: 1px solid #ecefed;
  display: flex; align-items: center; justify-content: center; color: #386754;
}
.leiu-header-mega .leiu-mm-chip .leiu-mm-ico { width: 20px; height: 20px; }
.leiu-header-mega .leiu-mm-feature-tx { min-width: 0; }
.leiu-header-mega .leiu-mm-feature-title {
  display: block; color: #0f172a; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3;
}
.leiu-header-mega .leiu-mm-feature-desc { display: block; color: #5b6472; font-size: 13px; line-height: 1.5; margin-top: 3px; }
.leiu-header-mega .leiu-mm-promo {
  position: relative; overflow: hidden; color: #fff; padding: 24px 22px;
  /* centre the title/text/button block vertically so the card isn't bottom-heavy */
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(140, 189, 167, 0.35) 0%, rgba(28, 30, 33, 0) 65%),
    linear-gradient(180deg, rgba(86, 138, 114, 0.58) 0%, rgba(56, 103, 84, 0.3) 32%, rgba(28, 30, 33, 0) 78%),
    #1c1e21;
}
.leiu-header-mega .leiu-mm-promo-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 8px; }
.leiu-header-mega .leiu-mm-promo-text { font-size: 13px; font-weight: 400; line-height: 1.55; color: rgba(255, 255, 255, 0.9); margin: 0 0 18px; }
/* ghost button on the dark promo card — matches the hero secondary
   ("Mis on LEI kood?") button; the white fill read off-brand (Allik). */
.leiu-header-mega .leiu-mm-promo-cta {
  align-self: flex-start; background: transparent; color: #fff; font-size: 13px; font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  padding: 9px 16px; border-radius: 10px; display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
}
.leiu-header-mega .leiu-mm-promo-cta:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.72); }
.leiu-header-mega .leiu-mm-promo-cta .leiu-mm-ico { width: 15px; height: 15px; }

/* ---------- TYPE: articles (Artiklid) ---------- */
.leiu-header-mega .leiu-mm-articles {
  width: 600px;
  display: grid;
  grid-template-columns: 244px 1fr;
}
.leiu-header-mega .leiu-mm-articles--empty { width: 320px; display: block; padding: 18px; }
.leiu-header-mega .leiu-mm-featured {
  display: block; text-decoration: none; padding: 16px; border-right: 1px solid #ecefed;
}
.leiu-header-mega .leiu-mm-featured-eyebrow {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: #386754; margin: 14px 0 7px;
}
.leiu-header-mega .leiu-mm-featured-title {
  display: block; color: #0f172a; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25;
  margin-top: 14px;
}
.leiu-header-mega .leiu-mm-article-list { padding: 14px 14px 12px; }
.leiu-header-mega .leiu-mm-article-list .leiu-mm-label { padding: 0 9px; }
.leiu-header-mega .leiu-mm-article-row {
  display: flex; gap: 12px; align-items: center; text-decoration: none;
  padding: 8px 9px; border-radius: 10px; transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.leiu-header-mega .leiu-mm-article-row:hover { background: rgba(56, 103, 84, 0.08); }
.leiu-header-mega .leiu-mm-article-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.leiu-header-mega .leiu-mm-article-title {
  display: block; color: #0f172a; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3;
}
.leiu-header-mega .leiu-mm-article-list .leiu-mm-viewall { margin: 6px 9px 2px; }

/* ---------- TYPE: resources ---------- */
/* Info dropdown is a short list (Meist / Kontakt / Tellimuse staatus), so it's a
   compact single column rather than the wide 2-col resource grid. */
.leiu-header-mega .leiu-mm-resources { width: 340px; }
.leiu-header-mega .leiu-mm-cols { padding: 14px 12px; display: grid; grid-template-columns: 1fr; gap: 0; }
/* single-row footer with tighter padding for the narrow 340px panel */
.leiu-header-mega .leiu-mm-resources .leiu-mm-footer { padding: 13px 16px; gap: 10px; }
/* Ettevõttest links read cleaner without icons (Allik) */
.leiu-header-mega .leiu-mm-resources .leiu-mm-res-link .leiu-mm-ico { display: none; }
.leiu-header-mega .leiu-mm-col .leiu-mm-label { padding: 0 10px; }
.leiu-header-mega .leiu-mm-res-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 7px 10px; border-radius: 9px; color: #0f172a; font-size: 14px; font-weight: 500;
  line-height: 1.3; letter-spacing: -0.01em; transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.leiu-header-mega .leiu-mm-res-link:hover { background: rgba(56, 103, 84, 0.08); }
.leiu-header-mega .leiu-mm-res-link .leiu-mm-ico { width: 16px; height: 16px; color: #386754; }
.leiu-header-mega .leiu-mm-footer,
.leiu-header-mega .leiu-mm-article-list + .leiu-mm-footer {
  background: #f5f5f7; border-top: 1px solid #ecefed; padding: 13px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.leiu-header-mega .leiu-mm-footer-tx { color: #5b6472; font-size: 13px; }

/* ---------- mobile: rich panels are desktop-only (desktop header hidden <922) ---------- */
@media (max-width: 921px) {
  .leiu-header-mega .leiu-mm-dd { display: none !important; }
  /* …except inside the mobile drawer, where tapping a mega parent's toggle
     (.leiu-menu-toggle → nav.js adds .leiu-submenu-expanded) opens the panel as
     a full-width single-column accordion (LEI Kood / Artiklid / Ettevõttest). */
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded {
    display: block !important; position: static !important; visibility: visible !important;
    opacity: 1 !important; transform: none !important; width: 100% !important; padding: 2px 0 8px !important;
  }
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-dd-inner {
    box-shadow: none !important; border: none !important; border-radius: 0 !important; background: transparent !important;
  }
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-split,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-articles,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-resources {
    width: auto !important; display: block !important;
  }
  /* ── TEXT-ONLY cohesive accordion (Allik): strip every decorative element so
     each expanded submenu is a plain, uniform list of text links — no thumbs,
     chips, descriptions, promo card, or 'Tekkis küsimus' footer. The whole point
     is that every item looks pretty much the same throughout the menu. ── */
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-chip,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-thumb,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-feature-desc,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-meta,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-label,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-featured-eyebrow,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-promo-eyebrow,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-promo-title,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-promo-text,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-footer,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded a svg { display: none !important; }
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-promo {
    background: transparent !important; padding: 0 !important; margin: 0 !important; overflow: visible !important;
  }
  /* zero every container's own padding so all rows share one indent */
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-dd-inner,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-split,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-split-list,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-articles,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-article-list,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-resources,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-cols,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-col {
    padding: 0 !important; margin-left: 0 !important; margin-right: 0 !important;
  }
  /* every link -> identical plain text row, one shared indent + comfortable height */
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-feature,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-article-row,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-featured,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-res-link {
    display: block !important; width: auto !important; background: transparent !important; border: none !important;
    padding: 10px 0 10px 22px !important; margin: 0 !important; gap: 0 !important; border-radius: 0 !important;
    color: #5b6472 !important; font-weight: 500 !important; font-size: 15px !important; line-height: 1.3 !important;
    justify-content: flex-start !important; text-align: left !important;
  }
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-feature-title,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-article-title,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-featured-title {
    font-size: 15px !important; font-weight: 500 !important; color: #5b6472 !important; line-height: 1.3 !important; margin: 0 !important;
  }
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-feature-tx,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-article-tx { display: block !important; }

  /* each panel's "action" item becomes a matching outlined button in the drawer:
     Kontrolli LEI koodi (LEI Kood) · Vaata kõiki artikleid (Artiklid) ·
     Jälgi tellimuse staatust (Ettevõttest). Full-width, centred, subtle border. */
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-promo-cta,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-viewall,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-res-cta {
    display: flex !important; width: 100% !important; box-sizing: border-box !important;
    justify-content: center !important; align-items: center !important; gap: 8px !important;
    background: transparent !important; color: #386754 !important; border: 1px solid #cfd8d2 !important;
    border-radius: 10px !important; padding: 13px 16px !important; margin: 12px 0 2px !important;
    font-weight: 600 !important; font-size: 14.5px !important; text-align: center !important; text-decoration: none !important;
  }
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-promo-cta svg,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-viewall svg,
  .leiu-header-mega .leiu-mm-dd.leiu-submenu-expanded .leiu-mm-res-cta svg {
    display: inline-block !important; width: 16px !important; height: 16px !important; flex: 0 0 auto !important;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .leiu-header-mega .leiu-mm-dd,
  .leiu-header-mega .leiu-mm-dd * { transition: none !important; }
  .leiu-header-mega .menu-item:hover > .leiu-mm-dd,
  .leiu-header-mega .menu-item:focus-within > .leiu-mm-dd,
  .leiu-header-mega .menu-item.leiu-mm-open > .leiu-mm-dd { transform: none; }
}
