/* Documentation Layout Styles */

:root {
  --docs-sidebar-width: 280px;
  --docs-sidebar-bg: #f8f9fa;
  --docs-sidebar-border: #dee2e6;
  --docs-nav-active-bg: #e9ecef;
  --docs-nav-active-text: #0d6efd;
  --docs-nav-hover-bg: #e9ecef;
}

[data-bs-theme="dark"] {
  --docs-sidebar-bg: #1a1d20;
  --docs-sidebar-border: #495057;
  --docs-nav-active-bg: #2c3034;
  --docs-nav-active-text: #6ea8fe;
  --docs-nav-hover-bg: #2c3034;
}

/* Container Layout */
.docs-container {
  display: flex;
  min-height: calc(100vh - 56px); /* Subtract navbar height */
  position: relative;
}

/* Sidebar */
.docs-sidebar {
  width: var(--docs-sidebar-width);
  background-color: var(--docs-sidebar-bg);
  border-right: 1px solid var(--docs-sidebar-border);
  position: sticky;
  top: 56px; /* Height of navbar */
  height: calc(100vh - 56px);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-content {
  padding: 1.5rem 1rem;
}

.sidebar-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--docs-sidebar-border);
}

.sidebar-header h5 {
  margin: 0;
  font-weight: 600;
}

/* Navigation Sections */
.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bs-secondary);
  margin-bottom: 0.5rem;
  padding: 0 0.75rem;
  letter-spacing: 0.5px;
}

.docs-sidebar .nav-link {
  color: var(--bs-body-color);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.docs-sidebar .nav-link:hover {
  background-color: var(--docs-nav-hover-bg);
  color: var(--docs-nav-active-text);
}

.docs-sidebar .nav-link.active {
  background-color: var(--docs-nav-active-bg);
  color: var(--docs-nav-active-text);
  font-weight: 500;
}

.docs-sidebar .nav-link i {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

/* Main Content */
.docs-content {
  flex: 1;
  overflow-y: auto;
  background-color: var(--bs-body-bg);
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Content Typography */
.docs-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--docs-sidebar-border);
}

.docs-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.docs-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.docs-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.docs-content p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.docs-content ul,
.docs-content ol {
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.docs-content li {
  margin-bottom: 0.5rem;
}

/* Code blocks */
.docs-content code {
  background-color: var(--bs-secondary-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.docs-content pre {
  background-color: var(--bs-secondary-bg);
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.docs-content pre code {
  background-color: transparent;
  padding: 0;
}

/* Tables */
.docs-content table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

.docs-content th,
.docs-content td {
  padding: 0.75rem;
  border: 1px solid var(--docs-sidebar-border);
}

.docs-content th {
  background-color: var(--docs-sidebar-bg);
  font-weight: 600;
}

/* Blockquotes */
.docs-content blockquote {
  border-left: 4px solid var(--docs-nav-active-text);
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  color: var(--bs-secondary);
}

/* Links */
.docs-content a {
  color: var(--docs-nav-active-text);
  text-decoration: none;
}

.docs-content a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
  .docs-sidebar {
    position: fixed;
    left: -100%;
    top: 56px;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  }

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

  .content-wrapper {
    padding: 1.5rem 1rem;
  }

  .docs-content h1 {
    font-size: 2rem;
  }
}

/* Sidebar Toggle Button (Mobile) */
.sidebar-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1001;
  display: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--docs-nav-active-text);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 992px) {
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Scrollbar Styling */
.docs-sidebar::-webkit-scrollbar {
  width: 8px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: var(--docs-sidebar-bg);
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--docs-sidebar-border);
  border-radius: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--bs-secondary);
}

/* Screenshot Placeholders */
.docs-content img[alt*="placeholder"] {
  background-color: var(--docs-sidebar-bg);
  border: 2px dashed var(--docs-sidebar-border);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  display: block;
  margin: 2rem 0;
  min-height: 200px;
}

/* Documentation Images */
.docs-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin: 2rem 0;
  display: block;
}

[data-bs-theme="dark"] .docs-content img {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--docs-sidebar-border);
}

/* Image captions (alt text) */
.docs-content img[alt] {
  cursor: pointer;
}

.docs-content img[alt]:hover {
  opacity: 0.95;
}
