.payload-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.payload-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.payload-section pre {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
}

.payload-section pre code {
    color: #212529;
    font-size: 0.875rem;
    font-family: "Courier New", monospace;
}

.response-success {
    border-left: 4px solid #28a745;
}

.response-error {
    border-left: 4px solid #dc3545;
}

.endpoint-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.endpoint-header {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.endpoint-header:hover {
    background: #e9ecef;
}

.endpoint-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.endpoint-content {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.endpoint-content > * {
    min-width: 0;
}

.endpoint-content > p {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.endpoint-content .payload-section {
    margin: 0;
}

.endpoint-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.endpoint-try-btn {
    border-radius: 0.35rem;
    padding: 0.28rem 0.6rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.request-panel {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    position: sticky;
    top: 20px;
}

.request-panel h5 {
    margin-bottom: 1rem;
    color: #495057;
    font-weight: 600;
}

/* Collapsible test forms */
.card-header[data-bs-toggle="collapse"] {
    transition: background-color 0.2s;
}

.card-header[data-bs-toggle="collapse"]:hover {
    background-color: #f8f9fa;
}

.card-header[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.3s;
}

.card-header[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Disclaimer modal overlay */
#pageContent.disclaimer-blurred {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
}

#disclaimerModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

#disclaimerModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

#disclaimerModal .modal-header {
    background-color: var(--primary);
    color: white;
}

.api-key-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.55rem 0.75rem;
    font-family: "Courier New", monospace;
    font-size: 0.92rem;
    color: #495057;
}

.api-page-header {
    background: linear-gradient(135deg, #121212 0%, #232323 55%, #1a1a1a 100%);
    border-radius: 0.75rem 0.75rem 0 0;
    border: 1px solid #2f2f2f;
    color: #ffffff;
    padding: 1rem 1.15rem;
}

.api-page-header .card-title {
    color: #ffffff;
}

.api-page-header .btn-info {
    background: #2c2c2c;
    border-color: #4a4a4a;
    color: #ffffff;
}

.api-page-header .btn-info:hover {
    background: #3a3a3a;
    border-color: #5a5a5a;
    color: #ffffff;
}

#api_key_reveal_btn {
    border-radius: 0.375rem;
}

@media (max-width: 991px) {
    .endpoint-content {
        grid-template-columns: 1fr;
    }

    .endpoint-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .endpoint-title {
        flex: 1 1 calc(100% - 120px);
        min-width: 0;
        font-size: 0.95rem;
    }

    .endpoint-actions {
        margin-left: auto;
    }

    .payload-section {
        padding: 0.8rem;
    }

    .payload-section pre {
        max-width: 100%;
        font-size: 0.82rem;
        padding: 0.8rem;
    }
}
