/* Paginas publicas de documentacao (/docs/*) */

.docs-page {
  display: block;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  background: #f5f7f6;
  color: #0f172a;
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.55;
}

.docs-shell {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.docs-sidebar {
  flex-shrink: 0;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

a.docs-home-link {
  display: block;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
}

a.docs-home-link:hover .logo-mark span,
a.docs-home-link:focus-visible .logo-mark span {
  text-decoration: underline;
}

a.docs-home-link:focus-visible {
  outline: 2px solid var(--pli-verde);
  outline-offset: -2px;
}

.docs-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.35rem var(--sb-inset-x) 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.docs-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.docs-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.docs-sidebar .sb-panel-head {
  grid-template-columns: 1fr auto;
}

.docs-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.docs-toc a {
  display: block;
  padding: 0.42rem 0.55rem;
  color: var(--sidebar-bege);
  font-size: 0.82rem;
  line-height: 1.35;
  text-decoration: none;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.docs-toc a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.docs-toc a.is-active {
  color: var(--pli-verde);
  border-left-color: var(--pli-verde);
  background: rgba(62, 194, 110, 0.08);
  font-weight: 600;
}

.docs-content {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.docs-content::-webkit-scrollbar {
  width: 8px;
}

.docs-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.docs-body {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1.4rem 2.5rem;
  overflow: visible;
  max-height: none;
}

.docs-page-header {
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.docs-page-header h1 {
  margin: 0;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1.35rem;
  color: #0f3a1f;
}

.docs-lead {
  margin: 0.55rem 0 0;
  color: #475569;
  font-size: 0.92rem;
}

.docs-body h3:first-of-type {
  margin-top: 0.35rem;
}

.docs-body .modal-glossary dt {
  scroll-margin-top: 1rem;
}

.docs-body h3 {
  scroll-margin-top: 1rem;
}

.docs-body h4.docs-symb-layer {
  margin: 1.15rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f3a1f;
}

.docs-symb-alias {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}

.docs-symb-lead {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: #475569;
}

.docs-symb-caption {
  margin: 0.35rem 0 1rem;
  font-size: 0.78rem;
  color: #64748b;
  font-style: italic;
}

.docs-map-preview {
  position: relative;
  margin: 0.85rem 0 0.35rem;
  min-height: 10.5rem;
  border-radius: 0.65rem;
  border: 1px solid #cbd5e1;
  background: #dce4e8;
  overflow: hidden;
}

.docs-map-preview-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15, 58, 31, 0.04) 0%, transparent 55%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.35) 0,
      rgba(255, 255, 255, 0.35) 2px,
      transparent 2px,
      transparent 10px
    );
  opacity: 0.55;
}

.docs-map-preview-hint {
  position: absolute;
  top: 0.55rem;
  left: 0.65rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.docs-map-preview-legend {
  position: absolute;
  bottom: 0.65rem;
  left: 0.55rem;
  right: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
}

.docs-legend-stack {
  flex-wrap: wrap;
  pointer-events: auto;
}

.docs-legend-stack .legend-block {
  pointer-events: auto;
}

.docs-legend-stack .legend-head {
  cursor: default;
}

.docs-symb-table td.docs-symb-color {
  white-space: nowrap;
}

.docs-symb-swatch {
  display: inline-block;
  width: 2.25rem;
  height: 0.62rem;
  margin-right: 0.4rem;
  border-radius: 2px;
  border: 1px solid rgba(15, 58, 31, 0.18);
  vertical-align: middle;
}

@media (max-width: 768px) {
  .docs-shell {
    flex-direction: column;
  }

  .docs-sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    max-height: 42vh;
  }

  .docs-content {
    flex: 1;
    min-height: 0;
    height: auto;
  }

  .docs-body {
    padding: 1rem 1rem 2rem;
  }
}
