/* ========================================
   Altafid API Documentation Styles
   Production-Ready Version
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #ffffff;
    --surface: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --code-bg: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Reset and Base Styles */
* {
    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-primary);
    background-color: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--primary-dark);
}

/* Navigation */
.navbar {
    background: var(--background);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* Documentation Page Styles */
.doc-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.doc-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.doc-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

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

.doc-sidebar a {
    color: var(--text-secondary);
    display: block;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.doc-sidebar a:hover,
.doc-sidebar a.active {
    background-color: var(--surface);
    color: var(--primary-color);
}

.doc-content {
    max-width: 900px;
}

.doc-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.doc-content h2 {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.doc-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.doc-content pre {
    background-color: var(--code-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.doc-content code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
}

.doc-content p code,
.doc-content li code,
.doc-content td code,
.doc-content th code {
    background-color: #f1f5f9;
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.875em;
    font-weight: 600;
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

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

.doc-content th {
    background-color: var(--surface);
    font-weight: 600;
    color: var(--text-primary);
}

.doc-content td {
    color: var(--text-secondary);
}

/* Callouts */
/* Callouts */
.callout {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.callout.info {
    background-color: #dbeafe;
    border-color: var(--primary-color);
    color: #1e3a8a;
}

.callout.info strong {
    color: #1e40af;
}

.callout.info code {
    background-color: rgba(255, 255, 255, 0.7);
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.875em;
}

.callout.warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
    color: #78350f;
}

.callout.warning strong {
    color: #92400e;
}

.callout.warning code {
    background-color: rgba(255, 255, 255, 0.7);
    color: #92400e;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.875em;
    font-weight: 600;
}

.callout.success {
    background-color: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.callout.success strong {
    color: #047857;
}

.callout ul, .callout ol {
    color: inherit;
    margin-top: 0.5rem;
}

.callout li {
    color: inherit;
}

/* Endpoint Cards */
.endpoint-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.3s ease;
    margin: 1.5rem 0;
}

.endpoint-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.endpoint-method {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    flex-shrink: 0;
}

.endpoint-method.get {
    background-color: #dbeafe;
    color: #1e40af;
}

.endpoint-method.post {
    background-color: #d1fae5;
    color: #065f46;
}

.endpoint-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--text-primary);
}

.endpoint-details p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Credential Box */
.credential-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

.credential-box strong {
    color: #0f172a;
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .doc-layout {
        grid-template-columns: 1fr;
    }
    
   .doc-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

.doc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.doc-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.doc-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
}