/* Documentation Site Styles */

/* Ensure nested lists are indented */
ul, ol {
  margin-left: 2em;
  padding-left: 2em;
}
ul ul, ul ol, ol ul, ol ol {
  margin-left: 2em;
  padding-left: 2em;
}

:root {
  --primary-color: #007bff;
  --primary-dark: #0056b3;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-bg: #f8f9fa;
  --dark-bg: #343a40;
  --text-color: #212529;
  --border-color: #dee2e6;
  --code-bg: #f4f4f4;
  --sidebar-width: 260px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

/* Header */
.docs-header {
  background: var(--dark-bg);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.docs-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.docs-header .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
}

.docs-header .brand i {
  color: var(--primary-color);
}

.docs-header nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.docs-header nav a {
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}

.docs-header nav a:hover {
  color: var(--primary-color);
}

/* Layout */
.docs-layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar */
.docs-sidebar {
  width: var(--sidebar-width);
  background: var(--light-bg);
  min-height: calc(100vh - 60px);
  padding: 2rem 1rem;
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.docs-sidebar h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.docs-sidebar h3:first-child {
  margin-top: 0;
}

.docs-sidebar ul {
  list-style: none;
}

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

.docs-sidebar a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.docs-sidebar a:hover {
  background: white;
  color: var(--primary-color);
}

.docs-sidebar a.active {
  background: var(--primary-color);
  color: white;
  font-weight: 500;
}

/* Main Content */
.docs-content {
  flex: 1;
  padding: 3rem;
  max-width: 900px;
}

.docs-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.docs-content h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

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

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

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

.docs-content ul,
.docs-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

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

.docs-content a {
  color: var(--primary-color);
  text-decoration: none;
}

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

/* Code Blocks */
.docs-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

.docs-content code {
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

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

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

.docs-content table th,
.docs-content table td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

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

.docs-content table tr:nth-child(even) {
  background: #fafafa;
}

/* Alerts */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border-left: 4px solid;
}

.alert-info {
  background: #d1ecf1;
  border-color: var(--info-color);
  color: #0c5460;
}

.alert-warning {
  background: #fff3cd;
  border-color: var(--warning-color);
  color: #856404;
}

.alert-success {
  background: #d4edda;
  border-color: var(--success-color);
  color: #155724;
}

.alert-danger {
  background: #f8d7da;
  border-color: var(--danger-color);
  color: #721c24;
}

/* Cards */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.docs-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text-color);
}

.docs-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.docs-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.docs-card p {
  margin-bottom: 0;
  color: var(--secondary-color);
}

.docs-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

/* Footer */
.docs-footer {
  background: var(--light-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--secondary-color);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--secondary-color);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Demo List */
.demo-list {
  list-style: none;
  padding: 0;
}

.demo-list li {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.demo-list a {
  display: block;
  padding: 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background 0.2s;
}

.demo-list a:hover {
  background: var(--light-bg);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
  }
  
  .docs-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .docs-content {
    padding: 2rem 1rem;
  }
  
  .docs-header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .docs-header nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
}
