/* Retain Listeo's header layout, navigation and account controls. */
.elcwp-header [data-lhb-frontend-header] { font-family: var(--elc-font); }

.elcwp-header [data-lhb-frontend-header] .lhb-hp-header {
  --header-height: 76px !important;
  --header-boxed-width: 1160px !important;
  --header-bg: #fff !important;
  --header-scrolled-bg: #fff !important;
  --header-action-size: 44px;
  --header-fg: var(--elc-ink) !important;
  --menu-color: var(--elc-ink) !important;
  --menu-hover-color: var(--elc-red) !important;
  --menu-hover-bg: var(--elc-light-red);
  --menu-font-size: var(--elc-type-control) !important;
  --menu-font-weight: 700;
  border-bottom: 1px solid var(--elc-line);
  box-shadow: 0 3px 14px #17171709 !important;
}

.elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport:has(.lhb-hp-header:not(.lhb-is-boxed)) { --lhb-stage-height: 76px !important; }
.elcwp-header [data-lhb-frontend-header] .lhb-hp-header .lhb-hp-logo-img { width: min(148px, 38vw); }
.elcwp-header [data-lhb-frontend-header] .lhb-nav > li > a .lhb-mi-hit { min-height: 44px; }
.elcwp-header [data-lhb-frontend-header] .lhb-nav > li.current-menu-item > a .lhb-mi-hit {
  color: var(--elc-dark-red);
  background: var(--elc-light-red);
}

.elcwp-header [data-lhb-frontend-header] .lhb-hp-header [data-el="button"] .lhb-hp-button {
  --button-bg: var(--elc-red) !important;
  --button-color: #fff !important;
  --button-hover-bg: var(--elc-dark-red) !important;
  --button-hover-color: #fff !important;
  --button-radius: 999px !important;
  min-height: 44px;
  padding-block: 6px;
  font-size: var(--elc-type-label);
  font-weight: 800;
}

.elcwp-header [data-lhb-frontend-header] :is(.lhb-signin, .lhb-hp-header .user-name) {
  font-size: var(--elc-type-label);
  font-weight: 750;
}
.elcwp-header [data-lhb-frontend-header] :is(.lhb-signin, .lhb-burger) {
  min-height: 44px;
  --account-login-color: var(--elc-ink) !important;
  --account-login-bg: var(--elc-soft) !important;
  --menu-button-color: var(--elc-ink) !important;
  --menu-button-bg: var(--elc-soft) !important;
}

.elcwp-header [data-lhb-frontend-header] .lhb-hb-mobile-panel {
  background: #fff;
  color: var(--elc-ink);
}
.elcwp-header [data-lhb-frontend-header] .lhb-hb-mobile-link {
  min-height: 46px;
  padding-block: 9px;
  font-size: var(--elc-type-body);
  line-height: 1.4;
}
.elcwp-header [data-lhb-frontend-header] .lhb-hb-mobile-link:hover {
  color: var(--elc-dark-red);
  background: var(--elc-light-red);
}
.elcwp-header [data-lhb-frontend-header] :is(a, button):focus-visible {
  outline: 2px solid var(--elc-red) !important;
  outline-offset: 2px;
}

.elcwp-header #listeo-pwa-navigation {
  --listeo-pwa-navigation-accent: var(--elc-red);
  font: 650 var(--elc-type-small)/1.3 var(--elc-font);
  color: #565656;
  border-top-color: var(--elc-line);
}
.elcwp-header #listeo-pwa-navigation a[aria-current="page"] { font-weight: 800; }

/* Style the existing footer widgets and lists so they remain editable in WordPress. */
.elcwp-footer #footer {
  margin-top: 45px;
  padding: 42px 0 0;
  border-top: 1px solid var(--elc-line);
  background: #f8f8f8;
  color: var(--elc-ink);
  font: 500 var(--elc-type-control)/1.65 var(--elc-font);
}

.elcwp-footer #footer > .container { width: min(calc(100% - 40px), 1160px); max-width: none; padding: 0; }
.elcwp-footer #footer > .container > .row { margin: 0; }
.elcwp-footer #footer > .container > .row:first-child:has(> :nth-child(3):last-child) {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr) minmax(0, .95fr);
  gap: clamp(16px, 4vw, 54px);
}
.elcwp-footer #footer > .container > .row:first-child:has(> :nth-child(3):last-child)::before,
.elcwp-footer #footer > .container > .row:first-child:has(> :nth-child(3):last-child)::after { content: none; }
.elcwp-footer #footer > .container > .row:first-child:has(> :nth-child(3):last-child) > * {
  width: auto;
  min-width: 0;
  max-width: none;
  padding-inline: 0;
}
.elcwp-footer #footer .footer-widget { margin: 0 0 12px; }
.elcwp-footer #footer .footer-widget h4 {
  margin: 0 0 9px;
  color: var(--elc-ink);
  font: 800 var(--elc-type-body)/1.3 var(--elc-font);
}
.elcwp-footer #footer .footer-widget p {
  margin: 0 0 11px;
  color: var(--elc-muted);
  font-size: var(--elc-type-control);
}
.elcwp-footer #footer .footer-widget img { max-width: min(100%, 170px); height: auto; }
.elcwp-footer #footer .footer-widget a[href*="listeo_pwa=app"] img { max-width: min(100%, 182px); }
.elcwp-footer #footer .footer-widget a {
  color: #414141;
  font-size: var(--elc-type-control);
  overflow-wrap: anywhere;
}
.elcwp-footer #footer .footer-widget a[href^="mailto:"] { color: var(--elc-dark-red); font-weight: 750; }
.elcwp-footer #footer .footer-widget a:hover { color: var(--elc-dark-red); text-decoration: underline; }
.elcwp-footer #footer .footer-widget a:focus-visible {
  outline: 2px solid var(--elc-red);
  outline-offset: 2px;
}
.elcwp-footer #footer .footer-widget .menu { margin: 0; padding: 0; }
.elcwp-footer #footer .footer-widget .menu li { margin: 0; padding: 0; list-style: none; }
.elcwp-footer #footer .footer-widget .menu li::before,
.elcwp-footer #footer .footer-widget .menu a::before { content: none; }
.elcwp-footer #footer .footer-widget .menu a { padding: 4px 0; }

.elcwp-footer #footer .footer-new-bottom-inner {
  min-width: 0;
  margin-top: 20px;
  padding: 14px 0;
  border-top: 1px solid #dedede;
  background: transparent;
  color: var(--elc-muted);
  font: 650 var(--elc-type-small)/1.5 var(--elc-font);
}
.elcwp-footer #footer > .container > .row:has(.footer-new-bottom-inner) > * { padding-inline: 0; }
.elcwp-footer #footer .new-footer-social-icons a {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--elc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--elc-ink);
}
.elcwp-footer #footer .new-footer-social-icons a:hover { color: var(--elc-dark-red); background: var(--elc-light-red); }

@media (max-width: 767px) {
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m:has(.lhb-hp-header:not(.lhb-is-boxed)) { --lhb-stage-height: 68px !important; }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-header {
    --header-height: 68px !important;
    height: 68px;
    padding-inline: 12px;
    gap: 4px;
  }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-logo-img { width: min(128px, 37vw); }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-zone { padding: 0; gap: 5px; }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-zone[data-zone="right"] { zoom: 1; }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-header [data-el="button"] .lhb-hp-button {
    --button-padding-x: 9px !important;
    gap: 4px;
  }
  .elcwp-footer #footer { margin-top: 34px; padding-top: 25px; }
  .elcwp-footer #footer > .container { width: calc(100% - 32px); }
  .elcwp-footer #footer > .container > .row:first-child:has(> :nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .elcwp-footer #footer > .container > .row:first-child:has(> :nth-child(3):last-child) > * + * {
    padding-top: 13px;
    border-top: 1px solid var(--elc-line);
  }
  .elcwp-footer #footer .footer-widget .menu a { display: inline-flex; align-items: center; min-height: 39px; }
  .elcwp-footer #footer .footer-new-bottom-inner { margin-top: 10px; }
}

@media (max-width: 360px) {
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-logo-img { width: min(108px, 34vw); }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-header { padding-inline: 8px; }
}

@media (max-width: 360px) {
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-header [data-el="button"] .lhb-hp-button {
    --button-padding-x: 7px !important;
  }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-button > svg[aria-hidden="true"] {
    display: none;
  }
}

/* 1.2: keep native menu/account behavior, center the desktop navigation zone. */
.elcwp-location-control {
  display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; min-height: 44px;
  max-width: 210px; border: 1px solid var(--elc-line); border-radius: 999px;
  background: #f8f8f8; color: var(--elc-ink); font: 700 13px/1.2 var(--elc-font);
}
.elcwp-location-control select { width: 100%; min-width: 0; max-width: 170px; margin: 0; padding: 7px 3px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
@media (max-width: 1199px) { .elcwp-location-control { max-width: 155px; } }
@media (max-width: 767px) { .elcwp-location-control { display: none; } }

/* 1.2.3: compact mobile footer with a two-column link menu. */
@media (max-width: 767px) {
  .elcwp-footer #footer { margin-top: 24px; padding-top: 22px; }
  .elcwp-footer #footer .footer-widget { margin-bottom: 8px; }
  .elcwp-footer #footer .footer-widget img { max-width: min(100%, 145px); }
  .elcwp-footer #footer .footer-widget p { font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
  .elcwp-footer #footer .footer-widget h4 { font-size: 16px; margin-bottom: 8px; }
  .elcwp-footer #footer .footer-widget .menu {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px; row-gap: 2px;
  }
  .elcwp-footer #footer .footer-widget .menu > li { min-width: 0; margin: 0; padding: 0; }
  .elcwp-footer #footer .footer-widget .menu a {
    display: flex; align-items: center; min-height: 44px; padding: 5px 0;
    font-size: 14px; line-height: 1.35; overflow-wrap: anywhere;
  }
  /* Submenus keep their hierarchy instead of becoming extra grid columns. */
  .elcwp-footer #footer .footer-widget .menu .sub-menu { padding-left: 10px; margin: 0; }
  .elcwp-footer #footer .footer-widget a[href^="mailto:"] {
    font-size: 14px; line-height: 1.5; overflow-wrap: anywhere;
  }
  .elcwp-footer #footer .footer-widget a[href*="listeo_pwa=app"] img { max-width: min(100%, 140px); }
  .elcwp-footer #footer .footer-new-bottom-inner { font-size: 12px; line-height: 1.5; gap: 10px; }
}

/* 1.2.4: compact location popover in the native mobile header. */
.elcwp-location-popover { position: relative; }
.elcwp-location-popover > summary { display: grid; place-items: center; list-style: none; width: 40px; height: 44px; border-radius: 50%; background: #f5f5f5; color: #171717; cursor: pointer; }
.elcwp-location-popover > summary::-webkit-details-marker { display: none; }
.elcwp-location-popover > summary svg { width: 22px; height: 22px; }
.elcwp-location-popover[open] > summary { color: #df0a36; background: #fff0f3; }
.elcwp-location-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: min(270px, calc(100vw - 32px)); max-height: min(62vh, 380px); overflow: auto;
  margin: 0; padding: 6px; list-style: none; box-sizing: border-box;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 15px;
  box-shadow: 0 10px 32px #0002; z-index: 10000;
}
.elcwp-location-panel li { margin: 0; padding: 0; }
.elcwp-location-panel a {
  display: block; padding: 11px 12px; border-radius: 9px;
  color: #171717; font: 650 14px/1.4 var(--elc-font);
}
.elcwp-location-panel a:is(:hover, :focus-visible, [aria-current]) { background: #fff0f3; color: #df0a36; }
@media (max-width: 767px) {
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-logo-img { width: min(116px, 29vw); }
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-zone { gap: 3px; }
  .elcwp-footer #footer .elcwp-footer-links { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; width: 100% !important; float: none !important; margin: 0 !important; padding: 0 !important; }
  .elcwp-footer #footer .elcwp-footer-links li { width: auto !important; float: none !important; margin: 0 !important; padding: 0 !important; list-style: none; }
  .elcwp-footer #footer .elcwp-footer-links li::before, .elcwp-footer #footer .elcwp-footer-links a::before { display: none !important; }
  .elcwp-footer #footer .elcwp-footer-links a { display: flex !important; align-items: center; min-height: 44px; padding: 5px 0 !important; font: 500 14px/1.35 var(--elc-font) !important; }
  .elcwp-footer #footer .footer-new-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 14px 0 22px; }
  .elcwp-footer #footer .footer-new-bottom-inner > * { float: none !important; width: auto; margin: 0; }
  .elcwp-footer #footer .new-footer-social-icons a { min-width: 36px; min-height: 36px; }
}

/* 1.2.5: preserve Header Builder's native zones and layout at every width. */
.elcwp-header [data-lhb-frontend-header] .lhb-hp-header .elcwp-location-popover {
  flex: 0 0 40px; width: 40px; align-self: center;
}
@media (min-width: 768px) {
  .elcwp-location-panel { right: 0; }
}

/* 1.2.6: keep menu rows compact despite theme/widget spacing. */
@media (max-width: 640px) {
  .elcwp-footer #footer .elcwp-footer-links { grid-auto-rows: auto; align-items: start; }
  .elcwp-footer #footer .elcwp-footer-links > li {
    min-height: 0 !important; height: auto !important; line-height: 1.35 !important;
  }
  .elcwp-footer #footer .elcwp-footer-links > li > a {
    height: auto !important; margin: 0 !important; line-height: 1.35 !important;
  }
}

/* 1.2.9: compact useful links in two columns on every screen. */
.elcwp-footer #footer .elcwp-footer-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: start;
  gap: 0 14px;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.elcwp-footer #footer .elcwp-footer-links > li {
  width: auto !important;
  min-width: 0;
  float: none !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.elcwp-footer #footer .elcwp-footer-links > li::before,
.elcwp-footer #footer .elcwp-footer-links > li > a::before { display: none !important; }
.elcwp-footer #footer .elcwp-footer-links > li > a {
  display: flex !important;
  align-items: center;
  box-sizing: border-box;
  min-height: 26px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 3px 0 !important;
  font: 500 14px/1.35 var(--elc-font) !important;
  overflow-wrap: anywhere;
}

.elcwp-header [data-lhb-frontend-header] .lhb-hp-header .elcwp-location-popover { flex: 0 0 auto; width: auto; min-width: 0; }
.elcwp-location-popover > summary { display: flex; justify-content: center; align-items: center; gap: 7px; width: auto; max-width: 174px; padding: 0 12px; border-radius: 999px; }
.elcwp-location-popover > summary svg { flex: 0 0 20px; }
.elcwp-location-popover > summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; font-size: 13px; }
@media (max-width: 767px) {
  .elcwp-location-popover > summary { max-width: min(27vw, 115px); padding-inline: 7px; gap: 4px; }
  .elcwp-location-popover > summary svg { flex-basis: 15px; width: 15px; }
  .elcwp-location-popover > summary span { font-size: 11px; }
  .elcwp-location-panel { position: fixed; inset: auto 16px auto auto; margin-top: 8px; }
}

.elcwp-header [data-lhb-frontend-header] .lhb-hp-header [data-el="button"] .elcwp-header-publish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 16px;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .lhb-hp-header [data-el="button"] .elcwp-header-publish {
    --button-padding-x: 9px !important;
    padding-inline: 9px;
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .elcwp-header [data-lhb-frontend-header] .lhb-frontend-viewport-m .elcwp-header-has-publish .lhb-hp-logo-img { width: min(92px, 24vw); }
  .elcwp-header-has-publish .elcwp-location-popover > summary { max-width: 78px; }
}

.elcwp-location-panel .elcwp-location-city + .elcwp-location-city { border-top: 1px solid #eee; }
.elcwp-location-panel .elcwp-location-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 12px;
  gap: 12px;
  border-radius: 10px;
  list-style: none;
  font-weight: 750;
  cursor: pointer;
}
.elcwp-location-group > summary::-webkit-details-marker { display: none; }
.elcwp-location-group > summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-inline-end: 4px;
}
.elcwp-location-group[open] > summary { color: #df0a36; background: #fff0f3; }
.elcwp-location-group[open] > summary::after { transform: rotate(225deg); }
.elcwp-location-panel .elcwp-location-districts {
  margin: 4px 0 6px 12px;
  padding: 0 0 0 6px;
  border-inline-start: 2px solid #f2d8de;
  list-style: none;
}

.elcwp-location-panel { padding: 10px; overscroll-behavior: contain; }
.elcwp-location-panel .elcwp-location-panel-title {
  padding: 6px 10px 10px;
  color: #626262;
  font: 650 12px/1.4 var(--elc-font);
}
.elcwp-location-panel .elcwp-location-city { margin-bottom: 4px; }
.elcwp-location-panel .elcwp-location-city + .elcwp-location-city { border-top: 0; }
.elcwp-location-panel .elcwp-location-group > summary,
.elcwp-location-panel .elcwp-location-city > a { background: #f7f7f7; }
.elcwp-location-panel .elcwp-location-group > summary { justify-content: flex-start; gap: 8px; }
.elcwp-location-group > summary svg { flex: 0 0 17px; color: #df0a36; }
.elcwp-location-group > summary::after { margin-inline-start: auto; }
.elcwp-location-panel .elcwp-location-group[open] > summary { background: #fff0f3; }

.elcwp-location-panel .elcwp-location-city { position: relative; }
.elcwp-location-panel .elcwp-location-city > .elcwp-location-city-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  box-sizing: border-box;
  padding-block: 8px;
}
.elcwp-location-city-link svg { flex: 0 0 17px; color: #df0a36; }
.elcwp-location-city:has(.elcwp-location-group) > .elcwp-location-city-link { margin-inline-end: 45px; }
.elcwp-location-panel .elcwp-location-group > summary {
  position: absolute;
  inset: 0 0 auto auto;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  justify-content: center;
  padding: 0;
}
.elcwp-location-panel .elcwp-location-group > summary::after { margin: 0; }
