/*
 * Localsewa Mobile UI Polish — v32.8.24
 * Scope: approved v32.8 customer/public frontend only.
 * - Compact header in mobile interaction mode.
 * - Header notification/menu controls are icon-only (no visible tile/container).
 * - Search bars use a true pill radius.
 * - Home trust points never wrap into a second line.
 * - Hero location and marketing kicker have distinct visual roles.
 * - Search focus uses only the outer border, never an inner input outline/ring.
 * - Mobile Popular Services removes the redundant Explore eyebrow.
 */

/* Search component is shared across the customer/public frontend. */
#root:has(.ls-public-header) .ls-search-form {
  border-radius: 9999px !important;
}

#root:has(.ls-public-header) .ls-search-form input[type="search"] {
  border-radius: 9999px !important;
}

/* The three hero trust points must remain a single horizontal row. */
#root:has(.ls-public-header) .ls-home-trust-points {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: 100%;
  min-width: 0;
  gap: 8px !important;
  white-space: nowrap;
}

#root:has(.ls-public-header) .ls-home-trust-points > span {
  min-width: 0;
  flex: 0 1 auto;
  gap: 4px !important;
  white-space: nowrap;
}

/* Phone layout. Desktop remains at its existing 72px header. */
@media (max-width: 767.98px) {
  #root:has(.ls-public-header) .ls-public-header-inner {
    height: 60px !important;
    min-height: 60px !important;
    gap: 6px !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
  }

  #root:has(.ls-public-header) .ls-public-header-inner > a:first-child img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
  }

  /* Preserve a comfortable tap target, but remove the visible square/pill tile. */
  #root:has(.ls-public-header) .ls-public-notifications > button,
  #root:has(.ls-public-header) .ls-public-menu-button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #root:has(.ls-public-header) .ls-public-notifications > button:hover,
  #root:has(.ls-public-header) .ls-public-menu-button:hover,
  #root:has(.ls-public-header) .ls-public-notifications > button:active,
  #root:has(.ls-public-header) .ls-public-menu-button:active {
    border-color: transparent !important;
    background: transparent !important;
  }

  /* Sticky home search follows the compact header instead of leaving a gap. */
  .ls-home-sticky-search {
    top: 60px !important;
  }

  /* Notifications panel follows the compact header as well. */
  [role="dialog"][aria-label="Notifications"] > section {
    top: 64px !important;
  }

  #root:has(.ls-public-header) .ls-home-trust-points {
    margin-top: 14px !important;
    justify-content: space-between;
    gap: 5px !important;
    font-size: clamp(8px, 2.55vw, 10px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em;
  }

  #root:has(.ls-public-header) .ls-home-trust-points > span {
    gap: 3px !important;
  }

  #root:has(.ls-public-header) .ls-home-trust-points svg {
    width: 12px !important;
    height: 12px !important;
    flex: 0 0 12px !important;
  }
}

/* Tablet follows Localsewa's mobile interaction model. */
@media (min-width: 768px) and (max-width: 1023.98px),
       (min-width: 768px) and (max-width: 1439.98px) and (hover: none) and (pointer: coarse) {
  #root:has(.ls-public-header) .ls-public-header-inner {
    height: 64px !important;
    min-height: 64px !important;
  }

  #root:has(.ls-public-header) .ls-public-notifications > button,
  #root:has(.ls-public-header) .ls-public-menu-button {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #root:has(.ls-public-header) .ls-public-notifications > button:hover,
  #root:has(.ls-public-header) .ls-public-menu-button:hover,
  #root:has(.ls-public-header) .ls-public-notifications > button:active,
  #root:has(.ls-public-header) .ls-public-menu-button:active {
    border-color: transparent !important;
    background: transparent !important;
  }

  .ls-home-sticky-search {
    top: 64px !important;
  }

  [role="dialog"][aria-label="Notifications"] > section {
    top: 68px !important;
  }

  #root:has(.ls-public-header) .ls-home-trust-points {
    justify-content: flex-start;
    gap: 18px !important;
    font-size: 12px !important;
  }
}


/* v32.8.23 — search focus polish.
   The reusable search form owns focus indication; the input itself must stay visually clean. */
#root:has(.ls-public-header) .ls-search-form:focus-within {
  border-color: #4ADE80 !important;
  outline: none !important;
}

#root:has(.ls-public-header) .ls-search-form input[type="search"],
#root:has(.ls-public-header) .ls-search-form input[type="search"]:focus,
#root:has(.ls-public-header) .ls-search-form input[type="search"]:focus-visible,
#root:has(.ls-public-header) .ls-search-form input[type="search"]:active {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 767.98px) {
  /* Location remains an interactive utility control. */
  #root:has(.ls-public-header) .ls-home-location-control {
    height: 32px !important;
    max-width: min(78vw, 280px) !important;
    border-color: rgba(255,255,255,0.24) !important;
    background: rgba(4, 96, 50, 0.40) !important;
    box-shadow: 0 7px 20px rgba(0,0,0,0.08) !important;
  }

  /* The trust message is an eyebrow, not a second location-style pill. */
  #root:has(.ls-public-header) .ls-home-hero-kicker {
    margin-bottom: 9px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.14em !important;
    color: rgba(232,255,240,0.94) !important;
  }

  #root:has(.ls-public-header) .ls-home-hero-kicker svg {
    width: 13px !important;
    height: 13px !important;
  }

  /* Bigger labels with one consistent gap between all three items. */
  #root:has(.ls-public-header) .ls-home-trust-points {
    justify-content: center !important;
    gap: clamp(6px, 2.2vw, 10px) !important;
    font-size: clamp(9.5px, 2.7vw, 11px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.015em !important;
  }

  #root:has(.ls-public-header) .ls-home-trust-points > span {
    flex: 0 0 auto !important;
    gap: 2.5px !important;
  }

  #root:has(.ls-public-header) .ls-home-trust-points svg {
    width: 11px !important;
    height: 11px !important;
    flex-basis: 11px !important;
  }

  /* Two-level mobile heading: title + useful description. "Explore" is redundant here. */
  #root:has(.ls-public-header) .ls-home-popular-eyebrow {
    display: none !important;
  }
}

@media (max-width: 339.98px) {
  #root:has(.ls-public-header) .ls-home-trust-points {
    gap: 5px !important;
    font-size: 9px !important;
  }

  #root:has(.ls-public-header) .ls-home-trust-points svg {
    width: 10px !important;
    height: 10px !important;
    flex-basis: 10px !important;
  }
}


/* v32.8.24 — hero hierarchy, trust spacing and Popular Services CTA alignment. */
@media (max-width: 767.98px) {
  /* Trusted-help eyebrow now sits between the hero heading and supporting copy. */
  #root:has(.ls-public-header) .ls-home-hero-kicker {
    margin-top: 8px !important;
    margin-bottom: 5px !important;
  }

  /* Give the three trust labels a little more breathing room while keeping one line. */
  #root:has(.ls-public-header) .ls-home-trust-points {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  /* Align See all with the Popular services title rather than with the description. */
  #root:has(.ls-public-header) .ls-home-popular-header {
    position: relative !important;
    display: block !important;
  }

  #root:has(.ls-public-header) .ls-home-popular-header > div:first-child {
    min-width: 0;
    padding-right: 78px;
  }

  #root:has(.ls-public-header) .ls-home-popular-see-all {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    min-height: 28px;
    align-items: center !important;
  }
}

@media (max-width: 339.98px) {
  #root:has(.ls-public-header) .ls-home-trust-points {
    gap: 6px !important;
  }

  #root:has(.ls-public-header) .ls-home-popular-header > div:first-child {
    padding-right: 72px;
  }
}
