/* static/css/overview.css */

/* Ensure the API content panel displays correctly */
.api-content-panel {
    width: 100%;
    max-width: none;
    flex: 1;
}

/* Main two-column layout */
.overview-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem 0;
    min-height: 100vh;
    position: relative;
    width: 100%;
    max-width: none;
}

/* --- Left Navigation Sidebar --- */
.overview-nav {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    z-index: 10;
    height: fit-content;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.overview-nav nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overview-nav nav ul li a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
    margin: 0 1rem;
    border-radius: 6px;
}

.overview-nav nav ul li a:hover {
    color: #ea580c;
    background-color: #fff7ed;
    border-left-color: #fed7aa;
}

.overview-nav nav ul li a.active {
    color: #F97316;
    border-left-color: #F97316;
    font-weight: 600;
    background-color: #fff7ed;
}



/* --- Right Main Content --- */
.overview-main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: none;
}

/* Universal Style for all Content Cards */
.content-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.content-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Styling for the Endpoint Path card */
.endpoint-header-card h3 {
    margin-bottom: 0.5rem;
}

.endpoint-path-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #f7fafc;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}

.method-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}
.method-badge.post { background-color: #166534; }
.method-badge.get { background-color: #166534; }
.method-badge.put { background-color: #fca130; }
.method-badge.delete { background-color: #f93e3e; }


/* --- Styling for the Parameters Table --- */
.table-responsive {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.parameters-table-stylish {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.parameters-table-stylish th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #f7fafc;
}

.parameters-table-stylish td {
    text-align: left;
    padding: 1rem;
    color: #2d3748;
    border-top: 1px solid #e2e8f0;
}

.parameters-table-stylish td code {
    background-color: transparent;
    color: #dd1144;
    font-weight: 500;
    padding: 0;
}

.parameters-table-stylish .required {
    color: #dd1144;
    font-weight: bold;
    margin-left: 0.25rem;
}


/* --- New Styling for Code Blocks (Request/Response) --- */
.code-block-wrapper {
    position: relative;
    background-color: #1a202c; /* Dark background for code */
    border-radius: 0.5rem;
    padding: 1rem;
}

.code-block-wrapper pre {
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: #e2e8f0;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.code-block-wrapper .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #4a5568;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #e2e8f0;
    padding: 0.4rem 0.6rem;
    border-radius: 0.375rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.code-block-wrapper:hover .copy-btn {
    opacity: 1;
}


/* --- Additional Information Card --- */
.additional-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.additional-info p {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0;
}
.version-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background-color: #c6f6d5;
    color: #2f855a;
}
.light-divider {
    border: 0;
    height: 1px;
    background-color: #e2e8f0;
    margin: 1.5rem 0;
}

/* === MOBILE RESPONSIVE STYLES === */

/* Mobile Navigation Toggle Button (Hidden by default) */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 1000;
    background: #2b6cb0;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.3);
    transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
    background: #2c5282;
    transform: scale(1.05);
}

.mobile-nav-toggle.active {
    background: #e53e3e;
}

/* Mobile overlay for navigation */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-nav-overlay.active {
    display: block;
}

/* Tablet Responsive Styles */
@media (max-width: 1024px) {
    .overview-container {
        gap: 1.5rem;
        padding: 1.5rem 0;
    }
    
    .overview-nav {
        width: 200px;
    }
    
    .content-card {
        padding: 1.25rem;
    }
    
    .endpoint-path-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .method-badge {
        align-self: flex-start;
    }
    
    .parameters-table-stylish {
        font-size: 0.85rem;
    }
    
    .parameters-table-stylish th,
    .parameters-table-stylish td {
        padding: 0.6rem 0.8rem;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .overview-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .overview-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1001;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .overview-nav.mobile-open {
        left: 0;
    }
    
    .overview-nav nav ul li a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-left: none;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .overview-nav nav ul li a.active {
        background-color: #ebf8ff;
        border-left: 4px solid #2b6cb0;
    }
    
    .overview-main-content {
        width: 100%;
        padding: 0 1rem;
    }
    
    .content-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .content-card h3 {
        font-size: 1.1rem;
    }
    
    .endpoint-path-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .endpoint-path-wrapper code {
        word-break: break-all;
        font-size: 0.85rem;
    }
    
    .method-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }
    
    /* Make tables horizontally scrollable on mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .parameters-table-stylish {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    .parameters-table-stylish th,
    .parameters-table-stylish td {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    .code-block-wrapper {
        padding: 0.75rem;
        overflow-x: auto;
    }
    
    .code-block-wrapper pre {
        font-size: 0.8rem;
        white-space: pre;
        overflow-x: auto;
    }
    
    .copy-btn {
        position: static !important;
        margin-top: 0.5rem;
        width: 100%;
        opacity: 1 !important;
    }
}

/* Small Mobile Responsive Styles */
@media (max-width: 480px) {
    .mobile-nav-toggle {
        width: 45px;
        height: 45px;
        font-size: 16px;
        top: 75px;
        left: 15px;
    }
    
    .overview-nav {
        width: 100%;
        left: -100%;
    }
    
    .overview-main-content {
        padding: 0 0.5rem;
    }
    
    .content-card {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .content-card h3 {
        font-size: 1rem;
    }
    
    .endpoint-path-wrapper {
        padding: 0.75rem;
    }
    
    .endpoint-path-wrapper code {
        font-size: 0.8rem;
    }
    
    .method-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .parameters-table-stylish {
        min-width: 500px;
        font-size: 0.75rem;
    }
    
    .parameters-table-stylish th,
    .parameters-table-stylish td {
        padding: 0.4rem 0.6rem;
    }
    
    .code-block-wrapper {
        padding: 0.5rem;
    }
    
    .code-block-wrapper pre {
        font-size: 0.75rem;
    }
}