/* ══════════════════════════════════════════════════════════════
   Task #826891 — Mobile Polish: 4 responsive fixes
   1. hmc-eyebrow nowrap
   2. hmc-slider fill (via JS, see home.ejs)
   3. Desktop search panel styles (nav-header-search-panel)
   (Issue #1 hc-btn-calc text change is in calculator-household.ejs)
══════════════════════════════════════════════════════════════ */

/* ── Issue #2: Eyebrow label wraps on mobile ── */
.hmc-eyebrow {
  white-space: nowrap !important;
}

/* ── Issue #3: Slider progress fill — enable CSS variable so JS can drive gradient ──
   home-sections.css has #main-content .hmc-slider { background:#d1d5db !important }
   which beats the page-level .hmc-slider rule by specificity. Override here (loads last)
   to restore var(--_hmc-fill) so the JS-driven gradient works. */
#main-content .hmc-slider {
  background: var(--_hmc-fill, #d1d5db) !important;
}

/* ── Issue #4: Desktop search icon panel ── */

/* Panel: hidden by default, full-width fixed strip below nav */
.nav-header-search-panel {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.75rem 1.5rem;
  flex-direction: column;
  align-items: stretch;
  /* top is set dynamically by JS (navBottom px) */
}

.nav-header-search-panel.is-open {
  display: flex;
}

/* Input row */
.nav-header-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.nav-header-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-header-search-input {
  width: 100%;
  padding: 0.65rem 2.4rem 0.65rem 2.25rem;
  background: #f9fafb;
  border: 1.5px solid #d1d5db;
  border-radius: 24px;
  color: #111827;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-header-search-input::placeholder {
  color: #9ca3af;
}

.nav-header-search-input:focus {
  background: #fff;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
  outline: none;
}

.nav-header-search-close {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem 0.35rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.nav-header-search-close:hover {
  color: #374151;
  background: #f3f4f6;
}

/* Results dropdown inside the panel */
.nav-header-search-dropdown {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  max-width: 640px;
  width: 100%;
  margin: 0.3rem auto 0;
  border: 1px solid #e5e7eb !important;
  border-top: none !important;
  border-radius: 0 0 12px 12px !important;
  box-shadow: none !important;
  background: #fff;
}

/* Never show the panel on mobile — mobile uses the hamburger search */
@media (max-width: 900px) {
  .nav-header-search-panel {
    display: none !important;
  }
}
