/* Additions for the local edition. The main design system is style.css, copied from
   system/src/app/globals.css. */

:root {
  /* The server edition loads these fonts from Google; offline, the system fonts are used. */
  --font-sans: "Plus Jakarta Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --font-code: "Geist Mono", "SFMono-Regular", Menlo, Consolas;
}

.local-note {
  font-size: 12px;
  color: var(--faint);
}

.local-hint {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.def-list {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 10px 20px;
  margin: 0;
}

.def-list dt {
  color: var(--muted);
}

.def-list dd {
  margin: 0;
}

details.confirm > div {
  margin-top: 4px;
}

.print-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 16px auto 8px;
  padding: 0 8px;
}

.contact form[data-contact] {
  display: grid;
  gap: 12px;
}

/* The hero's background glow reaches past the screen edges; without this a phone can scroll sideways. */
main {
  overflow-x: clip;
}

/* ---------- Menus on small screens ---------- */

/* On wide screens the wrappers do not exist for layout: their children sit where they did. */
.site-menu,
.sidebar-menu {
  display: contents;
}

.sidebar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.25s var(--ease),
    opacity 0.2s var(--ease);
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 960px) {
  .menu-toggle {
    display: flex;
  }

  /* Landing page: logo and menu button; the links and buttons open below. */
  .site-header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 13px;
    padding-bottom: 13px;
    row-gap: 0;
  }

  .site-menu {
    display: none;
  }

  .site-header.menu-open .site-menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 4px 0 20px;
  }

  .site-header.menu-open .site-nav {
    display: grid;
    gap: 2px;
  }

  .site-header.menu-open .site-nav a {
    padding: 11px 12px;
    border-radius: 10px;
  }

  .site-header.menu-open .site-actions {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 12px 0;
    border-top: 1px solid var(--border);
  }

  .site-header.menu-open .site-actions > .btn {
    margin-left: auto;
  }

  /* App: the sidebar becomes a bar at the top; the menu opens below it. */
  .shell {
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 0;
    padding: 12px 14px;
    overflow: visible;
  }

  .sidebar-menu {
    display: none;
  }

  .sidebar.menu-open .sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 68px);
    padding-top: 14px;
    overflow-y: auto;
  }

  .sidebar.menu-open .sidebar-user {
    margin-top: 0;
    padding-bottom: 6px;
  }
}

@media (max-width: 560px) {
  /* The form stacks into a column there, so the field must keep its own height. */
  .inline-form .field,
  .row-form .field {
    flex: none;
  }
}

@media print {
  .no-print,
  .tour {
    display: none !important;
  }
}
