* {
    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: #111827;
}


.doc-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.doc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.doc-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.doc-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

pre {
    background: #1e293b;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.syntax-json .key { color: #93c5fd; }
.syntax-json .string { color: #86efac; }
.syntax-json .number { color: #fbbf24; }
.syntax-json .boolean { color: #f472b6; }
.syntax-json .null { color: #9ca3af; }

code:not(pre code) {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    color: #dc2626;
}

.api-method {
    display: inline-block;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.api-method.post {
    background: #dbeafe;
    color: #1e40af;
}

.api-method.get {
    background: #dcfce7;
    color: #166534;
}

.smooth-transition {
    transition: all 0.3s ease;
}

#search-docs {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

#search-docs:focus {
    outline: none;
    border-color: #1e40af;
}

.doc-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.doc-nav-link:hover {
    background: #f3f4f6;
    color: #1e40af;
}

.doc-nav-link.active {
    background: #eff6ff;
    color: #1e40af;
    border-left-color: #1e40af;
    font-weight: 600;
}

.doc-section {
    scroll-margin-top: 100px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-required {
    background: #fecaca;
    color: #991b1b;
}

.badge-optional {
    background: #dbeafe;
    color: #1e40af;
}

.note-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.note-box.info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.note-box.warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.note-box.danger {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.note-box.success {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

@media print {
    .desktop-nav, .mobile-nav, #announcement-bar, footer {
        display: none;
    }
}


/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    justify-content: space-evenly; /* key: even spacing without squeezing */
    align-items: center;

    height: 64px;
    background: #ffffff;
    border-top: 1px solid #d1d5db;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.06);
    z-index: 50;

}



/* Each nav item */
.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 48px;   /* prevents icon collision */
    padding: 6px 4px;  /* adaptive padding */

    color: #6b7280;
    font-size: 11px;
}

/* Icons */
.mobile-nav i {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

/* Active / hover */
.mobile-nav a.active,
.mobile-nav a:hover {
    color: #2563eb;
}

/* Extra safety for very small phones */
@media (max-width: 360px) {
    .mobile-nav a {
        font-size: 10px;
    }

    .mobile-nav i {
        width: 18px;
        height: 18px;
    }
}

/* Hide mobile nav on tablets & desktops */
@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}


.mobile-nav a.active {
    color: #2563eb;
}


nav a.active {
    color: #1e40af;
    font-weight: 600;
}

nav a.active::after {
    content: '';
    display: block;
    height: 2px;
    background: #1e40af;
    margin-top: 6px;
}
