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

#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-color: var(--primary);
    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-color: var(--primary);
    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: #1a5e1a;
    border-color: #2d8a2d;
    color: #ffffff;
}

.api-page-header .btn-info:hover {
    background: #237a23;
    border-color: #3a9e3a;
    color: #ffffff;
}

#api_key_reveal_btn {
    border-radius: 0.375rem;
}

#gloLoginTryModal .modal-body,
#checkBalanceTryModal .modal-body,
#checkNumberTryModal .modal-body,
#vendGloDataTryModal .modal-body,
#vendGloGiftingTryModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#gloLoginTryModal pre,
#checkBalanceTryModal pre,
#checkNumberTryModal pre,
#vendGloDataTryModal pre,
#vendGloGiftingTryModal pre {
    max-height: 22rem;
    overflow: auto;
}

#gloLoginTryModal code,
#checkBalanceTryModal code,
#checkNumberTryModal code,
#vendGloDataTryModal code,
#vendGloGiftingTryModal 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;
    }
}

/* How It Works Component */
.fw-how-it-works { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; }
.fw-hiw-toggle { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; font-weight: 600; font-size: 0.95em; color: #334155; text-decoration: none !important; cursor: pointer; transition: background 0.2s; }
.fw-hiw-toggle:hover { background: #f8fafc; color: #334155; }
.fw-hiw-toggle[aria-expanded="true"] .fw-hiw-arrow { transform: rotate(180deg); }
.fw-hiw-arrow { font-size: 0.75em; transition: transform 0.3s ease; color: #94a3b8; }
.fw-hiw-body { padding: 0 20px 20px; }
.fw-hiw-steps { display: flex; flex-direction: column; gap: 16px; }
.fw-hiw-step { display: flex; align-items: flex-start; gap: 14px; }
.fw-hiw-step-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.fw-hiw-step strong { display: block; font-size: 0.9em; color: #1e293b; margin-bottom: 2px; }
.fw-hiw-step p { margin: 0; font-size: 0.82em; color: #64748b; line-height: 1.5; }
