/* Every page: colours, type, the header with its menu button, the dark footer and pieces shared by several areas.
   Area styles: home.css (map search), directory.css (directory and listings), forms.css (cards and forms).
   The look is the legacy site's redesign (whibdev/dcc #32-#38, #52, #56, #67): plum, teal and lilac, 1280px wide. */

:root {
  --plum: #5B2E57;
  --plum-tint: rgba(91, 46, 87, 0.08);
  --teal: #0F7C80;
  --teal-dark: #0B6266;
  --teal-light: #2FA7A0;
  --teal-pale: #E7F4F4;
  --lilac: #F6F1F7;
  --border: #D9CCE0;
  --line: #E3DCE8;
  --text: #3F3F46;
  --muted: #6B6B73;
  --page: #F6F6F7;
  --error: #B42318;
  --band: #1E1E1E;
  --width: 1280px;
  --header-height: 83px;
}

html {
  font-family: Verdana, Helvetica, sans-serif;
  font-size: 15px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  line-height: 1.5;
  background: var(--page);
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

h1,
h2,
h3 {
  color: var(--plum);
  line-height: 1.25;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.2rem;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- header: plum stripe, teal line, lilac band with the logo and a menu button ---------- */

.site-header {
  position: relative;
  z-index: 2000; /* the drop-down sits above Leaflet maps (their panes go up to 1000) */
  border-top: 8px solid var(--plum);
  box-shadow: inset 0 3px 0 var(--teal-light);
  background: var(--lilac);
  border-bottom: 2px solid var(--border);
}

.site-header-inner {
  position: relative;
  box-sizing: border-box;
  max-width: calc(var(--width) + 32px);
  height: 72px;
  margin: 0 auto;
  padding: 3px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  display: block;
  width: 245px; /* logo_a3.svg is 495 x 113, shown at half size */
  height: 56px;
}

.menu-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-signed-in {
  font-size: 0.8rem;
  color: var(--muted);
}

.menu-signed-in strong {
  color: var(--plum);
}

.menu-button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--plum);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.menu-button:hover,
.menu-open .menu-button {
  background: var(--plum-tint);
}

.menu-button .icon-close,
.menu-open .menu-button .icon-menu {
  display: none;
}

.menu-open .menu-button .icon-close {
  display: block;
}

/* the drop-down: a white card, plum on hover, the current page marked with a teal bar */
.site-menu {
  display: none;
  position: absolute;
  right: 16px;
  top: 74px;
  width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.menu-open .site-menu {
  display: block;
}

.site-menu a {
  display: block;
  padding: 0 20px 0 17px;
  font-size: 14px;
  line-height: 44px;
  color: var(--text);
  border-bottom: 1px solid #ECE6EF;
  border-left: 3px solid transparent;
}

.site-menu a:last-child {
  border-bottom: 0;
}

.site-menu a:hover,
.site-menu a:focus {
  color: var(--plum);
  background: var(--lilac);
  text-decoration: none;
}

.site-menu a[aria-current="page"] {
  font-weight: bold;
  color: var(--plum);
  border-left-color: var(--teal-light);
}

/* signed in: small headings over the admin or listing links and the public links, and Log off last */
.site-menu .menu-head {
  display: block;
  padding: 12px 20px 4px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.site-menu .menu-head-rule {
  border-top: 1px solid var(--border);
}

.site-menu .menu-count {
  float: right;
  margin-top: 12px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: bold;
  line-height: 20px;
  color: #fff;
  background: var(--teal);
  border-radius: 999px;
}

.site-menu a.menu-logout {
  font-weight: bold;
  color: var(--plum);
  background: var(--lilac);
}

/* ---------- page content: 1280px wide; the page fills the window so the footer sits at the bottom ---------- */

.site-main {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--width) + 32px);
  margin: 0 auto;
  padding: 16px;
  flex: 1 0 auto;
}

.breadcrumbs {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.breadcrumbs .sep {
  margin: 0 0.5rem;
  color: #A8A0AE;
}

/* a white card on the grey page */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(91, 46, 87, 0.06);
  padding: 24px;
}

/* the main call to action, like the home page's search button */
.site-btn,
a.site-btn {
  display: inline-block;
  padding: 0 28px;
  font: bold 15px Verdana, Helvetica, sans-serif;
  line-height: 46px;
  color: #fff;
  background: var(--teal);
  border: 0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(15, 124, 128, 0.3);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-btn:hover,
a.site-btn:hover {
  color: #fff;
  background: var(--teal-dark);
  text-decoration: none;
}

/* a round numbered map point, as on the home page map: teal for most info, white for less */
.site-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  font: bold 13px Verdana, Helvetica, sans-serif;
  color: #fff;
  background: var(--teal);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  vertical-align: middle;
}

.site-dot.site-dot-small {
  width: 28px;
  height: 28px;
  font-size: 11px;
  color: var(--teal);
  background: #fff;
  border-color: var(--teal);
}

/* ---------- articles and information pages ---------- */

.content {
  max-width: 46rem;
}

.content-intro {
  font-weight: bold;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.content .sign-up {
  font-weight: bold;
  font-size: 1.05rem;
}

.content .faq dt {
  font-weight: bold;
  margin-top: 1rem;
}

.content .faq dd {
  margin: 0.25rem 0 0;
}

.content .confirmation {
  color: var(--teal);
  font-weight: bold;
}

.error {
  color: var(--error);
  font-weight: normal;
}

.link-list {
  list-style: none;
  padding: 0;
  columns: 3 12rem;
}

.link-list li {
  padding: 0.15rem 0;
}

/* ---------- footer: dark band with the leaf, a short About text and the links ---------- */

.site-footer {
  margin-top: 40px;
  color: #E8E8E8;
  background: var(--band);
  border-top: 3px solid var(--teal-light);
}

.site-footer-inner {
  box-sizing: border-box;
  max-width: calc(var(--width) + 32px);
  margin: 0 auto;
  padding: 44px 16px 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px 60px;
}

.site-footer-about {
  flex: 1 1 320px;
  max-width: 460px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.site-footer-logo {
  flex: none;
}

.site-footer-logo img {
  display: block;
  width: 79px;
  height: 76px;
}

.site-footer-about p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
  font-size: 0.85rem;
}

.site-footer-head {
  font-weight: bold;
  color: #5FC4BD;
}

.site-footer a {
  color: #D6D6D6;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #fff;
  text-decoration: underline;
}

.site-copyright {
  box-sizing: border-box;
  max-width: calc(var(--width) + 32px);
  margin: 0 auto;
  padding: 18px 16px 26px;
  border-top: 1px solid #383838;
  font-size: 0.72rem;
  text-align: center;
  color: #A8A8A8;
}

/* ---------- picture carousel (_PictureCarousel: a daycare's listing page and the listing editor's Photos tab) and
   the listing page's map overlay ---------- */

html.lb-open,
html.lb-open body {
  overflow: hidden;
}

.lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 56px 16px 24px;
  background: rgba(24, 16, 26, 0.92);
  /* a sideways swipe moves the carousel, not the browser's history */
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.lb[hidden],
.lb button[hidden] {
  display: none;
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.lb-image {
  display: block;
  max-width: min(1000px, calc(100vw - 160px));
  max-height: calc(100vh - 140px);
  border-radius: 10px;
  background: #fff;
}

.lb-figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: #fff;
  text-align: center;
}

.lb-caption {
  text-transform: capitalize;
}

.lb-count {
  margin-left: 8px;
  color: #C9BCD2;
  font-size: 12px;
}

.lb button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.lb button:hover,
.lb button:focus-visible {
  background: var(--teal);
  outline: 0;
}

.lb .lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
}

@media (max-width: 600px) {
  .lb {
    padding: 60px 8px 24px;
  }

  .lb-image {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 160px);
  }

  /* swipe on a phone; the arrows sit under the picture */
  .lb .lb-nav {
    position: absolute;
    bottom: 16px;
  }

  .lb .lb-prev {
    left: calc(50% - 60px);
  }

  .lb .lb-next {
    right: calc(50% - 60px);
  }

  .lb-figure {
    margin-bottom: 56px;
  }
}

/* ---------- tablets: the About text gets its own row in the footer ---------- */

@media (max-width: 959px) {
  .site-footer-inner {
    padding: 36px 16px 28px;
  }

  .site-footer-about {
    flex: 0 0 100%;
    max-width: 620px;
  }
}

/* ---------- phones ---------- */

@media (max-width: 639px) {
  h1 {
    font-size: 1.45rem;
  }

  .site-logo img {
    width: 202px;
    height: 46px;
  }

  .menu-signed-in {
    display: none;
  }

  /* the drop-down spans the screen */
  .site-menu {
    left: 0;
    right: 0;
    width: auto;
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .site-menu a {
    font-size: 15px;
    line-height: 48px;
  }

  .site-footer {
    margin-top: 16px;
  }

  .site-footer-inner {
    gap: 24px;
    padding: 28px 16px 24px;
  }

  .site-footer-about {
    gap: 16px;
  }

  .site-footer-logo img {
    width: 60px;
    height: 58px;
  }

  /* the About text above two columns of links */
  .site-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
  }

  .site-footer-col {
    min-width: 0;
  }

  .site-copyright {
    padding: 16px 16px 22px;
  }
}

/* a popup with a map of one pin (_MapDialog: admin Summary's View on map, the listing editor's Address), as on the old pages */
.map-dialog {
  width: min(900px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.map-dialog::backdrop {
  background: rgba(30, 20, 30, 0.6);
}

.map-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 10px 14px 20px;
}

.map-dialog-head h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--plum);
}

.map-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--plum);
  background: var(--lilac);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.map-dialog-close:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
}

.map-dialog-map {
  height: min(550px, calc(100vh - 160px));
}

.map-dialog-pin::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
}
