/* ==========================================================
   NivaasMart website header — one clean line on desktop.
   Style is picked in Admin → Settings → Website & SEO → Header style:
     .nmh-white   clean white bar, blue accents (default)
     .nmh-blue    compact blue bar
     .nmh-classic the older look (only the wrapping/legibility fixes)
   Desktop website ONLY (≥1161px, never inside the app) — the phone
   website and the app keep their own header exactly as before.
   ========================================================== */

/* ---- tiny helpers used by the markup at every width ---- */
.nmh .nmh-logo-dark, .nmh .nmh-av, .nmh .nmh-first, .nmh .nmh-pin { display: none; }
.nmh .nmh-caret, .nmh .nmh-offer i { font-style: normal; }
.nmh .main-nav.open .nmh-offer.is-fest { color: #B91C1C !important; font-weight: 800; }

@media (min-width: 1161px) {
  html:not(.nm-in-frame) body:not(.capacitor-app) .site-header.nmh { position: sticky; top: 0; z-index: 60; }
  /* overflow-x:hidden on html/body made the header scroll away — "clip" hides sideways overflow the same way but lets it stay on top
     (skipped while a popup has locked the page with an inline overflow style) */
  html:not(.nm-in-frame):not([style*="overflow"]):has(> body:not(.capacitor-app):not([style*="overflow"]) > .site-header.nmh),
  html:not(.nm-in-frame) body:not(.capacitor-app):not([style*="overflow"]):has(> .site-header.nmh) { overflow-x: clip !important; overflow-y: visible !important; }
  body:not(.capacitor-app) .site-header.nmh .header-inner {
    width: 100% !important; max-width: 1480px !important; margin: 0 auto; padding: 0 28px !important; min-height: 70px; gap: 18px; box-sizing: border-box;
  }
  body:not(.capacitor-app) .site-header.nmh .logo { flex: none; margin: 0; }
  body:not(.capacitor-app) .site-header.nmh .logo img { width: auto; max-width: none; }
  body:not(.capacitor-app) .site-header.nmh .logo .hv2-logo-img { height: 50px; }
  body:not(.capacitor-app) .site-header.nmh .city-selector { flex: none; }
  body:not(.capacitor-app) .site-header.nmh .main-nav { flex: 1; justify-content: flex-end; gap: 4px; flex-wrap: nowrap; }

  /* every label stays on ONE line */
  body:not(.capacitor-app) .site-header.nmh :is(.city-btn, .mega-plain-link, .mega-item > button, .btn-postproperty, .hv2-login-btn) { white-space: nowrap; }

  /* city pill */
  body:not(.capacitor-app) .site-header.nmh .city-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 12px; border-radius: 999px;
    font: 600 13.5px/1 Poppins, Inter, sans-serif; border: 1px solid transparent; cursor: pointer;
  }
  body:not(.capacitor-app) .site-header.nmh .city-btn .nmh-pin { display: block; width: 15px; height: 15px; flex: none; }
  body:not(.capacitor-app) .site-header.nmh .nmh-city { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

  /* links */
  body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link,
  body:not(.capacitor-app) .site-header.nmh .mega-item > button.nmh-more {
    font: 600 14px/1 Poppins, Inter, sans-serif; padding: 10px 10px; border-radius: 10px; margin: 0;
  }
  body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link::after { left: 10px; right: 10px; bottom: 2px; }
  body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link.is-on::after { transform: scaleX(1); }
  body:not(.capacitor-app) .site-header.nmh .nmh-caret { font-size: 11px; margin-left: 2px; opacity: .7; }

  /* festive offer = a small chip, readable on any background */
  body:not(.capacitor-app) .site-header.nmh .nmh-offer.is-fest {
    display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px !important; border-radius: 999px; font-weight: 700 !important;
  }
  body:not(.capacitor-app) .site-header.nmh .nmh-offer.is-fest::after { display: none; }

  /* icons */
  body:not(.capacitor-app) .site-header.nmh .hv2-nav-wishlist { width: 38px; height: 38px; margin: 0 0 0 2px; }
  body:not(.capacitor-app) .site-header.nmh .hv2-nav-wishlist:hover { transform: none; box-shadow: none; }
  body:not(.capacitor-app) .site-header.nmh .hv2-msgr { display: flex; }

  /* Post property */
  body:not(.capacitor-app) .site-header.nmh .btn-postproperty {
    display: inline-flex !important; align-items: center; gap: 7px; height: 40px; padding: 0 16px !important; margin: 0 0 0 8px !important;
    border-radius: 999px !important; font: 700 13.5px/1 Poppins, Inter, sans-serif !important;
  }
  body:not(.capacitor-app) .site-header.nmh .btn-postproperty small {
    display: inline-block; margin: 0 !important; padding: 3px 7px !important; border-radius: 6px !important;
    font: 800 10px/1.1 Inter, sans-serif !important; letter-spacing: .06em;
  }

  /* Login */
  body:not(.capacitor-app) .site-header.nmh .hv2-login-btn {
    height: 40px; padding: 0 18px !important; border-radius: 999px !important; font: 700 13.5px/1 Poppins, Inter, sans-serif !important;
    margin-left: 6px; transform: none !important;
  }

  /* signed in: avatar + first name */
  body:not(.capacitor-app) .site-header.nmh .nmh-user {
    display: inline-flex !important; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px !important; margin-left: 6px;
    border-radius: 999px !important; font: 600 13.5px/1 Poppins, Inter, sans-serif !important;
  }
  body:not(.capacitor-app) .site-header.nmh .nmh-user .nmh-full { display: none; }
  body:not(.capacitor-app) .site-header.nmh .nmh-user .nmh-first { display: inline; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  body:not(.capacitor-app) .site-header.nmh .nmh-user .nmh-av {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
    font: 700 13px/1 Poppins, Inter, sans-serif; background: #2563EB; color: #fff;
  }

  /* dropdown panels open just under the bar */
  body:not(.capacitor-app) .site-header.nmh .mega-panel { margin-top: 10px; }
  /* invisible bridge over that 10px gap, so moving the mouse from the button
     down to the menu never "leaves" it and the menu doesn't vanish */
  body:not(.capacitor-app) .site-header.nmh .mega-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
  /* short grace time after the mouse leaves (class set by header.php) */
  body:not(.capacitor-app) .site-header.nmh .mega-item.nmh-hold > .mega-panel { display: flex; flex-direction: column; }
  body:not(.capacitor-app) .site-header.nmh .mega-item.nmh-hold > .mega-panel.mega-panel-wide { flex-direction: row; }
  body:not(.capacitor-app) .site-header.nmh .city-selector.nmh-hold > .city-dropdown { display: flex; flex-direction: column; }

  /* narrow laptops: keep one line */
  /* "All Property" stays in the bar at every desktop width (it used to hide below 1400px — so it showed
     on one screen / zoom and not on another). The rest tightens instead (rules below). */
  @media (max-width: 1365px) {
    body:not(.capacitor-app) .site-header.nmh .header-inner { gap: 12px; padding: 0 20px !important; }
    body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link,
    body:not(.capacitor-app) .site-header.nmh .mega-item > button.nmh-more { padding: 10px 8px; font-size: 13.5px; }
    body:not(.capacitor-app) .site-header.nmh .logo .hv2-logo-img, body:not(.capacitor-app) .site-header.nmh .logo .nmh-logo-dark { height: 44px; }
  }
  @media (max-width: 1250px) {
    body:not(.capacitor-app) .site-header.nmh .btn-postproperty small { display: none; }
    body:not(.capacitor-app) .site-header.nmh .nmh-user .nmh-first { display: none; }
    body:not(.capacitor-app) .site-header.nmh .nmh-user { padding: 0 10px 0 4px !important; }
  }

  /* ================= WHITE ================= */
  body:not(.capacitor-app) .site-header.nmh-white {
    background: rgba(255,255,255,.97) !important; border-bottom: 1px solid #E6EAF2 !important; box-shadow: none !important;
    backdrop-filter: saturate(1.4) blur(10px);
  }
  body:not(.capacitor-app) .site-header.nmh-white.hv2-scrolled { box-shadow: 0 6px 24px -12px rgba(15,23,42,.18) !important; }
  body:not(.capacitor-app) .site-header.nmh-white .logo .hv2-logo-img { display: none; }
  body:not(.capacitor-app) .site-header.nmh-white .logo .nmh-logo-dark { display: block; height: 46px; width: auto; }
  body:not(.capacitor-app) .site-header.nmh-white .city-btn { background: #EFF4FF; color: #1E3A8A; }
  body:not(.capacitor-app) .site-header.nmh-white .city-btn:hover { background: #DBE7FF; color: #1D4ED8; border-color: transparent; }
  body:not(.capacitor-app) .site-header.nmh-white .mega-nav a.mega-plain-link,
  body:not(.capacitor-app) .site-header.nmh-white .mega-item > button.nmh-more { color: #1F2A44; }
  body:not(.capacitor-app) .site-header.nmh-white .mega-nav a.mega-plain-link:hover,
  body:not(.capacitor-app) .site-header.nmh-white .mega-item > button.nmh-more:hover,
  body:not(.capacitor-app) .site-header.nmh-white .mega-nav a.mega-plain-link.is-on { color: #2563EB; }
  body:not(.capacitor-app) .site-header.nmh-white .mega-nav a.mega-plain-link::after { background: #2563EB; }
  body:not(.capacitor-app) .site-header.nmh-white .mega-nav a.nmh-offer.is-fest { background: #FFF4E5; color: #C2410C !important; box-shadow: inset 0 0 0 1px #FED7AA; }
  body:not(.capacitor-app) .site-header.nmh-white .nmh-offer.is-fest:hover { background: #FFE8CC; }
  body:not(.capacitor-app) .site-header.nmh-white .hv2-nav-wishlist { background: #F3F6FB; color: #334155; border-color: transparent; }
  body:not(.capacitor-app) .site-header.nmh-white .hv2-nav-wishlist:hover { background: #E6EEFF; color: #2563EB; }
  body:not(.capacitor-app) .site-header.nmh-white .btn-postproperty { background: #fff !important; color: #1D4ED8 !important; border: 1.5px solid #BFD3FB !important; }
  body:not(.capacitor-app) .site-header.nmh-white .btn-postproperty:hover { background: #EFF4FF !important; border-color: #2563EB !important; color: #1D4ED8 !important; }
  body:not(.capacitor-app) .site-header.nmh-white .btn-postproperty small { background: #DCFCE7 !important; color: #15803D !important; }
  body:not(.capacitor-app) .site-header.nmh-white .hv2-login-btn { background: #2563EB !important; color: #fff !important; box-shadow: 0 8px 18px -8px rgba(37,99,235,.7) !important; }
  body:not(.capacitor-app) .site-header.nmh-white .hv2-login-btn:hover { background: #1D4ED8 !important; color: #fff !important; }
  body:not(.capacitor-app) .site-header.nmh-white .nmh-user { background: #F3F6FB !important; color: #1F2A44 !important; }
  body:not(.capacitor-app) .site-header.nmh-white .nmh-user:hover { background: #E6EEFF !important; color: #1D4ED8 !important; }

  /* ================= BLUE (compact) ================= */
  body:not(.capacitor-app) .site-header.nmh-blue {
    background: linear-gradient(100deg, #1E3A8A 0%, #1D4ED8 40%, #2563EB 75%, #3B82F6 100%) !important;
    border-bottom: 0 !important; box-shadow: 0 1px 0 rgba(255,255,255,.08) !important;
  }
  body:not(.capacitor-app) .site-header.nmh-blue .city-btn { background: rgba(255,255,255,.14); color: #fff; }
  body:not(.capacitor-app) .site-header.nmh-blue .city-btn:hover { background: rgba(255,255,255,.22); color: #fff; border-color: transparent; }
  body:not(.capacitor-app) .site-header.nmh-blue .mega-nav a.mega-plain-link,
  body:not(.capacitor-app) .site-header.nmh-blue .mega-item > button.nmh-more { color: rgba(255,255,255,.92); }
  body:not(.capacitor-app) .site-header.nmh-blue .mega-nav a.mega-plain-link:hover,
  body:not(.capacitor-app) .site-header.nmh-blue .mega-item > button.nmh-more:hover,
  body:not(.capacitor-app) .site-header.nmh-blue .mega-nav a.mega-plain-link.is-on { color: #fff; background: rgba(255,255,255,.12); }
  body:not(.capacitor-app) .site-header.nmh-blue .mega-nav a.mega-plain-link::after { display: none; }
  body:not(.capacitor-app) .site-header.nmh-blue .mega-nav a.nmh-offer.is-fest { background: #FDE68A; color: #7C2D12 !important; }
  body:not(.capacitor-app) .site-header.nmh-blue .mega-nav a.nmh-offer.is-fest:hover { background: #FCD34D; }
  body:not(.capacitor-app) .site-header.nmh-blue .hv2-nav-wishlist { background: rgba(255,255,255,.14); color: #fff; }
  body:not(.capacitor-app) .site-header.nmh-blue .hv2-nav-wishlist:hover { background: rgba(255,255,255,.24); color: #fff; }
  body:not(.capacitor-app) .site-header.nmh-blue .btn-postproperty { background: transparent !important; color: #fff !important; border: 1.5px solid rgba(255,255,255,.6) !important; }
  body:not(.capacitor-app) .site-header.nmh-blue .btn-postproperty:hover { background: rgba(255,255,255,.12) !important; color: #fff !important; }
  body:not(.capacitor-app) .site-header.nmh-blue .btn-postproperty small { background: #FDE68A !important; color: #7C2D12 !important; }
  body:not(.capacitor-app) .site-header.nmh-blue .nmh-user { background: rgba(255,255,255,.14) !important; color: #fff !important; }
  body:not(.capacitor-app) .site-header.nmh-blue .nmh-user .nmh-av { background: #fff; color: #1D4ED8; }

  /* ================= CLASSIC (old look, only made legible) ================= */
  body:not(.capacitor-app) .site-header.nmh-classic .city-btn { background: rgba(255,255,255,.1); color: #fff; }
  body:not(.capacitor-app) .site-header.nmh-classic .nmh-offer.is-fest { background: rgba(253,230,138,.18); color: #FDE68A !important; }
  body:not(.capacitor-app) .site-header.nmh-classic .nmh-user { color: #fff !important; }
}

/* Buyer "My activity" counts in the account menu (website + phone menu) */
.nmh-act { padding: 10px 12px 12px; margin: 0 0 6px; border-bottom: 1px solid #EEF2F7; }
.nmh-act > b { display: block; font: 700 12px Inter, sans-serif; color: #64748B; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.nmh-act > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nmh-act a { display: flex !important; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px !important; border-radius: 10px; background: #F5F8FF; text-decoration: none; border: 0 !important; margin: 0 !important; width: auto !important; }
.nmh-act a:hover { background: #E6EEFF; }
.nmh-act strong { font: 800 17px Poppins, Inter, sans-serif; color: #1D4ED8; }
.nmh-act span { font-size: 11.5px; font-weight: 600; color: #475569; }
.mega-panel:has(.nmh-act) { min-width: 320px; }
.nmh-act span { white-space: nowrap; font-size: 11px; }

/* ===== #103 laptops at 100% zoom (the old limits were made for the 90% zoom removed in #88) =====
   Everything stays on one line and "Login / Sign Up" is never cut, 1161–1535px. */
@media (min-width: 1161px) and (max-width: 1535px) {
  body:not(.capacitor-app) .site-header.nmh .header-inner { gap: 10px !important; padding: 0 16px !important; }
  body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link,
  body:not(.capacitor-app) .site-header.nmh .mega-item > button.nmh-more { padding: 10px 7px !important; font-size: 14px !important; }
  body:not(.capacitor-app) .site-header.nmh .logo .hv2-logo-img,
  body:not(.capacitor-app) .site-header.nmh .logo .nmh-logo-dark { height: 40px !important; }
  body:not(.capacitor-app) .site-header.nmh .city-btn { padding: 7px 11px !important; font-size: 14px !important; }
  body:not(.capacitor-app) .site-header.nmh .btn-postproperty small { display: none !important; }
  body:not(.capacitor-app) .site-header.nmh .btn-postproperty { padding: 8px 12px !important; }
  body:not(.capacitor-app) .site-header.nmh .hv2-login-btn { padding: 9px 14px !important; white-space: nowrap; }
  body:not(.capacitor-app) .site-header.nmh .hv2-nav-wishlist,
  body:not(.capacitor-app) .site-header.nmh .hv2-nav-bell { width: 36px !important; height: 36px !important; }
}
@media (min-width: 1161px) and (max-width: 1300px) {
  body:not(.capacitor-app) .site-header.nmh .header-inner { gap: 8px !important; padding: 0 12px !important; }
  body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link,
  body:not(.capacitor-app) .site-header.nmh .mega-item > button.nmh-more { padding: 10px 6px !important; font-size: 13.5px !important; }
  body:not(.capacitor-app) .site-header.nmh .hv2-login-btn .nmh-login-long { display: none; }
}

/* smallest desktop widths (1161–1260px): everything incl. "All Property" fits on one line */
@media (min-width: 1161px) and (max-width: 1260px) {
  body:not(.capacitor-app) .site-header.nmh .header-inner { gap: 6px !important; padding: 0 10px !important; }
  body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link,
  body:not(.capacitor-app) .site-header.nmh .mega-item > button.nmh-more { padding: 10px 5px !important; font-size: 13px !important; }
  body:not(.capacitor-app) .site-header.nmh .logo .hv2-logo-img,
  body:not(.capacitor-app) .site-header.nmh .logo .nmh-logo-dark { height: 36px !important; }
  body:not(.capacitor-app) .site-header.nmh .city-btn { padding: 6px 9px !important; font-size: 13px !important; }
  body:not(.capacitor-app) .site-header.nmh .btn-postproperty { padding: 7px 10px !important; font-size: 13px !important; }
  body:not(.capacitor-app) .site-header.nmh .hv2-login-btn { padding: 8px 12px !important; font-size: 13px !important; }
  body:not(.capacitor-app) .site-header.nmh .hv2-nav-wishlist,
  body:not(.capacitor-app) .site-header.nmh .hv2-nav-bell { width: 32px !important; height: 32px !important; }
}
/* 1261–1400px (most laptops): the account button shows only its round initial, so "All Property"
   and everything else stay on one line for every member type (buyer, owner, agent, developer) */
@media (min-width: 1161px) and (max-width: 1400px) {
  body:not(.capacitor-app) .site-header.nmh .nmh-user .nmh-first { display: none !important; }
}
@media (min-width: 1261px) and (max-width: 1400px) {
  body:not(.capacitor-app) .site-header.nmh .header-inner { gap: 10px !important; }
  body:not(.capacitor-app) .site-header.nmh .mega-nav a.mega-plain-link,
  body:not(.capacitor-app) .site-header.nmh .mega-item > button.nmh-more { padding-left: 7px !important; padding-right: 7px !important; }
}
