*,
*::before,
*::after {
  box-sizing: border-box;
}

/* APP_FONT_FAMILY: change this string (and the Google Fonts link in index.html)
   if you want a different Google Font family. */
:root {
  --app-font: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Culligan-ish blues */
  --blue-main: #0072bc;      /* primary blue */
  --blue-soft: #e6f1fb;      /* light background blue */
  --blue-border: #b3d4f5;
}

body {
  margin: 0;
  font-family: var(--app-font);
  background: #f3f6fb;
  color: #111827;

  /* Keep footer links pinned to the bottom on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;

  /* allow the footer to sit at the bottom */
  flex: 1;
}


/* Title in the center of the main results table */
.table-caption{
  caption-side: top;
  text-align: center;
  padding: 0 0 0.65rem;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--blue-main);
  letter-spacing: -0.01em;
}

/* Search panel */

.search-panel {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  background: linear-gradient(135deg, #ffffff, var(--blue-soft));
  padding: 1.1rem 1.2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--blue-border);
  box-shadow: 0 10px 25px rgba(0, 114, 188, 0.10);
  margin-bottom: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

input[type="text"],
input[type="tel"],
select {
  padding: 0.5rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid #cbd5f5;
  font-size: 0.95rem;
  min-height: 42px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  background-color: #ffffff;
}

input[type="text"]:focus,
input[type="tel"]:focus,
select:focus {
  outline: none;
  border-color: var(--blue-main);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.25);
}

/* Results panel */

.results-panel {
  background: #ffffff;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* Header row above the table */
.results-header {
  display: flex;
  align-items: center;
  justify-content: center; /* center contents */
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.results-summary {
  font-size: 0.9rem;
  color: #1f2933;
  font-weight: 600;
  text-align: center;
}

/* Clear button styling */
.clear-button {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.clear-button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.clear-button:active {
  background: #e5e7eb;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

.clear-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.35);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.results-table th,
.results-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #e5e7eb;
}

.results-table th {
  text-align: left;
  background: var(--blue-soft);
  color: #0f172a;
  font-weight: 600;
}

.results-table tr:nth-child(even) td {
  background: #f9fbff;
}

.results-table tr:hover td {
  background: #e9f3ff;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .page {
    padding: 1rem 0.75rem;
  }

  .table-caption {
    font-size: 1.3rem;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .results-header {
    flex-direction: column;
  }

  .results-table th:nth-child(4),
  .results-table td:nth-child(4) {
    display: none; /* hide county on very small screens */
  }
}

/* Footer links (outside the main table) */
.site-footer{
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0.6rem 1.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.footer-link{
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-main);
  text-decoration: none;
}

.footer-link:hover{
  text-decoration: underline;
}

.footer-link--muted{
  color: #6b7280;
}

@media (max-width: 600px){
  .site-footer{
    padding: 0.6rem 0.75rem 1.1rem;
  }
}
