/* API Documentation Styles */

#api-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #2d3748;
}

.api-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid #e2e8f0;
}

.nav-link {
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #2c5aa0;
}

.api-nav h1 {
    color: #1a202c;
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.api-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.api-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.api-section h2 {
    color: #1a202c;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid #3182ce;
    padding-bottom: 10px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3182ce;
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2d3748;
    font-size: 1.1rem;
}

.feature-card p {
    margin: 0;
    color: #4a5568;
    font-size: 0.9rem;
}

.endpoint {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.method {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.url {
    font-family: 'JetBrains Mono', monospace;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
}

.endpoint-description {
    color: #4a5568;
    margin-bottom: 20px;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9rem;
}

.params-table th,
.params-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.params-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.params-table code {
    background: #fed7d7;
    color: #c53030;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}

.code-block {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.code-block code {
    color: #e2e8f0;
    background: none;
    padding: 0;
}

.error-example {
    margin: 20px 0;
}

.error-example h4 {
    color: #e53e3e;
    margin-bottom: 10px;
}

.test-area {
    background: #f7fafc;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.test-input {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.test-input label {
    font-weight: 500;
    color: #2d3748;
    min-width: 180px;
}

.test-input input {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
    width: 120px;
}

.test-input button {
    background: #3182ce;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.test-input button:hover {
    background: #2c5aa0;
}

.test-input button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.test-url {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.test-url span {
    font-family: 'JetBrains Mono', monospace;
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 3px;
    margin-left: 10px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.ready {
    background: #bee3f8;
    color: #2b6cb0;
}

.status-badge.loading {
    background: #faf089;
    color: #975a16;
}

.status-badge.success {
    background: #c6f6d5;
    color: #276749;
}

.status-badge.error {
    background: #fed7d7;
    color: #c53030;
}

.response-display {
    background: #1a202c;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    min-height: 100px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.usage-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.example-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.example-card h4 {
    background: #f7fafc;
    margin: 0;
    padding: 15px 20px;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

.example-card .code-block {
    margin: 0;
    border-radius: 0;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list strong {
    color: #2d3748;
}

/* Responsive design */
@media (max-width: 768px) {
    .api-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .test-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .test-input label {
        min-width: auto;
    }
    
    .test-input input {
        width: 100%;
    }
    
    .usage-examples {
        grid-template-columns: 1fr;
    }
}