/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #1B4F8A;
  --teal:   #2AABAB;
  --teal-d: #1e8a8a;
  --bg:     #F0F6FF;
  --card:   #FFFFFF;
  --text:   #1a2a3a;
  --muted:  #5a7080;
  --border: #d0dde8;
  --red:    #d94040;
  --radius: 12px;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ────────────────────────────────────────────────── */
header {
  background: #fff;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  padding: 36px 24px 32px;
  text-align: center;
}

.brand {
  margin-bottom: 20px;
}

.header-logo {
  height: 80px;
  width: auto;
}

header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  color: var(--navy);
}

.tagline {
  font-size: 1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Main Layout ───────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* ─── Search Card ───────────────────────────────────────────── */
.search-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(27,79,138,0.10);
  padding: 32px 28px 28px;
  margin-bottom: 32px;
}

.search-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.field {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-zip { flex: 0 1 160px; }

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"] {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.98rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,171,171,0.15);
}
input[type="text"]::placeholder { color: #aab8c4; }

/* ─── Radius Slider ─────────────────────────────────────────── */
.radius-row {
  margin-top: 24px;
}

.radius-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.radius-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.radius-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.slider-track-wrap {
  position: relative;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--teal) 0%, var(--teal) 25%, var(--border) 25%, var(--border) 100%);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(27,79,138,0.35);
  cursor: pointer;
  transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(27,79,138,0.35);
  cursor: pointer;
}

.slider-stops {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.slider-stops span {
  font-size: 0.72rem;
  color: #aab8c4;
}

.radius-note {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #aab8c4;
  font-style: italic;
}

/* ─── Search Actions ────────────────────────────────────────── */
.search-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 32px;
  transition: background 0.18s, transform 0.1s, box-shadow 0.18s;
}

#search-btn {
  background: var(--teal);
  color: #fff;
  flex: 1 1 160px;
  box-shadow: 0 3px 12px rgba(42,171,171,0.30);
}
#search-btn:hover  { background: var(--teal-d); box-shadow: 0 4px 16px rgba(42,171,171,0.40); }
#search-btn:active { transform: scale(0.98); }

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  flex: 0 1 auto;
}
.btn-secondary:hover { background: var(--bg); border-color: #b0c4d4; }

/* ─── Error ─────────────────────────────────────────────────── */
.error-msg {
  margin-top: 16px;
  background: #fff0f0;
  border: 1px solid #f5b8b8;
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--red);
  font-size: 0.9rem;
}

/* ─── Results Summary ───────────────────────────────────────── */
.results-summary {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
  padding-left: 4px;
}

.results-summary strong { color: var(--navy); }

/* ─── Section Divider ───────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Result Cards ──────────────────────────────────────────── */
.results-list { display: flex; flex-direction: column; gap: 14px; }

.result-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(27,79,138,0.07);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-left: 4px solid transparent;
  transition: box-shadow 0.18s;
}
.result-card:hover { box-shadow: 0 4px 20px rgba(27,79,138,0.13); }

.result-card.match-primary  { border-left-color: var(--teal); }
.result-card.match-radius   { border-left-color: var(--navy); }

.card-info { flex: 1; min-width: 0; }

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-address {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-match    { background: #e0f7f7; color: #1a8080; }
.tag-private  { background: #fff3e0; color: #b35a00; }
.tag-distance { background: #edf3ff; color: #1B4F8A; }
.tag-star     { background: #fff8cc; color: #8a6000; }

.card-action { flex-shrink: 0; }

.btn-book {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.18s, transform 0.1s;
}
.btn-book:hover  { background: #153e70; }
.btn-book:active { transform: scale(0.97); }

/* ─── No Results ────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 48px 24px;
}

.no-results-inner {
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px 32px;
  box-shadow: 0 2px 12px rgba(27,79,138,0.07);
}

.no-results-icon { font-size: 2.5rem; display: block; margin-bottom: 16px; }

.no-results h2 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.no-results p {
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.contact-link {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 8px;
}
.contact-link:hover { background: var(--teal-d); }

/* ─── Footer ────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer a { color: var(--teal); text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; }

/* ─── Utility ───────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Loading State ─────────────────────────────────────────── */
#search-btn.loading {
  background: #aab8c4;
  pointer-events: none;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 560px) {
  header { padding: 36px 20px 32px; }
  .search-card { padding: 24px 18px 22px; }
  .result-card { flex-direction: column; align-items: stretch; }
  .btn-book { display: block; text-align: center; }
  .search-row { flex-direction: column; }
  .field-zip { flex: 1 1 auto; }
}
