/* ==========================================================================
   Layout — page structure: banner, nav, sidebar, content frame, and the
   generic positioning helpers. Values resolve to tokens.css.
   ========================================================================== */

/* ---- ---- ---- ---- Banner & nav ---- ---- ---- ---- */

.banner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.4rem;
  /* Smooth CSS replacement for header.png (1x96 vertical gradient). */
  background-color: #8195ba;
  background-image: linear-gradient(to bottom, #9badce 0%, #8195ba 100%);
  background-repeat: no-repeat;
  background-size: 100% 96px;
}

.banner-img {
  object-fit: contain;
  width: 455px;
  height: 77px;
}

.nav-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-2);
}

header .search-bar {
  display: flex;
  justify-content: end;
  align-content: center;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  gap: var(--space-2);
  margin-left: auto;
}

.search {
  height: 16px;
  width: 130px;
}

.title-logo {
  display: flex;
  justify-content: left;
  align-items: center;
  padding: var(--space-2) 0;
  gap: var(--space-2);
}

/* ---- ---- ---- ---- Content frame ---- ---- ---- ---- */

.content-area {
  max-width: 100%;
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  padding: 0.6rem;
}

.container {
  display: flex;
  flex-grow: 1;
  min-width: 100%;
  gap: var(--space-3);
  transition: all var(--transition);
}

.main-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-3);
}

.breadcrumbs {
  white-space: nowrap;
  overflow-x: scroll;
  overflow-y: hidden;
  border: 1px solid var(--border-accent);
}

/* Win over .section-2's white border when the nav carries both classes. */
.breadcrumbs.section-2 {
  border-color: var(--border-accent);
}

/* ---- ---- ---- ---- Sidebar ---- ---- ---- ---- */

.mobile-menu {
  z-index: var(--z-mobile-menu);
}

.sidebar,
.sidebar-mobile {
  flex-direction: column;
  flex-grow: 0;
  height: max-content;
  gap: 1rem;
  min-width: 150px;
  max-width: 256px;
  width: 20%;
}

.sidebar ul {
  list-style-type: none;
}

.open {
  display: flex;
  min-width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
    background: transparent;
    transition: all var(--transition);
  }
  .sidebar-mobile {
    display: flex;
    flex-direction: column;
    background: transparent;
    transition: all var(--transition);
  }
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
    transition: all var(--transition);
  }
  .sidebar-mobile {
    display: none;
  }

  .sidebar-hidden .sidebar {
    display: none;
  }

  .sidebar-collapsed {
    transform: translateX(-100%);
    position: absolute;
    left: 0;
    z-index: var(--z-behind);
    opacity: 0;
    pointer-events: none;
  }
}

/* ---- ---- ---- ---- Positioning helpers ---- ---- ---- ---- */

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.center-vertical {
  display: flex;
  align-items: center;
}

.center-horizontal {
  display: flex;
  justify-content: center;
}

.indent {
  padding: 3px;
  margin: 5px;
  font: var(--text-2xs) var(--font-ui);
  color: var(--text-accent);
  background-color: var(--surface-quote);
  border: 1px solid var(--border-strong);
  border-bottom-color: var(--border-light);
  border-right-color: var(--border-light);
  /* Makes markdown fit inside the quoted content. */
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.spacer {
  padding: var(--space-1) 0;
}

.scrollable {
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow-x: scroll;
  max-width: 100%;
}

/* ---- ---- ---- ---- Body / frame edges ---- ---- ---- ---- */

.bodyleft {
  width: 3px;
  background-repeat: repeat-y;
  background-image: url(/assets/left-61ef34232481880a2ceabdf895280ba60c833fecbd845e5118ae9fd20e400b0e.png);
}

.bodyright {
  width: 3px;
  background-repeat: repeat-y;
  background-image: url(/assets/right-0fb3fa086f9f8cee639e81f25bc91fcc3b07efbf311c2b597c4edd16f3d6b070.png);
}

.bottomleft {
  width: 10px;
  background-image: url(/bottomleft.png);
}

.bottommain {
  width: 100%;
  background-repeat: repeat-x;
  background-image: url(/bottom.png);
}

.bottomright {
  width: 10px;
  background-image: url(/bottomright.png);
}
