/* public/docs/docs.css — shared styles for FrontDesk documentation */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:         #2563eb;
  --blue-light:   #eff6ff;
  --blue-mid:     #bfdbfe;
  --green-light:  #f0fdf4;
  --green-border: #86efac;
  --green-text:   #166534;
  --amber-light:  #fffbeb;
  --amber-border: #fcd34d;
  --amber-text:   #92400e;
  --red-light:    #fef2f2;
  --red-border:   #fca5a5;
  --red-text:     #991b1b;
  --text:         #111827;
  --text-muted:   #6b7280;
  --border:       #e9ecef;
  --bg:           #f9fafb;
  --white:        #ffffff;
  --sidebar-w:    248px;
  --topbar-h:     52px;
  --radius:       8px;
  --font:         'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Fira Mono', monospace;
}

body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.7; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem; z-index: 100;
}
.topbar-logo { font-size: 1.05rem; font-weight: 700; color: var(--blue); text-decoration: none; letter-spacing: -0.3px; }
.topbar-logo span { color: var(--text); }
.topbar-sep { width: 1px; height: 20px; background: var(--border); }
.topbar-section { font-size: .85rem; color: var(--text-muted); font-weight: 500; }
.topbar-back {
  margin-left: auto; font-size: .82rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; padding: .3rem .75rem; border: 1px solid var(--border);
  border-radius: 6px; transition: background .12s, color .12s;
}
.topbar-back:hover { background: var(--bg); color: var(--text); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout { display: flex; padding-top: var(--topbar-h); min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
  overflow-y: auto; border-right: 1px solid var(--border);
  background: var(--white); padding: 1.5rem 0 2rem;
}
.sidebar-group { margin-bottom: 1.25rem; }
.sidebar-group-label {
  font-size: .7rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted); padding: 0 1.25rem; margin-bottom: .35rem;
}
.sidebar-link {
  display: block; padding: .38rem 1.25rem; font-size: .875rem; color: var(--text-muted);
  text-decoration: none; border-left: 2px solid transparent; transition: color .12s, background .12s;
}
.sidebar-link:hover { color: var(--text); background: var(--bg); }
.sidebar-link.active { color: var(--blue); font-weight: 600; border-left-color: var(--blue); background: var(--blue-light); }

/* ── Main content ────────────────────────────────────────────────────────── */
.main { flex: 1; padding: 3rem 3rem 5rem; }
.content { max-width: 720px; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .4rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--border); }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 2.25rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.4px; margin-bottom: .5rem; }
.page-header .lead { font-size: 1rem; color: var(--text-muted); max-width: 580px; }

/* ── Prose ───────────────────────────────────────────────────────────────── */
.content h2 {
  font-size: 1.15rem; font-weight: 700; letter-spacing: -.2px;
  margin: 2.25rem 0 .9rem; padding-top: 2.25rem; border-top: 1px solid var(--border);
}
.content h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.content p { margin-bottom: .9rem; color: #374151; }
.content ul, .content ol { padding-left: 1.4rem; margin-bottom: .9rem; }
.content li { margin-bottom: .35rem; color: #374151; }
.content strong { font-weight: 600; color: var(--text); }
.content a { color: var(--blue); }

/* ── Steps ───────────────────────────────────────────────────────────────── */
.steps { counter-reset: step; margin: 1.25rem 0; }
.step { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start; }
.step-num {
  counter-increment: step; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: .15rem;
}
.step-body { flex: 1; }
.step-body strong { display: block; font-size: .95rem; margin-bottom: .25rem; }
.step-body p { margin: 0 0 .35rem; font-size: .9rem; color: #4b5563; }

/* ── Callouts ────────────────────────────────────────────────────────────── */
.callout {
  border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.1rem 0;
  font-size: .9rem; display: flex; gap: .75rem; align-items: flex-start;
}
.callout-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.65; }
.callout-body { flex: 1; }
.callout-body strong { display: block; margin-bottom: .2rem; font-size: .88rem; }
.callout-body p { margin: 0; color: inherit; font-size: .875rem; line-height: 1.6; }
.callout.tip  { background: var(--green-light); border: 1px solid var(--green-border); color: var(--green-text); }
.callout.note { background: var(--blue-light);  border: 1px solid var(--blue-mid);    color: #1e40af; }
.callout.warn { background: var(--amber-light); border: 1px solid var(--amber-border); color: var(--amber-text); }

/* ── Prev / Next navigation ──────────────────────────────────────────────── */
.page-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.page-nav a { font-size: .875rem; font-weight: 500; color: var(--blue); text-decoration: none; }
.page-nav a:hover { text-decoration: underline; }

/* ── Menu toggle button (mobile only) ────────────────────────────────────── */
.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer; padding: .25rem;
  color: var(--text); margin-right: .25rem;
  border-radius: 6px; line-height: 1;
}
.menu-toggle:hover { background: var(--bg); }
.menu-toggle svg { display: block; }

/* ── Sidebar overlay (mobile only) ───────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 149;
}
.sidebar-overlay.open { display: block; }

/* ── Mobile styles ───────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .menu-toggle { display: flex; align-items: center; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 150;
    width: min(var(--sidebar-w), 80vw);
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 4px 0 16px rgba(0,0,0,.12);
    padding-top: calc(var(--topbar-h) + 1rem);
  }
  .sidebar.open { transform: translateX(0); }

  .main { padding: 2rem 1.1rem 4rem; }
  .content { max-width: 100%; }

  .topbar { padding: 0 1rem; }
  .topbar-section { display: none; }
  .topbar-sep { display: none; }
}
