/* A personal site (client/components/SitePage.js): white, one centred stage,
 * a quiet monochrome navigation above it. Colours and type come from the
 * theme tokens (static/themes/janos.css). */

.site {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding: 1.5rem 1rem 2rem;
  color: var(--wb-ink);
  font-family: var(--wb-font-ui);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.2rem 0.9rem;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
}

.site-link {
  color: var(--wb-ink);
  text-decoration: none;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
  opacity: 0.55;
  transition: opacity 0.15s;
}

.site-link:hover,
.site-link:focus-visible,
.site-link[aria-current="page"] {
  opacity: 1;
}

.site-link:hover,
.site-link:focus-visible {
  text-decoration-line: underline;
}

.site-dot {
  opacity: 0.35;
}

/* the stage fills what the navigation leaves, centred */
.site-stage {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

.site-stage .wb-node-view {
  width: min(100%, max(240px, calc(100vh - 8rem)));
  width: min(100%, max(240px, calc(100dvh - 8rem)));
  /* the stage has no frame and no ground of its own: the node is drawn on the page */
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* nor does the node paint a page colour (doc.bg is a rect directly under the svg) */
.site-stage .wb-node-view > svg > rect {
  display: none;
}

.site-h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the owner's buttons: a row in the lower right corner, within a thumb's reach */
.site-owner {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  max-width: calc(100vw - 1.5rem);
}

.site-owner-button {
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 1rem;
  display: inline-flex;
  align-items: center;
  font: inherit;
  font-size: 0.9rem;
  color: var(--wb-ink);
  background: var(--wb-wallpaper-color);
  border: var(--wb-border-width) solid var(--wb-ink);
  border-radius: var(--wb-radius-button);
  text-decoration: none;
  cursor: pointer;
}

.site-owner-main {
  color: var(--wb-accent-ink);
  background: var(--wb-accent);
}

.site-owner-button:hover,
.site-owner-button:focus-visible {
  background: var(--wb-accent-hover);
  color: var(--wb-accent-ink);
}

/* the tool pages (/edit, /graph): wider than a page's stage, room for the owner buttons below */
.site-tool {
  width: 100%;
  max-width: 60rem;
  box-sizing: border-box;
  padding-bottom: 5rem;
}

.site-editing .wb-header {
  justify-content: flex-start;
}

.site-editing .site-link {
  opacity: 1;
}

.site-graph .site-tool,
.site-graph .wb-graph {
  max-width: none;
}

.site-graph .wb-graph {
  width: 100%;
  height: calc(100dvh - 8rem);
}

.site-pages {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  width: 100%;
}

.site-page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: var(--wb-border-width) solid var(--wb-ink-soft);
}

.site-page-title {
  flex: 1 1 10rem;
}

.site-state {
  opacity: 0.55;
  font-size: 0.85rem;
}

.site-live {
  opacity: 1;
}

.site-new {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-new input {
  flex: 1 1 12rem;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 0.75rem;
  font: inherit;
  border: var(--wb-border-width) solid var(--wb-ink);
  border-radius: var(--wb-radius-button);
}
