/* The school directory and the school pages.

   Its own file rather than an addition to site.css. stamp_assets.py stamps
   every asset with a hash of its own contents, so editing site.css changes its
   stamp, rewrites that reference in every page on the site, and makes the next
   deploy re-upload all of them. Keeping these rules here holds the cost to the
   317 pages that actually need them.

   Everything below reuses site.css's variables and its .lp-intro / .condo-row
   furniture, so the pages already match the rest of the site before a single
   rule here applies. */

/* ---- the find-your-school panel ---------------------------------------- */

/* Hidden in the markup and revealed by js/schools.js. With JavaScript off the
   panel never appears, and the full directory underneath is still the whole
   answer — so nothing is lost, rather than a dead button being offered. */
.school-find {
  margin: 0 auto 26px;
  padding: 20px 22px;
  max-width: 1180px;
  background: var(--paper-2, #faf8f5);
  border: 1px solid var(--rule, #e6e1da);
  border-radius: 14px;
}

.school-find h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }

.school-find-lead { margin: 2px 0 0; color: var(--ink-2, #3a3a3a); }

/* The picker and the location button sit on one row and stack on a phone.
   align-items: end so the button's baseline meets the select's, not the
   label sitting above it. */
.school-find-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0 0;
}

/* The field itself is .sb-field from css/search-bar.css — input styling,
   label styling and the position: relative that .sb-ac anchors to all come
   from there, so only the width is set here. */
.school-find-field { width: 320px; max-width: 100%; }

@media (max-width: 560px) {
  /* Full width on a phone, and the button under the field rather than beside
     it. The suggestion list is absolutely positioned against the field, so it
     follows without any further work. */
  .school-find-actions { flex-direction: column; align-items: stretch; }
  .school-find-field { width: 100%; }
  .school-find-btn { justify-content: center; }
}

/* The button is site.css's .dgn-cta — the same orange pill the rest of the
   site uses for a primary action. It was .btn first, which is only ever
   defined scoped inside .guide__card and .pdp-head-cta, so out here it
   rendered as a bare browser button. Disabled while the lookup runs. */
.school-find-btn[disabled] { opacity: 0.6; cursor: default; }

.school-find-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-3, #6b6b6b); }

.school-find-out { margin: 16px 0 0; }
.school-find-out[hidden] { display: none; }

.school-find-area { font-size: 14px; color: var(--ink-3, #6b6b6b); margin: 0 0 10px; }

/* One block per attendance area, for the 83 neighbourhoods that sit across
   more than one. The heading names the area; the rows beneath are its
   designated schools. */
.school-find-multi { margin: 14px 0 0; }

.school-find-multi h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  padding: 10px 0 2px;
  border-top: 1px solid var(--rule, #e6e1da);
}

.school-find-multi .school-result:first-of-type { border-top: 0; }

/* ---- designated-school results ----------------------------------------- */

.school-result {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--rule, #e6e1da);
  align-items: baseline;
}

.school-result-level { font-size: 13px; font-weight: 600; color: var(--ink-3, #6b6b6b); }
.school-result-name { font-size: 16px; font-weight: 600; }
.school-result-grades { font-size: 13px; color: var(--ink-3, #6b6b6b); }

/* A single attendance area can send different grades to different schools, so
   a level can hold more than one row. */
.school-result-name + .school-result-name { margin-top: 2px; }

@media (max-width: 560px) {
  .school-result { grid-template-columns: 1fr; gap: 2px; }
  .school-find { padding: 16px; border-radius: 12px; }
}

/* ---- the school page --------------------------------------------------- */

.school-facts {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px 28px;
}

.school-facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule, #e6e1da);
  font-size: 14px;
}

.school-fact-k { color: var(--ink-3, #6b6b6b); }
.school-fact-v { font-weight: 600; text-align: right; }

/* Long values — a website or a full address — wrap rather than pushing the
   row wider than its column. */
.school-fact-v { min-width: 0; overflow-wrap: anywhere; }

.school-catch-grp { margin: 18px 0 0; }
.school-catch-grp h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }

.school-catch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 4px 20px;
  font-size: 14px;
}

.school-catch-list li {
  padding: 5px 0;
  color: var(--ink-2, #3a3a3a);
}

/* The two honesty lines: the confirm-with-the-board note on a catchment, and
   the attribution at the foot of the page. Quiet, but never hidden. */
.school-confirm,
.school-credit {
  font-size: 13px;
  color: var(--ink-3, #6b6b6b);
  line-height: 1.55;
}

.school-confirm { margin: 16px 0 0; }

.school-credit {
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--rule, #e6e1da);
}

/* The suggestion list's "nothing matched" row. Not an option: no data-v, so
   it cannot be clicked or chosen, and it must not look like one either. */
.sb-ac-empty {
  display: block;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3, #6b6b6b);
  cursor: default;
}
