@import "./reset.css";
@import "./colors.css";
@import "./type.css";
@import "./space.css";
@import "./borders.css";
@import "./shadows.css";
@import "./actions.css";
@import "./nav.css";
@import "./footer.css";

:root {
  --container-width: 1200px;
  --container-padding: var(--space-m);
  --sidebar-width: 260px;
}

body {
  background: var(--neutral-1);
  color: var(--neutral-12);
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Documentation header */
.docs-header {
  background: linear-gradient(100deg, var(--accent-9), var(--accent-10));
  color: white;
  padding: var(--space-xl) 0;
  margin-block-end: var(--space-xl);
  text-align: center;
}

.docs-header h1 {
  color: white;
  font-size: var(--step-4);
  margin-block-end: var(--space-s);
}

.docs-header p {
  font-size: var(--step-1);
  max-width: 700px;
  margin: 0 auto;
}

/* Documentation layout */
.docs-container {
  padding-bottom: var(--space-3xl);
}

.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-xl);
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: var(--space-m);
  align-self: start;
}

.docs-toc {
  background-color: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--neutral-4);
  padding: var(--space-m);
  max-height: 100%;
  overflow-y: auto;
  font-size: var(--step--1);
}

.toc-section h3 {
  font-size: var(--step-0);
  margin-bottom: var(--space-s);
  color: var(--neutral-12);
}

.toc {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc a {
  text-decoration: none;
  color: var(--neutral-11);
  font-weight: 500;
  transition: color var(--transition-fast);
  display: block;
  padding: var(--space-3xs) 0;
}

.toc a:hover {
  color: var(--accent-11);
}

.toc > li > a {
  color: var(--neutral-12);
  font-weight: 600;
}

.toc > li {
  margin-bottom: var(--space-xs);
}

.toc ul {
  padding-left: var(--space-s);
  margin-top: var(--space-3xs);
  list-style: none;
}

/* Documentation content */
.docs-content {
  background-color: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--neutral-4);
  padding: var(--space-xl);
  min-height: 80vh;
}

.docs-content :is(ol, ul) {
  margin-block-end: 1lh;
}

.docs-intro {
  font-size: var(--step-1);
  color: var(--neutral-11);
  margin-block-end: var(--space-xl);
  margin-block-end: 2lh;
}

.docs-intro a {
  color: var(--accent-11);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid;
}

.docs-intro a:hover {
  color: var(--accent-10);
}

/* Sections */
.docs-section {
  margin-bottom: var(--space-3xl);
}

.docs-section:last-child {
  margin-bottom: 0;
}

.docs-section h2 {
  font-size: var(--step-3);
  margin-block-end: var(--space-m);
  margin-block-end: 0.25lh;
  color: var(--neutral-12);
  padding-block-end: var(--space-2xs);
  padding-block-end: 0.25lh;
  border-block-end: 1px solid var(--neutral-4);
}

.docs-subsection {
  margin-block: var(--space-xl);
  margin-block: 1.5lh;
}

.docs-subsection h3 {
  font-size: var(--step-1);
  color: var(--accent-11);
  margin-block-end: 0.5lh;
}

.docs-subsection h4 {
  font-size: var(--step-0);
  margin-inline: 0;
  margin-block: var(--space-l) var(--space-s);
  margin-block-start: 1.5lh;
  margin-block-end: 0.5lh;
  color: var(--neutral-12);
}

/* Feature lists */
.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--space-s) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.feature-list li {
  position: relative;
  padding-left: var(--space-m);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-9);
}

.feature-list ul {
  list-style: none;
  padding-left: var(--space-m);
  margin-top: var(--space-2xs);
}

.feature-list ul li {
  padding-left: var(--space-m);
}

.feature-list ul li::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--neutral-8);
}

/* Figures and images */
figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  align-items: center;
  margin-block: var(--space-l);
  margin-block: 2lh;
  margin-inline: auto;
  max-width: 100%;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--neutral-4);
}

img.admin_capture {
  background-color: var(--neutral-2);
  padding: var(--space-xs);
}

figcaption {
  font-size: var(--step--1);
  color: var(--neutral-10);
  text-align: center;
  max-width: 80%;
}

/* Callouts */
.note,
.warning,
.highlight {
  border-radius: var(--border-radius-sm);
  padding: var(--space-s);
  margin: var(--space-m) 0;
}

.note {
  background-color: var(--neutral-2);
  border-left: 4px solid var(--neutral-8);
}

.warning {
  background-color: #feebe7;
  border-left: 4px solid #ec8e7b;
}

.highlight {
  background-color: var(--accent-2);
  border-left: 4px solid var(--accent-6);
}

.note p,
.warning p,
.highlight p {
  margin: 0;
}

/* Links in text */
.docs-content a {
  color: var(--accent-11);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.docs-content a:hover {
  color: var(--accent-10);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    margin-bottom: var(--space-l);
  }
}

@media (max-width: 768px) {
  .docs-content {
    padding: var(--space-m);
  }

  .docs-header {
    padding: var(--space-l) 0;
  }

  .docs-header h1 {
    font-size: var(--step-3);
  }

  .docs-header p {
    font-size: var(--step-0);
  }

  figure {
    margin: var(--space-m) auto;
  }

  figcaption {
    max-width: 100%;
  }
}
