/* Custom Styles for Phrathongkham Data API Dashboard */

.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    line-height: 1.6;
}

.code-block mark {
    background: #fbbf24;
    color: #1e293b;
    padding: 2px 4px;
    border-radius: 2px;
}

.method-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.sidebar-link {
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: rgba(227, 93, 16, 0.1);
    transform: translateX(4px);
}

.sidebar-link.active {
    background: rgba(227, 93, 16, 0.15);
    border-left: 4px solid #e35d10;
}

/* Table view styles */
#table-container table {
    font-size: 0.875rem;
}

#table-container pre {
    max-width: 300px;
    overflow-x: auto;
    background: #f3f4f6;
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin: 0;
}

/* Bottom Navigation Styles */
.bottom-nav-item {
    position: relative;
    transition: all 0.2s ease;
}

.bottom-nav-item.active,
.bottom-nav-item:active {
    color: #e35d10;
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #e35d10;
    border-radius: 0 0 3px 3px;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Safe area for mobile devices with notches */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Mobile Responsive */
@media (max-width: 1023px) {
    .code-block {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    /* Ensure content doesn't get cut off by bottom nav */
    main {
        padding-bottom: 5rem !important;
    }
    
    /* Make tables responsive */
    #table-container table {
        font-size: 0.75rem;
    }
    
    #table-container th,
    #table-container td {
        padding: 0.5rem !important;
    }
}

/* Safe area for mobile devices with notches */
@supports (padding: max(0px)) {
    nav.fixed,
    .safe-area-bottom {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Endpoint card and section visibility transitions */
.endpoint-card,
.endpoint-section {
    transition: opacity 0.3s ease-out, display 0.3s ease-out;
}

.endpoint-card[style*="display: none"],
.endpoint-section[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

