/* ==========================================================================
   Bazaara Headless Docs - Premium Theme Stylesheet
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", monospace;
  
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --text-light: #9ca3af;
  
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-light: #fff7ed;
  --border-light: #e5e7eb;
  
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --code-highlight: #f5c2e7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Navbar Style
   ========================================================================== */
.navbar {
  height: 64px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.nav-github-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s;
  background: #ffffff;
}

.nav-github-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.nav-swagger-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border: 1px solid transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
}

.nav-swagger-link:hover {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  box-shadow: 0 4px 8px rgba(234, 88, 12, 0.3);
}

/* ==========================================================================
   Layout & Sidebar Navigation
   ========================================================================== */
.docs-layout {
  flex: 1;
  display: flex;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.sidebar {
  width: 280px;
  padding: 2.5rem 2rem 2.5rem 0;
  border-right: 1px solid var(--border-light);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-left: 0.75rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.sidebar-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   Documentation Content Area
   ========================================================================== */
.content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 0 4rem 3rem;
}

/* Markdown Rendering Styles */
.markdown-body {
  font-size: 1.05rem;
  color: #374151;
}

.markdown-body h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  margin-top: 0;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.markdown-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.markdown-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.markdown-body p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* Code Blocks & Inline Code Formatting */
.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: #e5e7eb;
  color: #b91c1c;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}

.markdown-body pre {
  background-color: var(--code-bg);
  padding: 1.25rem;
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid #2e303e;
}

.markdown-body pre code {
  background-color: transparent;
  color: var(--code-text);
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 0;
}

/* Lists */
.markdown-body ul, .markdown-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.markdown-body li {
  margin-bottom: 0.5rem;
}

/* Callouts / Blockquotes */
.markdown-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--primary);
  background-color: var(--primary-light);
  border-radius: 0 12px 12px 0;
}

.markdown-body blockquote p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #c2410c;
}

/* Buttons */
.primary-btn {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
  font-size: 0.95rem;
  margin-top: 1rem;
}

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

/* Footer */
.footer {
  border-top: 1px solid var(--border-light);
  background-color: #ffffff;
  padding: 1.25rem 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-left p, .footer-right p {
  margin: 0;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--primary);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
    padding: 0 1rem;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 0;
  }
  
  .content {
    padding: 1.5rem 0;
  }
  
  .markdown-body h1 {
    font-size: 1.8rem;
  }
  
  .markdown-body h2 {
    font-size: 1.4rem;
  }
  
  .footer-container {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ==========================================================================
   Code Tabs Components
   ========================================================================== */
.code-group {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background-color: var(--code-bg);
  margin-bottom: 1.75rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.code-tabs {
  background-color: #11111b;
  border-bottom: 1px solid #313244;
  padding: 0 0.75rem;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #a6adc8;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #cdd6f4;
}

.tab-btn.active {
  color: #ea580c;
  border-bottom-color: #ea580c;
}

.code-panel {
  display: none;
}

.code-panel.active {
  display: block;
}

.code-panel pre {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   Pagination Components
   ========================================================================== */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  gap: 1.5rem;
}

.page-nav-link {
  flex: 1;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  text-decoration: none;
  background-color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.page-nav-link:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(234, 88, 12, 0.08);
}

.page-nav-link.next {
  text-align: right;
  align-items: flex-end;
}

.page-nav-link.prev {
  text-align: left;
  align-items: flex-start;
}

.page-nav-link .nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.page-nav-link .nav-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.page-nav-link:hover .nav-title {
  color: var(--primary);
}

