/* =========================================================
   NUVORA THEME — Official Marketplace Documentation Styles
   ========================================================= */

:root {
  --docs-bg: #F8FAFC;
  --docs-surface: #FFFFFF;
  --docs-surface-2: #F1F5F9;
  --docs-sidebar: #0F172A;
  --docs-sidebar-text: #94A3B8;
  --docs-sidebar-active: #38BDF8;
  --docs-sidebar-hover: #1E293B;
  --docs-text: #0F172A;
  --docs-text-muted: #64748B;
  --docs-text-light: #94A3B8;
  --docs-border: #E2E8F0;
  --docs-border-subtle: #F1F5F9;
  
  --docs-primary: #4F46E5;
  --docs-primary-hover: #4338CA;
  --docs-primary-light: #EEF2FF;
  --docs-accent: #06B6D4;
  --docs-success: #10B981;
  --docs-warning: #F59E0B;
  --docs-danger: #EF4444;

  --docs-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --docs-font-mono: 'JetBrains Mono', monospace;
  --docs-sidebar-width: 290px;
  --docs-header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--docs-font-sans);
  background: var(--docs-bg);
  color: var(--docs-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--docs-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Layout */
.docs-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
  width: var(--docs-sidebar-width);
  background: var(--docs-sidebar);
  color: #F8FAFC;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

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

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 2px;
}

.sidebar-search-box {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #64748B;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: #38BDF8;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.search-input::placeholder {
  color: #64748B;
}

.sidebar-nav {
  padding: 16px 12px 32px;
  flex: 1;
}

.nav-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #64748B;
  padding: 12px 10px 6px;
  margin-top: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--docs-sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-link:hover {
  background: var(--docs-sidebar-hover);
  color: #fff;
  text-decoration: none;
}

.nav-link.active {
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
  font-weight: 600;
}

.nav-link .badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #94A3B8;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #64748B;
  text-align: center;
}

/* Main Content Area */
.docs-main {
  flex: 1;
  margin-left: var(--docs-sidebar-width);
  min-width: 0;
}

/* Header */
.docs-header {
  height: var(--docs-header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--docs-border);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--docs-text);
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--docs-text-muted);
}

.breadcrumbs span.current {
  color: var(--docs-text);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--docs-border);
  background: #fff;
  color: var(--docs-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-header:hover {
  background: var(--docs-surface-2);
  color: var(--docs-primary);
  text-decoration: none;
}

.btn-header.primary {
  background: var(--docs-primary);
  color: #fff;
  border-color: var(--docs-primary);
}

.btn-header.primary:hover {
  background: var(--docs-primary-hover);
  color: #fff;
}

/* Content Body */
.docs-content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 40px 96px;
}

/* Section styling */
.doc-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--docs-header-height) + 24px);
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title .section-num {
  font-size: 14px;
  font-weight: 700;
  background: var(--docs-primary-light);
  color: var(--docs-primary);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: normal;
}

.section-desc {
  font-size: 16px;
  color: var(--docs-text-muted);
  margin-bottom: 24px;
  line-height: 1.7;
}

.sub-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 32px 0 14px;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-sub-title {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 10px;
  color: #334155;
}

p {
  margin-bottom: 16px;
  color: #334155;
}

/* Cards & Callouts */
.callout {
  padding: 16px 20px;
  border-radius: 10px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
}

.callout svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.callout.info {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  color: #0369A1;
}

.callout.info svg {
  color: #0284C7;
}

.callout.tip {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
}

.callout.tip svg {
  color: #059669;
}

.callout.warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #B45309;
}

.callout.warning svg {
  color: #D97706;
}

.callout.important {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
}

.callout.important svg {
  color: #DC2626;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.feature-box {
  background: #fff;
  border: 1px solid var(--docs-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-box:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.06);
}

.feature-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--docs-primary-light);
  color: var(--docs-primary);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.feature-box h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0F172A;
}

.feature-box p {
  font-size: 13.5px;
  color: var(--docs-text-muted);
  margin-bottom: 0;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 28px;
  background: #fff;
  border: 1px solid var(--docs-border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

table.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

table.doc-table th {
  background: #F8FAFC;
  padding: 12px 16px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--docs-border);
  white-space: nowrap;
}

table.doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--docs-border);
  color: #334155;
  vertical-align: top;
}

table.doc-table tr:last-child td {
  border-bottom: none;
}

table.doc-table tr:hover td {
  background: #F8FAFC;
}

/* Code Snippets */
.code-block-wrapper {
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1E293B;
  background: #0B0F19;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111827;
  padding: 8px 16px;
  border-bottom: 1px solid #1F2937;
  font-family: var(--docs-font-mono);
  font-size: 12px;
  color: #94A3B8;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: var(--docs-font-sans);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--docs-font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #E2E8F0;
}

code {
  font-family: var(--docs-font-mono);
  font-size: 13px;
}

p code, li code, td code {
  background: #EEF2F6;
  color: #4F46E5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  border: 1px solid #E2E8F0;
}

/* Tree view for package structure */
.tree-view {
  background: #0F172A;
  color: #E2E8F0;
  padding: 20px;
  border-radius: 10px;
  font-family: var(--docs-font-mono);
  font-size: 13px;
  line-height: 1.8;
  margin: 20px 0;
  overflow-x: auto;
}

.tree-view .folder {
  color: #38BDF8;
  font-weight: 600;
}

.tree-view .file {
  color: #F1F5F9;
}

.tree-view .comment {
  color: #64748B;
  font-style: italic;
}

/* Steps list */
.step-list {
  list-style: none;
  counter-reset: step-counter;
  margin: 24px 0;
}

.step-item {
  position: relative;
  padding-left: 54px;
  margin-bottom: 28px;
}

.step-item::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: var(--docs-primary);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.3);
}

.step-item h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0F172A;
}

/* Accordion FAQ */
.faq-item {
  background: #fff;
  border: 1px solid var(--docs-border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item:hover {
  border-color: #CBD5E1;
}

.faq-btn {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
}

.faq-btn svg {
  transition: transform 0.2s;
  flex-shrink: 0;
  color: var(--docs-text-muted);
}

.faq-item.open .faq-btn svg {
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 20px 16px;
  display: none;
  font-size: 14.5px;
  color: #334155;
  line-height: 1.6;
}

.faq-item.open .faq-body {
  display: block;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.badge.primary { background: #EEF2FF; color: #4F46E5; }
.badge.success { background: #ECFDF5; color: #059669; }
.badge.warning { background: #FFFBEB; color: #D97706; }
.badge.info { background: #F0F9FF; color: #0284C7; }
.badge.purple { background: #FAF5FF; color: #9333EA; }

/* Responsive */
@media (max-width: 1024px) {
  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out;
  }
  .docs-sidebar.open {
    transform: translateX(0);
  }
  .docs-main {
    margin-left: 0;
  }
  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .docs-header {
    padding: 0 20px;
  }
  .docs-content {
    padding: 24px 16px 64px;
  }
  .section-title {
    font-size: 24px;
  }
  .table-responsive {
    border-radius: 6px;
  }
}
