/* API Documentation Stripe-style Layout */

.api-docs-container {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Left Navigation Panel */
.api-sidebar {
    width: 280px;
    background: #1a1f36;
    color: #8792a2;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 2.0rem 0;
    z-index: 100;
}

.api-sidebar::-webkit-scrollbar {
    width: 6px;
}

.api-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.api-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.api-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.api-sidebar h3 {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1.5rem;
    margin: 2rem 0 0.5rem;
}

.api-sidebar h3:first-child {
    margin-top: 0;
}

.api-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.api-nav li {
    margin: 0;
}

.api-nav a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: #8792a2;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.api-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.api-nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #6772e5;
}

/* Expandable sections */
.api-nav-section {
    margin: 0;
}

.api-nav-section .api-nav-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.api-nav-section .api-nav-header:hover {
    color: #ffffff;
}

.api-nav-section .arrow {
    display: inline-block;
    width: 1rem;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.api-nav-section .api-nav {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.api-nav-section.collapsed .api-nav {
    max-height: 0;
    opacity: 0;
}

.api-nav-section > a {
    font-weight: 600;
    position: relative;
    padding-right: 2.5rem;
}

.api-nav-section > a::after {
    content: '›';
    position: absolute;
    right: 1.5rem;
    transition: transform 0.2s ease;
    font-size: 1.2rem;
}

.api-nav-section.expanded > a::after {
    transform: rotate(90deg);
}

.api-nav-section .api-nav-subsection {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
}

.api-nav-section.expanded .api-nav-subsection {
    display: block;
}

.api-nav-subsection a {
    padding-left: 2.5rem;
    font-size: 0.813rem;
}

/* Main Content Area */
.api-content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem;
    max-width: 1200px;
}

.api-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 1rem;
}

.api-content h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1a1f36;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e6e9ef;
}

.api-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1f36;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.api-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #32325d;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.api-content p {
    color: #525f7f;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.api-content section {
    scroll-margin-top: 100px;
}

/* Code Blocks */
.api-code-block {
    background: #1a1f36;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.api-code-block pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: #e6e9ef;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.api-code-block code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Inline Code */
.api-content code {
    background: #f6f8fa;
    color: #6772e5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Tables */
.api-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.api-content table th {
    background: #f6f8fa;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #1a1f36;
    border-bottom: 2px solid #e6e9ef;
}

.api-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e6e9ef;
    color: #525f7f;
}

.api-content table tr:last-child td {
    border-bottom: none;
}

/* Request/Response Cards */
.api-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.api-card h4 {
    margin-top: 0;
    color: #1a1f36;
}

/* Badges */
.api-method {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.5rem;
}

.api-method.get {
    background: #e3f9e5;
    color: #0c7d2a;
}

.api-method.post {
    background: #dbeafe;
    color: #1e40af;
}

.api-method.put {
    background: #fef3c7;
    color: #92400e;
}

.api-method.delete {
    background: #fee2e2;
    color: #991b1b;
}

/* Parameter Lists */
.api-param-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.api-param-list li {
    padding: 0.75rem;
    border-left: 3px solid #e6e9ef;
    margin-bottom: 0.5rem;
    background: #f6f8fa;
}

.api-param-name {
    font-weight: 600;
    color: #1a1f36;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.api-param-type {
    color: #6772e5;
    font-style: italic;
    margin-left: 0.5rem;
}

.api-param-required {
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .api-sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 100%;
        max-width: 280px;
    }

    .api-sidebar.mobile-open {
        transform: translateX(0);
    }

    .api-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .api-mobile-toggle {
        display: block;
        position: fixed;
        top: 90px;
        left: 1rem;
        z-index: 200;
        background: #6772e5;
        color: white;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .api-mobile-toggle {
        display: none;
    }
}

/* Alert Boxes */
.api-alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.api-alert.info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e3a8a;
}

.api-alert.warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #78350f;
}

.api-alert.success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.api-alert.error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #7f1d1d;
}


.navbar {
    background-color: #8089ff !important;
}
