/*--------------------------------------------------------------
# Directory Search Form — directory-search.css
#
# Base style: dark navy (header + results page hero)
# Homepage override: .hero-box .cp-search-* (white bg, bigger padding)
# Mirrors prototype results-search-* and hero-box overrides exactly.
--------------------------------------------------------------*/

/* ── Wrapper ── */
.cp-search-form-wrap {
  width: 100%;
}

.cp-search-form {
  width: 100%;
}

/* ── Field row ── */
.cp-search-fields {
  display: flex;
  align-items: center;
  max-width: 620px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

/* ── Location input wrap ── */
.cp-search-location-wrap {
  position: relative;
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ── Location text input ── */
.cp-search-input {
  width: 100%;
  background: none;
  border: none !important;
  outline: none;
  padding: 10px 32px 10px 12px;
  font-size: 14px;
  font-family: "Lato", system-ui, -apple-system, sans-serif;
  color: #fff;
}

.cp-search-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

/* ── Geolocate button ── */
.cp-geolocate-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.cp-geolocate-btn:hover {
  color: #fff;
}

.cp-geolocate-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Divider between input and select ── */
.cp-search-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  align-self: center;
}

/* ── Category select ── */
.cp-search-select {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 10px 28px 10px 12px;
  font-size: 14px;
  font-family: "Lato", system-ui, -apple-system, sans-serif;
  color: #fff;
  cursor: pointer;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.7)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.cp-search-select option {
  background: #002751;
  color: #fff;
}

/* ── Search button ── */
.cp-search-btn {
  flex-shrink: 0;
  background: #ff1f1f;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Lato", system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.cp-search-btn:hover {
  background: #d91a1a;
}

/* ── Geo status message ── */
.cp-geo-status {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  min-height: 18px;
}

/* Header From CSS */
.header_search .cp-search-btn{background: #002751;padding:6px 40px 6px 40px;font-size:12px;border-radius:50px;transition: background var(0.2s ease), color var(0.2s ease); }
.header_search  .cp-search-fields{border-radius:50px;}
.header_search  .cp-geo-status{display:none;}
.header_search .cp-search-input, .header_search  .cp-search-select{padding:5px 24px 5px 10px;}

/*--------------------------------------------------------------
# Homepage hero override — white background, bigger padding
# Wrap the shortcode in an element with class "hero-box"
--------------------------------------------------------------*/

.hero-box .cp-search-fields {
  max-width: 100%;
  background: #ffffff;
  border-color: transparent;
}

.hero-box .cp-search-input {
  color: #002751;
  padding-top: 20px;
  padding-bottom: 20px;
}

.hero-box .cp-search-input::placeholder {
  color: rgba(0, 39, 81, 0.45);
}

.hero-box .cp-search-select {
  color: #002751;
  padding-top: 20px;
  padding-bottom: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(0,39,81,0.6)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.hero-box .cp-search-select option {
  background: #fff;
  color: #002751;
}

.hero-box .cp-search-btn {
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: 28px;
  padding-right: 28px;
}

.hero-box .cp-search-divider {
  background: rgba(0, 39, 81, 0.2);
}

.hero-box .cp-geolocate-btn {
  color: rgba(0, 39, 81, 0.45);
}

.hero-box .cp-geolocate-btn:hover {
  color: #002751;
}

.hero-box .cp-geo-status {
  color: rgba(0, 39, 81, 0.6);
}

/*--------------------------------------------------------------
# Results page override — same as header (dark) but full width
--------------------------------------------------------------*/

.cp-results-wrap .cp-search-fields {
  max-width: 100%;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .cp-search-fields {
    flex-wrap: wrap;
  }

  .cp-search-location-wrap {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .cp-search-divider {
    display: none;
  }

  .cp-search-select {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .cp-search-btn {
    width: 100%;
  }

  .hero-box .cp-search-location-wrap {
    border-bottom: 1px solid rgba(0, 39, 81, 0.15);
  }

  .hero-box .cp-search-select {
    border-bottom: 1px solid rgba(0, 39, 81, 0.15);
  }
}
