/* ==========================================================================
   HappyPreggie - Location Search UX (Progressive Disclosure & Scope Chip)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Root Container & Transitions
   -------------------------------------------------------------------------- */
.hp-location-ux-wrapper {
  position: relative;
  width: 100%;
  transition: all 0.25s ease;
}

/* --------------------------------------------------------------------------
   Location Field & Active Scope Chip
   -------------------------------------------------------------------------- */
.hp-opt1-location-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
}

.hp-opt1-input-field {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--hp-font-sans, 'Nunito', sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--hp-text-primary, #1e1135);
  cursor: pointer;
  padding: 4px 0;
  outline: none;
  display: flex;
  align-items: center;
  user-select: none;
}

.hp-opt1-input-field:hover span {
  color: var(--hp-purple-primary, #6a1b9a) !important;
}

.hp-opt1-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e6f7f6;
  color: #04746a;
  border: 1px solid #b3ebe7;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  max-width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.hp-opt1-chip:hover {
  background: #d5f2f0;
  border-color: #8ce0d9;
}

.hp-opt1-chip.city-chip {
  background: #f4edf9;
  color: #55137d;
  border-color: #dfceef;
}

.hp-opt1-chip.city-chip:hover {
  background: #ebe0f4;
  border-color: #cdafe7;
}

.hp-opt1-chip-clear {
  background: none;
  border: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hp-opt1-chip-clear:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   Contextual Popover
   -------------------------------------------------------------------------- */
.hp-opt1-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 360px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(18, 6, 33, 0.22);
  border: 1px solid #ede8f2;
  padding: 16px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: hpUxFadeSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hp-opt1-popover.open {
  display: flex;
}

@keyframes hpUxFadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hp-popover-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7b6f8a;
  margin-bottom: 2px;
}

.hp-popover-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-popover-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fbf9fd;
  border: 1px solid #ede8f2;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1e1135;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.hp-popover-action-btn:hover {
  background: #f4edf9;
  border-color: #6a1b9a;
  color: #6a1b9a;
}

.hp-popover-action-btn.active {
  background: #e6f7f6;
  border-color: #0aac9e;
  color: #04746a;
}

/* Radius pill selector */
.hp-radius-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hp-radius-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #ddd6e5;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  color: #4a3e5c;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hp-radius-pill:hover {
  border-color: #6a1b9a;
  color: #6a1b9a;
}

.hp-radius-pill.active {
  background: #6a1b9a;
  border-color: #6a1b9a;
  color: #ffffff;
}

/* City input and popular chips */
.hp-popover-city-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd6e5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.hp-popover-city-input:focus {
  border-color: #6a1b9a;
  box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.1);
}

.hp-popover-quick-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hp-quick-city-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f4edf9;
  color: #55137d;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.hp-quick-city-chip:hover {
  background: #6a1b9a;
  color: #ffffff;
}

.hp-quick-city-chip.active {
  background: #6a1b9a;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Search Form Grid Layout
   -------------------------------------------------------------------------- */
.hp-search-composite,
.hp-directory-search-strip {
  grid-template-columns: 1.3fr 1.1fr auto;
}

@media (max-width: 991px) {
  .hp-opt1-popover {
    width: calc(100vw - 28px);
    position: fixed;
    top: auto;
    bottom: calc(var(--hp-mobile-bottom-height, 62px) + 14px);
    left: 14px;
    box-shadow: 0 -8px 30px rgba(18, 6, 33, 0.25);
  }
}

@media (max-width: 767px) {
  .hp-search-composite,
  .hp-directory-search-strip {
    grid-template-columns: 1fr !important;
  }
}
