/**
 * Documentation Styles
 *
 * Clean, readable documentation styling inspired by Laravel, Tailwind, and Stripe docs.
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.docs-layout {
    display: flex;
    gap: 3rem;
    max-width: 100%;
}

.docs-sidebar {
    width: 14rem;
    flex-shrink: 0;
}

.docs-sidebar-sticky {
    position: sticky;
    top: 1rem;
}

.docs-main {
    flex: 1;
    min-width: 0;
    max-width: 48rem;
}

@media (max-width: 1024px) {
    .docs-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .docs-sidebar {
        width: 100%;
    }
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */

.docs-nav-section {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.dark .docs-nav-section {
    color: #6b7280;
}

.docs-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid #e5e7eb;
}

.dark .docs-nav-list {
    border-left-color: #374151;
}

.docs-nav-link {
    display: block;
    padding: 0.375rem 0 0.375rem 1rem;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: 0.875rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.15s ease;
}

.docs-nav-link:hover {
    color: #111827;
    border-left-color: #d1d5db;
}

.dark .docs-nav-link {
    color: #9ca3af;
}

.dark .docs-nav-link:hover {
    color: #f3f4f6;
    border-left-color: #4b5563;
}

.docs-nav-link.active {
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 500;
}

.dark .docs-nav-link.active {
    color: #60a5fa;
    border-left-color: #60a5fa;
}

/* ==========================================================================
   Article Header
   ========================================================================== */

.docs-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.dark .docs-header {
    border-bottom-color: #374151;
}

.docs-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.25;
}

.dark .docs-title {
    color: #f9fafb;
}

.docs-description {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.dark .docs-description {
    color: #9ca3af;
}

/* ==========================================================================
   Article Content
   ========================================================================== */

.docs-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

.dark .docs-content {
    color: #d1d5db;
}

/* Headings */
.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 2.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.dark .docs-content h2 {
    color: #f9fafb;
    border-bottom-color: #374151;
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 2rem 0 0.75rem 0;
}

.dark .docs-content h3 {
    color: #f9fafb;
}

.docs-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 1.5rem 0 0.5rem 0;
}

.dark .docs-content h4 {
    color: #f9fafb;
}

/* Paragraphs */
.docs-content p {
    margin: 0 0 1rem 0;
}

/* Links */
.docs-content a {
    color: #2563eb;
    text-decoration: none;
}

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

.dark .docs-content a {
    color: #60a5fa;
}

/* Strong */
.docs-content strong {
    font-weight: 600;
    color: #111827;
}

.dark .docs-content strong {
    color: #f9fafb;
}

/* Lists */
.docs-content ul,
.docs-content ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.docs-content ul {
    list-style-type: disc;
}

.docs-content ol {
    list-style-type: decimal;
}

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

.docs-content li::marker {
    color: #9ca3af;
}

.dark .docs-content li::marker {
    color: #6b7280;
}

/* Code */
.docs-content code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.875em;
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    color: #111827;
}

.dark .docs-content code {
    background-color: #1f2937;
    color: #f3f4f6;
}

.docs-content pre {
    background-color: #1f2937;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0 0 1rem 0;
}

.docs-content pre code {
    background: none;
    padding: 0;
    color: #e5e7eb;
    font-size: 0.875rem;
    line-height: 1.7;
}

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

.docs-content thead {
    border-bottom: 2px solid #e5e7eb;
}

.dark .docs-content thead {
    border-bottom-color: #374151;
}

.docs-content th {
    text-align: left;
    font-weight: 600;
    padding: 0.75rem;
    color: #111827;
}

.dark .docs-content th {
    color: #f9fafb;
}

.docs-content td {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.dark .docs-content td {
    border-bottom-color: #1f2937;
}

/* Blockquotes / Callouts */
.docs-content blockquote {
    margin: 0 0 1rem 0;
    padding: 1rem 1rem 1rem 1.25rem;
    border-left: 4px solid #e5e7eb;
    background-color: #f9fafb;
    border-radius: 0 0.5rem 0.5rem 0;
}

.dark .docs-content blockquote {
    border-left-color: #374151;
    background-color: #111827;
}

/* Callout boxes */
.docs-content .callout {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid;
}

.docs-content .callout p:last-child {
    margin-bottom: 0;
}

.docs-content .callout-tip {
    background-color: #ecfdf5;
    border-left-color: #10b981;
    color: #065f46;
}

.dark .docs-content .callout-tip {
    background-color: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.docs-content .callout-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.dark .docs-content .callout-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
}

.docs-content .callout-note {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.dark .docs-content .callout-note {
    background-color: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
}

.docs-content .callout-danger {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.dark .docs-content .callout-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

/* Horizontal rule */
.docs-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

.dark .docs-content hr {
    border-top-color: #374151;
}

/* ==========================================================================
   Index Page
   ========================================================================== */

.docs-index-intro {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.dark .docs-index-intro {
    color: #9ca3af;
}

.docs-index-section {
    margin-bottom: 2.5rem;
}

.docs-index-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.dark .docs-index-section-title {
    color: #6b7280;
}

.docs-index-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-index-item {
    border-bottom: 1px solid #f3f4f6;
}

.dark .docs-index-item {
    border-bottom-color: #1f2937;
}

.docs-index-item:last-child {
    border-bottom: none;
}

.docs-index-link {
    display: block;
    padding: 0.75rem 0;
    text-decoration: none;
    transition: all 0.15s ease;
}

.docs-index-link:hover .docs-index-link-title {
    color: #2563eb;
}

.dark .docs-index-link:hover .docs-index-link-title {
    color: #60a5fa;
}

.docs-index-link-title {
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
}

.dark .docs-index-link-title {
    color: #f9fafb;
}

.docs-index-link-description {
    font-size: 0.875rem;
    color: #6b7280;
}

.dark .docs-index-link-description {
    color: #9ca3af;
}

/* ==========================================================================
   Navigation Footer
   ========================================================================== */

.docs-nav-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.dark .docs-nav-footer {
    border-top-color: #374151;
}

.docs-nav-footer-link {
    text-decoration: none;
}

.docs-nav-footer-label {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.dark .docs-nav-footer-label {
    color: #6b7280;
}

.docs-nav-footer-title {
    font-weight: 500;
    color: #2563eb;
}

.docs-nav-footer-title:hover {
    text-decoration: underline;
}

.dark .docs-nav-footer-title {
    color: #60a5fa;
}

/* ==========================================================================
   Back Link
   ========================================================================== */

.docs-back-link {
    display: inline-block;
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.docs-back-link:hover {
    color: #2563eb;
}

.dark .docs-back-link {
    color: #9ca3af;
}

.dark .docs-back-link:hover {
    color: #60a5fa;
}
