.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,
.endpoint-content > small {
    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;
}

.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);
}

#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: var(--primary);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--primary) 92%, #000 8%) 0%,
        var(--primary) 55%,
        color-mix(in srgb, var(--primary) 88%, #000 12%) 100%
    );
    border-radius: 0.75rem 0.75rem 0 0;
    border: 1px solid color-mix(in srgb, var(--primary) 75%, #000 25%);
    color: #ffffff;
    padding: 1rem 1.15rem;
}

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

.api-page-header .btn-info {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.api-page-header .btn-info:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.36);
    color: #ffffff;
}

#api_key_reveal_btn {
    border-radius: 0.375rem;
}

#simPowersuiteTryModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#simPowersuiteTryModal #sim-powersuite-try-response pre {
    max-height: 22rem;
    overflow: auto;
}

#simPowersuiteTryModal #sim-powersuite-try-response code {
    display: block;
    white-space: pre;
}

@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;
    }
}
