/* API Reference Specific Styles */

/* API Info Box */
.api-info-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(7, 4, 82, 0.05) 0%, rgba(28, 22, 197, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(7, 4, 82, 0.1);
    margin-bottom: 1.5rem;
}

.api-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.api-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.api-info-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid rgba(7, 4, 82, 0.1);
    color: var(--netkey-dark-blue);
}

/* Endpoint Headers */
.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(7, 4, 82, 0.08);
}

.method {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method-get {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.method-post {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.method-put {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.method-patch {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.method-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.endpoint-path {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--netkey-dark-blue);
    font-weight: 500;
}

/* Code Examples */
.code-example-inline {
    margin: 1rem 0 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(7, 4, 82, 0.1);
}

.code-example-inline pre {
    margin: 0;
    padding: 1.25rem;
    background: #1a1b26;
    overflow-x: auto;
}

.code-example-inline code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    color: #a9b1d6;
}

/* Status Codes */
.status-code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-2xx {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.status-3xx {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-4xx {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.status-5xx {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Response Schema */
.response-schema {
    margin: 1rem 0;
}

.schema-item {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(7, 4, 82, 0.05);
}

.schema-item:last-child {
    border-bottom: none;
}

.schema-key {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--netkey-mid-blue);
    min-width: 150px;
    flex-shrink: 0;
}

.schema-type {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
    padding: 0.15rem 0.5rem;
    background: rgba(7, 4, 82, 0.05);
    border-radius: 3px;
}

/* Parameters Table */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.params-table th,
.params-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(7, 4, 82, 0.08);
}

.params-table th {
    background: var(--bg-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.params-table td code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--netkey-dark-blue);
}

.param-required {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.param-optional {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Try It Section */
.try-it-section {
    background: linear-gradient(135deg, rgba(7, 4, 82, 0.03) 0%, rgba(28, 22, 197, 0.03) 100%);
    border: 1px solid rgba(7, 4, 82, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.try-it-section h4 {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--netkey-dark-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.try-it-section h4 i {
    color: var(--netkey-mid-blue);
}

.try-it-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.try-it-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.try-it-input label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.try-it-input input,
.try-it-input textarea {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(7, 4, 82, 0.15);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.try-it-input input:focus,
.try-it-input textarea:focus {
    outline: none;
    border-color: var(--netkey-mid-blue);
    box-shadow: 0 0 0 3px rgba(28, 22, 197, 0.1);
}

.try-it-button {
    align-self: flex-start;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--netkey-dark-blue) 0%, var(--netkey-mid-blue) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.try-it-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 4, 82, 0.3);
}

/* API Sidebar - Resources */
.api-resources {
    background: linear-gradient(135deg, rgba(7, 4, 82, 0.05) 0%, rgba(28, 22, 197, 0.05) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.api-resources h4 {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--netkey-dark-blue);
}

.api-resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.api-resource {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border: 1px solid rgba(7, 4, 82, 0.05);
}

.api-resource:hover {
    background: var(--netkey-dark-blue);
    color: white;
    transform: translateX(4px);
}

.api-resource i {
    font-size: 1rem;
    opacity: 0.7;
}

/* Tabs for code languages */
.code-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(7, 4, 82, 0.1);
    background: var(--bg-secondary);
    border-radius: 8px 8px 0 0;
}

.code-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.code-tab:hover {
    color: var(--text-primary);
    background: rgba(7, 4, 82, 0.03);
}

.code-tab.active {
    color: var(--netkey-mid-blue);
    border-bottom-color: var(--netkey-mid-blue);
    background: white;
}

.code-panel {
    display: none;
}

.code-panel.active {
    display: block;
}

/* Collapsible sections */
.api-section {
    border: 1px solid rgba(7, 4, 82, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.api-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.api-section-header:hover {
    background: rgba(7, 4, 82, 0.05);
}

.api-section-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.api-section-content {
    padding: 1.25rem;
    border-top: 1px solid rgba(7, 4, 82, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .api-info-box {
        grid-template-columns: 1fr;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .code-example-inline pre {
        padding: 1rem;
    }
    
    .code-example-inline code {
        font-size: 0.8rem;
    }
}
