/* ===================================================
   VerificaIdade — GitBook-inspired minimal theme
   =================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
  --text-primary: #1f2328;
  --text-secondary: #656d76;
  --text-muted: #8b949e;
  --border-color: #e8e8e8;
  --bg-white: #f3f3f3;
  --bg-light: #f6f8fa;
  --bg-sidebar: #eaeaea;
  --accent: #346DDB;
  --accent-hover: #2554B0;
  --accent-light: #dbe7fb;
  --code-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* --- Base --- */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6,
.sidebar-title {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.4rem;
  margin-top: 2em;
  margin-bottom: 0.6em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.6em;
}

/* --- Links --- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Sidebar --- */
#quarto-sidebar {
  background-color: var(--bg-sidebar) !important;
  border-right: 1px solid var(--border-color) !important;
}

.sidebar-navigation {
  background-color: var(--bg-sidebar) !important;
}

.sidebar-logo {
  padding: 1.2rem 0 0.8rem 0;
}

.sidebar .sidebar-title,
#quarto-sidebar .sidebar-title {
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Sidebar items */
.sidebar-navigation .sidebar-item a,
.sidebar-navigation .sidebar-section .sidebar-item a {
  color: var(--text-secondary) !important;
  font-weight: 400;
  font-size: 0.875rem;
  padding: 0.35rem 0.75rem !important;
  border-radius: 6px;
  margin: 1px 0.5rem;
  transition: all 0.15s ease;
}

.sidebar-navigation .sidebar-item a:hover,
.sidebar-navigation .sidebar-section .sidebar-item a:hover {
  color: var(--text-primary) !important;
  background-color: var(--bg-light) !important;
  text-decoration: none;
}

.sidebar-navigation .sidebar-item.active > a,
.sidebar-navigation .sidebar-item a.active {
  color: var(--accent) !important;
  font-weight: 500;
  background-color: var(--accent-light) !important;
  border-left: none !important;
}

/* Section headers in sidebar */
.sidebar-navigation .sidebar-header,
.sidebar-navigation .sidebar-section > .sidebar-item > a {
  color: var(--text-muted) !important;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1rem;
}

/* --- Top navbar --- */
.navbar {
  background-color: var(--bg-white) !important;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
}

/* --- Page title --- */
.title {
  color: var(--text-primary) !important;
  font-weight: 700;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.5em;
}

/* --- Content area --- */
main.content {
  max-width: 52rem;
}

p {
  margin-bottom: 1.2em;
}

/* --- Tables --- */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  margin: 1.5em 0;
}

thead {
  background-color: var(--bg-light);
  color: var(--text-primary);
}

thead th {
  padding: 0.6rem 0.8rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

tbody td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background-color: var(--bg-light);
}

/* --- Code --- */
pre {
  background-color: var(--code-bg) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  font-size: 0.85rem;
  line-height: 1.6;
  box-shadow: none;
}

code {
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  font-size: 0.85em;
}

p > code,
li > code,
td > code {
  background-color: var(--bg-light);
  color: var(--text-primary);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--border-color);
}

/* Code copy button */
.code-copy-button {
  color: var(--text-muted) !important;
}

.code-copy-button:hover {
  color: var(--text-primary) !important;
}

/* Syntax highlighting — light theme */
pre .kw { color: #8250df; }  /* keywords — purple */
pre .st { color: #0a3069; }  /* strings — dark blue */
pre .co { color: #6e7781; }  /* comments — gray */
pre .dv { color: #0550ae; }  /* numbers — blue */
pre .fu { color: #6639ba; }  /* functions — purple */
pre .at { color: #116329; }  /* attributes — green */
pre .cn { color: #0550ae; }  /* constants */

/* --- Callouts --- */
div.callout {
  border-radius: 6px;
  margin: 1.5em 0;
}

.callout-note {
  border-left-color: var(--accent) !important;
  background-color: #f0f4ff !important;
}

.callout-note .callout-icon::before,
.callout-note .callout-title {
  color: var(--accent) !important;
}

.callout-warning {
  border-left-color: #d4a017 !important;
  background-color: #fffbeb !important;
}

.callout-warning .callout-icon::before,
.callout-warning .callout-title {
  color: #92710a !important;
}

.callout-important {
  border-left-color: #cf222e !important;
  background-color: #fff5f5 !important;
}

.callout-important .callout-icon::before,
.callout-important .callout-title {
  color: #cf222e !important;
}

/* --- Buttons --- */
.btn-primary {
  background-color: var(--accent) !important;
  color: var(--bg-white) !important;
  border: none !important;
  border-radius: 6px !important;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  padding: 0.45rem 1.2rem;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--accent-hover) !important;
}

/* --- Search --- */
#quarto-search input {
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
}

/* --- TOC (right sidebar) --- */
nav[role="doc-toc"] {
  border-left: 1px solid var(--border-color);
}

nav[role="doc-toc"] a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color 0.15s ease;
}

nav[role="doc-toc"] a:hover {
  color: var(--text-primary);
}

nav[role="doc-toc"] a.active {
  color: var(--accent);
  font-weight: 500;
  border-left: 2px solid var(--accent);
}

/* --- Page navigation (prev/next) --- */
.page-navigation .nav-page a {
  color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  transition: all 0.15s ease;
}

.page-navigation .nav-page a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
  text-decoration: none;
}

/* --- Mermaid diagrams --- */
.mermaid {
  background-color: #ffffff !important;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
}

.mermaid svg {
  background-color: transparent !important;
}

.cell-output-display {
  background-color: #ffffff !important;
}

/* --- Footer --- */
.nav-footer {
  background-color: var(--bg-light) !important;
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border-color);
}

.nav-footer a {
  color: var(--text-primary) !important;
}

/* --- Checklist items --- */
input[type="checkbox"] {
  accent-color: var(--accent);
}

/* --- Selection --- */
::selection {
  background-color: var(--accent-light);
  color: var(--text-primary);
}

/* --- Scrollbar (subtle) --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 991px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1.05rem; }
}
