/* ==========================================================================
   Codealo - API Documentation Page Styles
   Estilos específicos para la página de documentación de API
   ========================================================================== */

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1f2937;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Code block */
.code-block {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

/* Tab buttons */
.tab-btn.active {
    background: #f97316;
    color: white;
}

pre code.hljs {
    padding: 1rem !important;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Prevent long code lines from causing horizontal overflow */
#content-container pre,
.section-content pre {
    overflow-x: auto;
    max-width: 100%;
}

/* Endpoint card */
.endpoint-card {
    scroll-margin-top: 100px;
}

/* Method badges */
.method-badge {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
}

.method-post {
    background: #10b981;
    color: white;
}

.method-get {
    background: #3b82f6;
    color: white;
}

/* Parameter required badge */
.param-required {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Mobile menu */
.mobile-menu {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        right: -100%;
        top: 0;
        width: 100% !important;
        max-width: 100%;
        height: 100vh;
        z-index: 50;
        transition: right 0.3s;
        max-height: 100vh;
        border-radius: 0;
        border-left: 1px solid #1f2937;
    }
    
    .sidebar.open {
        right: 0;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
    }
    
    .overlay.active {
        display: block;
    }
}

/* Accordion (details/summary) */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::marker {
    display: none;
}

details[open] summary svg {
    transform: rotate(180deg);
}

details summary:hover {
    background: rgba(255, 255, 255, 0.02);
}

details summary:focus {
    outline: 2px solid rgba(221, 153, 44, 0.5);
    outline-offset: -2px;
    border-radius: 0.75rem;
}

