﻿/* Modern API Reference - Light Theme */

.api-reference-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Sidebar Styles - Light */
.api-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

    .sidebar-header h5 {
        font-size: 1rem;
        font-weight: 700;
        color: #1a1a1a;
    }

/* Search Box - Light */
.sidebar-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.search-box .form-control {
    padding-left: 2.5rem;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    font-size: 0.9rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

    .search-box .form-control:focus {
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

/* Navigation - Light */
.sidebar-nav {
    padding: 1rem 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

    .nav-section-header:hover {
        background: #f8f9fa;
        color: #667eea;
        border-left-color: #667eea;
    }

    .nav-section-header .toggle-icon {
        font-size: 0.75rem;
        transition: transform 0.3s ease;
        color: #adb5bd;
    }

.nav-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

    .nav-sublist.show {
        max-height: 1000px;
    }

.nav-subitem {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.5rem 0.625rem 3rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

    .nav-link:hover {
        background: white;
        color: #667eea;
        border-left-color: #667eea;
    }

.method-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.75rem;
    min-width: 55px;
    text-align: center;
    color: white;
}

.method-get {
    background: #28a745;
}

.method-post {
    background: #007bff;
}

.method-put {
    background: #fd7e14;
}

.method-delete {
    background: #dc3545;
}

.method-patch {
    background: #20c997;
}

.nav-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content - Light */
.api-main-content {
    flex-grow: 1;
    min-width: 0;
}

.content-header {
    margin-bottom: 2rem;
}

    .content-header h1 {
        color: #1a1a1a;
        font-weight: 700;
    }

    .content-header p {
        color: #6c757d;
    }

/* API Key Section - Light */
.api-key-section .card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
}

/* Endpoint Cards - Light */
.api-endpoint-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

    .api-endpoint-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        border-color: #dee2e6;
    }

    .api-endpoint-card.expanded {
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
        border-color: #667eea;
    }

.endpoint-header {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    cursor: pointer;
    gap: 1rem;
    background: white;
    border-bottom: 2px solid #f8f9fa;
    transition: background 0.2s ease;
}

    .endpoint-header:hover {
        background: #f8f9fa;
    }

.endpoint-method {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 85px;
    text-align: center;
    color: white;
}

    .endpoint-method.method-get {
        background: #28a745;
    }

    .endpoint-method.method-post {
        background: #007bff;
    }

    .endpoint-method.method-put {
        background: #fd7e14;
    }

    .endpoint-method.method-delete {
        background: #dc3545;
    }

    .endpoint-method.method-patch {
        background: #20c997;
    }

.endpoint-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.endpoint-url {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.85rem;
    background: #f8f9fa;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    word-break: break-all;
    border: 1px solid #e9ecef;
}

.endpoint-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.try-it-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: 8px;
}

.toggle-icon {
    color: #adb5bd;
    transition: transform 0.3s ease;
}

.api-endpoint-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* Endpoint Content - Light */
.endpoint-content {
    display: none;
    padding: 1.5rem;
    background: white;
}

/* Bootstrap 4 Tabs Styling - Light Theme */
.endpoint-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
    background: white;
}

    .endpoint-tabs .nav-link {
        border: none;
        color: #6c757d;
        font-weight: 600;
        padding: 0.875rem 1.5rem;
        border-radius: 8px 8px 0 0;
        transition: all 0.2s ease;
        background: transparent;
        cursor: pointer;
    }

        .endpoint-tabs .nav-link:hover {
            color: #667eea;
            background: rgba(102, 126, 234, 0.1);
        }

        .endpoint-tabs .nav-link.active {
            color: #667eea;
            background: white;
            border-bottom: 2px solid white;
            margin-bottom: -2px;
        }

        .endpoint-tabs .nav-link i {
            margin-right: 0.25rem;
        }

/* Tab Content */
.tab-content {
    padding-top: 1rem;
}

.tab-pane {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code Sections - Light */
.code-section {
    margin-bottom: 1.5rem;
}

    .code-section:last-child {
        margin-bottom: 0;
    }

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f8f9fa;
}

.code-title {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.btn-copy {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

    .btn-copy:hover {
        background: #e9ecef;
        color: #1a1a1a;
        border-color: #dee2e6;
    }

.code-block-light {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.25rem;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0;
    line-height: 1.6;
}

    .code-block-light pre {
        margin: 0;
        white-space: pre-wrap;
    }

    .code-block-light code {
        color: #495057;
        font-family: 'Courier New', monospace;
    }

/* Query Parameters - Light */
.query-params-light {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.25rem;
}

.query-param-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

    .query-param-item:last-child {
        margin-bottom: 0;
    }

    .query-param-item code {
        background: white;
        padding: 0.25rem 0.6rem;
        border-radius: 6px;
        font-weight: 600;
        border: 1px solid #e9ecef;
    }

.param-key {
    color: #007bff;
}

.param-value {
    color: #28a745;
}

/* Response Placeholder - Light */
.response-placeholder-light {
    padding: 3rem 2rem;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

/* Try It Panel - Light */
.try-it-panel-light {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-top: 1.25rem;
}

.try-it-header-light {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #e9ecef;
    background: white;
    border-radius: 10px 10px 0 0;
}

.try-it-body-light {
    padding: 1.5rem;
}

.response-area-light {
    margin-top: 1.5rem;
}

.response-header-light {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.response-status {
    font-weight: 600;
}

.response-time {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Search Results - Light */
.search-results-info {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px solid #e9ecef;
}

/* Folder Headers - Light */
.folder-header {
    padding-bottom: 1rem;
    border-bottom: 3px solid #f8f9fa;
    margin-bottom: 1.5rem;
}

    .folder-header h2 {
        color: #1a1a1a;
        font-weight: 700;
    }

/* Responsive */
@media (max-width: 991px) {
    .api-reference-wrapper {
        flex-direction: column;
    }

    .api-sidebar {
        width: 100%;
        position: static;
        height: auto;
        max-height: 400px;
    }

    .nav-sublist.show {
        max-height: 500px;
    }
}

@media (max-width: 575px) {
    .endpoint-header {
        flex-wrap: wrap;
    }

    .endpoint-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.75rem;
    }

    .endpoint-tabs .nav-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
}

/* Scrollbar Styling - Light */
.api-sidebar::-webkit-scrollbar {
    width: 8px;
}

.api-sidebar::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.api-sidebar::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

    .api-sidebar::-webkit-scrollbar-thumb:hover {
        background: #adb5bd;
    }


/* Endpoint Description Styling */
.endpoint-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    max-width: 600px;
}

.endpoint-description i {
    color: #667eea;
    font-size: 0.8rem;
}

/* Hover effect for better readability */
.api-endpoint-card:hover .endpoint-description {
    color: #495057;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .endpoint-description {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
}
