/* Timisha Solutions API Docs Styles */
:root {
    --primary: #e31e24;
    --primary-dark: #b91c1c;
    --primary-light: #fef2f2;
    --text: #111827;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg-light: #f9fafb;
    --border: #e5e7eb;
    --code-bg: #1f2937;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.docs-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo img {
    height: 48px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    text-decoration: none;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* Layout */
.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px - 80px);
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    background: var(--bg-light);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.docs-nav a {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.docs-nav a:hover {
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
}

/* Content */
.docs-content {
    flex: 1;
    padding: 48px 64px;
    max-width: 900px;
}

.doc-section {
    margin-bottom: 64px;
    padding-top: 24px;
}

.doc-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text);
}

.doc-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 48px;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.doc-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 32px;
    color: var(--text);
}

.doc-section p {
    margin-bottom: 16px;
    color: var(--text-light);
    line-height: 1.7;
}

.doc-section .lead {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.doc-section ul,
.doc-section ol {
    margin-bottom: 20px;
    padding-left: 24px;
    color: var(--text-light);
}

.doc-section li {
    margin-bottom: 8px;
}

.doc-section code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

/* Code blocks */
.code-block {
    background: var(--code-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: #e5e7eb;
    background: transparent;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.docs-table th,
.docs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

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

.docs-table td {
    color: var(--text-light);
}

.docs-table tr:last-child td {
    border-bottom: none;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.alert strong {
    display: block;
    margin-bottom: 4px;
}

/* CTA Section */
.cta-section {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
}

.cta-section h2 {
    border-bottom: none;
    margin-top: 0;
}

/* Footer */
.docs-footer {
    background: var(--text);
    color: #9ca3af;
    padding: 24px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-sidebar {
        position: fixed;
        left: 0;
        top: 80px;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        box-shadow: var(--shadow-md);
    }

    .docs-sidebar.active {
        transform: translateX(0);
    }

    .docs-content {
        padding: 32px 24px;
        max-width: 100%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav a:not(.btn) {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 70px;
    }

    .logo img {
        height: 40px;
    }

    .docs-content {
        padding: 24px 16px;
    }

    .doc-section h1 {
        font-size: 1.85rem;
    }

    .doc-section h2 {
        font-size: 1.4rem;
    }

    .cta-section {
        padding: 32px 24px;
    }

    .code-block {
        padding: 16px;
    }
}
