/* ═══════════════════════════════════════
   DOCUMENTATION PAGE — STYLES
   Vyoma Group · Arka AI Docs
   ═══════════════════════════════════════ */

/* ── Hero ── */
.docs-hero {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 48px;
  background: #f0ede8;
  border-bottom: 1px solid #e0ddd8;
  text-align: center;
}

.docs-hero .breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 500;
}

.docs-hero .version-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.docs-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 600;
  color: #1a1714;
  line-height: 1.12;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.docs-hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #6b6560;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ── Hero Search ── */
.hero-search-wrapper {
  max-width: 520px;
  margin: 0 auto 16px;
  position: relative;
}

.hero-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9a9590;
  pointer-events: none;
}

.hero-search-input {
  width: 100%;
  padding: 14px 20px 14px 44px;
  background: #fff;
  border: 1px solid #e0ddd8;
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font-body);
  color: #1a1714;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search-input::placeholder {
  color: #b0aaa4;
}

.hero-search-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 98, 42, 0.1);
}

.hero-quick-links {
  font-size: 0.88rem;
  color: #9a9590;
}

.hero-quick-links span {
  margin-right: 4px;
}

.hero-quick-links a {
  color: var(--orange);
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.hero-quick-links a:hover {
  opacity: 0.75;
}

/* ═══════════════════════════════════════
   3-COLUMN LAYOUT
   ═══════════════════════════════════════ */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr 200px;
  gap: 0;
  min-height: calc(100vh - var(--nav-height));
}

/* ── Left Sidebar ── */
.docs-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  border-right: 1px solid #e0ddd8;
  background: #faf8f5;
  padding: 20px 0;
  scrollbar-width: thin;
  scrollbar-color: #d0cdc8 transparent;
  z-index: 50;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: #d0cdc8;
  border-radius: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-version {
  display: inline-block;
  background: rgba(232, 98, 42, 0.1);
  color: var(--orange);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  margin: 0 16px 16px;
}

.sidebar-search {
  padding: 0 16px;
  margin-bottom: 16px;
}

.sidebar-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: #fff;
  border: 1px solid #e0ddd8;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--font-body);
  color: #1a1714;
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-search-input:focus {
  border-color: var(--orange);
}

.sidebar-search {
  position: relative;
}

.sidebar-search-icon {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #9a9590;
  pointer-events: none;
}

/* Sidebar Sections */
.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  border-radius: 0;
}

.sidebar-section-header:hover {
  background: rgba(232, 98, 42, 0.04);
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b6560;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-section-label .nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.sidebar-section-header:hover .nav-icon {
  opacity: 1;
}

.sidebar-section-chevron {
  width: 14px;
  height: 14px;
  color: #9a9590;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-section.collapsed .sidebar-section-chevron {
  transform: rotate(-90deg);
}

.sidebar-section-links {
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 500px;
}

.sidebar-section.collapsed .sidebar-section-links {
  max-height: 0;
}

.sidebar-link {
  display: block;
  padding: 5px 16px 5px 40px;
  font-size: 13.5px;
  font-weight: 400;
  color: #6b6560;
  transition: color 0.15s, background 0.15s, font-weight 0.15s;
  cursor: pointer;
  border-left: 2px solid transparent;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--orange);
  background: rgba(232, 98, 42, 0.03);
}

.sidebar-link.active {
  color: var(--orange);
  font-weight: 500;
  background: rgba(232, 98, 42, 0.06);
  border-left-color: var(--orange);
}

/* ── Main Content Area ── */
.docs-content {
  max-width: 760px;
  padding: 32px 48px 80px;
  min-width: 0;
}

/* Article styles */
.doc-article {
  display: none;
}

.doc-article.active-article {
  display: block;
}

.article-breadcrumb {
  font-size: 0.8rem;
  color: #9a9590;
  margin-bottom: 8px;
  font-weight: 500;
}

.article-breadcrumb a {
  color: #9a9590;
  transition: color 0.15s;
}

.article-breadcrumb a:hover {
  color: var(--orange);
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: #1a1714;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: #9a9590;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.article-meta-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d0cdc8;
}

.lead {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #4a4640;
  margin-bottom: 24px;
}

.doc-article h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 600;
  color: #1a1714;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0ddd8;
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.doc-article h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1714;
  margin-top: 28px;
  margin-bottom: 12px;
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.doc-article p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #4a4640;
  margin-bottom: 16px;
}

.doc-article ul, .doc-article ol {
  padding-left: 0;
  list-style: none;
  margin-bottom: 20px;
}

.doc-article ul li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #4a4640;
  margin-bottom: 6px;
}

.doc-article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.doc-article ol {
  counter-reset: step;
  padding-left: 0;
}

.doc-article ol li {
  counter-increment: step;
  position: relative;
  padding-left: 32px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #4a4640;
  margin-bottom: 10px;
}

.doc-article ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-article strong {
  color: #1a1714;
  font-weight: 600;
}

.doc-article code {
  background: #f0ede8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #c24a1a;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

/* ── Info Card ── */
.info-card {
  background: #fef9f0;
  border: 1px solid #e0ddd8;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 20px 0;
}

.info-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 0;
  color: #1a1714;
  border-bottom: none;
  padding-bottom: 0;
}

.info-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #4a4640;
  margin-bottom: 0;
}

/* Warning Card */
.warning-card {
  background: #fff5f0;
  border: 1px solid #f0d0c0;
  border-left: 4px solid #cc4444;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 20px 0;
}

.warning-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 0;
  color: #5a2020;
  border-bottom: none;
  padding-bottom: 0;
}

.warning-card p {
  font-size: 0.92rem;
  color: #5a2020;
  margin-bottom: 0;
}

/* ── Feature Badge ── */
.feature-badge {
  display: inline-flex;
  gap: 12px;
  background: #fef0e8;
  border: 1px solid rgba(232, 98, 42, 0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 20px;
}

/* ── Can / Cannot Tables ── */
.can-table, .cannot-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
}

.can-table td, .cannot-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e0ddd8;
  font-size: 14px;
  color: #4a4640;
  line-height: 1.6;
}

.can-table td:first-child {
  color: #2d7a4f;
  font-weight: 600;
  width: 30px;
  font-size: 16px;
}

.cannot-table td:first-child {
  color: #cc4444;
  font-weight: 600;
  width: 30px;
  font-size: 16px;
}

/* ── Data Tables ── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.88rem;
}

.docs-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 2px solid #e0ddd8;
  background: #faf8f5;
}

.docs-table td {
  padding: 10px 14px;
  color: #4a4640;
  border-bottom: 1px solid #e0ddd8;
  line-height: 1.5;
}

.docs-table tr:hover td {
  background: rgba(232, 98, 42, 0.02);
}

.docs-table code {
  font-size: 0.85em;
}

/* ── Shortcuts Table ── */
.shortcut-key {
  display: inline-block;
  background: #f0ede8;
  border: 1px solid #d0cdc8;
  border-radius: 4px;
  padding: 2px 8px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  color: #1a1714;
  font-weight: 500;
}

/* ── Step Boxes ── */
.step-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.step-number {
  display: inline-flex;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.step-content h3 {
  margin-top: 0;
  font-size: 1rem;
  border-bottom: none;
  padding-bottom: 0;
}

.step-content p {
  margin-bottom: 8px;
}

/* ── Comparison Table ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.88rem;
}

.comparison-table th {
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 2px solid #e0ddd8;
  background: #faf8f5;
  color: #1a1714;
}

.comparison-table th:nth-child(2),
.comparison-table th:nth-child(3) {
  text-align: center;
}

.comparison-table td {
  padding: 10px 14px;
  color: #4a4640;
  border-bottom: 1px solid #e0ddd8;
}

.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3) {
  text-align: center;
  font-weight: 500;
}

.comparison-table .check {
  color: #2d7a4f;
}

.comparison-table .cross {
  color: #cc4444;
}

.comparison-table .coming {
  color: #9a9590;
  font-style: italic;
  font-weight: 400;
}

/* ── Article Feedback ── */
.article-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid #e0ddd8;
  margin-top: 40px;
  font-size: 14px;
  color: #6b6560;
}

.feedback-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e0ddd8;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 0.15s;
  font-size: 16px;
}

.feedback-btn:hover {
  border-color: var(--orange);
  background: #fef0e8;
}

/* ── Prev/Next Nav ── */
.prev-next-nav {
  display: flex;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 1px solid #e0ddd8;
  margin-top: 20px;
  gap: 16px;
}

.prev-next-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 14px 18px;
  border: 1px solid #e0ddd8;
  border-radius: 8px;
  transition: all 0.2s ease;
  max-width: 48%;
  min-width: 0;
}

.prev-next-btn:hover {
  border-color: var(--orange);
  background: #fef0e8;
}

.prev-next-btn.next {
  margin-left: auto;
  text-align: right;
}

.prev-next-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9a9590;
  font-weight: 600;
}

.prev-next-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--orange);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Right Sidebar (On This Page) ── */
.docs-right-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: 24px 16px;
  border-left: 1px solid #e0ddd8;
  scrollbar-width: none;
}

.docs-right-sidebar::-webkit-scrollbar {
  display: none;
}

.right-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

#onThisPage {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#onThisPage a {
  display: block;
  font-size: 12.5px;
  color: #9a9590;
  padding: 3px 0 3px 12px;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
  line-height: 1.5;
}

#onThisPage a:hover {
  color: var(--orange);
}

#onThisPage a.active-heading {
  color: var(--orange);
  border-left-color: var(--orange);
  font-weight: 500;
}

#onThisPage .on-page-h3 {
  padding-left: 24px;
  font-size: 12px;
}

/* ── Mobile Sidebar Toggle ── */
.docs-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  width: 48px;
  height: 48px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 98, 42, 0.3);
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.docs-sidebar-toggle:hover {
  transform: scale(1.05);
}

.docs-sidebar-toggle svg {
  width: 22px;
  height: 22px;
}

.docs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 149;
}

.docs-overlay.show {
  display: block;
}

/* ── Toast ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.docs-toast {
  animation: fadeInUp 0.25s ease;
}

/* ═══════════════════════════════════════
   RESPONSIVE — 1100px
   ═══════════════════════════════════════ */
@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 260px 1fr;
  }

  .docs-right-sidebar {
    display: none;
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — 768px (Tablet / Mobile)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed;
    left: -300px;
    top: var(--nav-height);
    width: 280px;
    height: calc(100vh - var(--nav-height));
    z-index: 150;
    transition: left 0.3s ease;
  }

  .docs-sidebar.open {
    left: 0;
  }

  .docs-sidebar-toggle {
    display: flex;
  }

  .docs-content {
    padding: 24px 20px 80px;
  }

  .docs-hero {
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 32px;
  }

  .docs-hero-title {
    font-size: 1.8rem;
  }

  .docs-hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-search-wrapper {
    max-width: 100%;
    padding: 0 16px;
  }

  .hero-quick-links {
    padding: 0 16px;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .prev-next-nav {
    flex-direction: column;
  }

  .prev-next-btn {
    max-width: 100%;
  }

  .prev-next-btn.next {
    text-align: left;
  }

  .docs-table {
    display: block;
    overflow-x: auto;
  }

  .comparison-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — 480px (Small Mobile)
   ═══════════════════════════════════════ */
@media (max-width: 480px) {
  .docs-content {
    padding: 20px 16px 80px;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .doc-article h2 {
    font-size: 1.25rem;
  }

  .doc-article h3 {
    font-size: 1.05rem;
  }

  .step-item {
    flex-direction: column;
    gap: 8px;
  }
}
