/* The map of the schools (schools-map.php) and a school's directions (school-directions.php): the
   same look as the RSVP pages (RSVP/rsvp.css), sized for phones. */
.sm { --ink: #1f2430; --muted: #6b7280; --line: #dde1ee; --soft: #f7f8fb; --brand: #2600a4;
  font: 15px/1.5 Arial, Helvetica, sans-serif; color: var(--ink); padding: 4px 14px 24px; text-align: left; }
.sm * { box-sizing: border-box; }
.sm a { color: var(--brand); }
.sm-title { margin: 4px 0 4px; font: bold 24px/1.2 Arial, Helvetica, sans-serif; color: var(--brand); }
.sm-lead { margin: 0 0 12px; color: #374151; }
.sm-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.sm-back { margin: 0 0 6px; font-size: 14px; }
.sm-back a { text-decoration: none; }

/* The map: labelled pins */
.sm-map { height: 60vh; min-height: 320px; max-height: 560px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; z-index: 0; }
.sm-pin { cursor: pointer; }
.sm-dot { position: absolute; left: 0; top: 0; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: #2600a4; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.sm-label { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 2px 7px; border-radius: 999px; background: #2600a4; color: #fff; font: bold 13px/1.3 Arial, Helvetica, sans-serif; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.sm-pin.l .sm-label { left: auto; right: 18px; }   /* label left of the pin */
.sm-pin.b .sm-label { top: 18px; left: 50%; transform: translateX(-50%); }   /* below */
.sm-pin.t .sm-label { top: auto; bottom: 18px; left: 50%; transform: translateX(-50%); }   /* above */
.sm-pin.tr .sm-label { top: auto; bottom: 12px; left: 12px; transform: none; }   /* corners */
.sm-pin.br .sm-label { top: 12px; left: 12px; transform: none; }
.sm-pin.tl .sm-label { top: auto; bottom: 12px; left: auto; right: 12px; transform: none; }
.sm-pin.bl .sm-label { top: 12px; left: auto; right: 12px; transform: none; }
.sm-pin.nolabel .sm-label { display: none; }   /* no room at this zoom */
.sm-zoom { margin: -6px 0 8px; color: var(--muted); font-size: 13px; }
.sm [hidden] { display: none !important; }
.sm-pin:hover .sm-label, .sm-pin:focus .sm-label { background: #1d0080; text-decoration: underline; }

/* The schools as tiles */
.sm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.sm-school { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; }
.sm a.sm-school { color: var(--ink); }
/* The site's links (.norm a, pub2005.css) carry a dotted underline image: not on tiles and buttons. */
.sm a.sm-school, .sm a.sm-btn { background: #fff; }
.sm-school b { color: var(--brand); font-size: 15px; }
.sm-school span { font-size: 13px; color: var(--muted); }
.sm-school .sm-go { color: var(--brand); font-weight: bold; }
a.sm-school:hover, a.sm-school:focus { border-color: #8f86d9; box-shadow: 0 2px 8px rgba(38, 0, 164, .12); outline: none; }

/* A school's directions */
.sm-jump { margin: 0 0 16px; font-size: 14px; line-height: 1.9; }
.sm-section { margin: 0 0 22px; padding-top: 6px; border-top: 1px solid var(--line); }
.sm-name { margin: 10px 0 2px; font: bold 19px/1.25 Arial, Helvetica, sans-serif; color: var(--brand); }
.sm-addr { margin: 0 0 10px; }
.sm-locnote { margin: -6px 0 12px; padding: 8px 12px; border-radius: 10px; background: #fff8dc; border: 1px solid #f0d766; font-size: 14px; }
.sm-locnote p { margin: 0; }
.sm-locnote p + p { margin-top: 6px; }
.sm-open { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.sm-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: bold; text-decoration: none; }
.sm a.sm-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.sm-dirs { padding: 14px 16px 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.sm-dirs p { margin: 0 0 12px; }
.sm-dirs .sd-normB, .sm-dirs b, .sm-dirs strong { display: inline; font-weight: bold; color: var(--ink); }
.sm-dirs .sd-normB { display: block; margin: 4px 0 2px; color: var(--brand); }
.sm-dirs .sd-subNorm { color: #374151; }
.sm-dirs table { float: right; margin: 0 0 10px 14px; border-collapse: collapse; }
.sm-dirs td { padding: 0; font-size: 12px; color: var(--muted); text-align: center; }
.sm-dirs img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 780px) {
  .sm { padding-left: 0; padding-right: 0; }   /* on phones the page has its own margins */
}
@media (max-width: 600px) {
  .sm-title { font-size: 22px; }
  .sm-map { height: 55vh; }
  .sm-label { padding: 1px 6px; font-size: 12px; }
  .sm-dirs { padding: 12px 12px 2px; }
  .sm-dirs table { float: none; margin: 0 auto 12px; }
  .sm-btn { flex: 1 1 auto; justify-content: center; }
}
