/* =============================================================================
   CUSTOM API DOCUMENTATION STYLING
   For PetStore API documentation page (templates/frontend/api_docs_v2.html)
   ============================================================================= */

/* Loading spinner for API requests */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================================================
   TEST RESULTS STYLING (MAIN RESPONSE WINDOWS)
   ============================================================================= */

/* Main test results container */
.test-results {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    margin-top: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.test-results-header {
    background: #f8fafc;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-results-body {
    padding: 1rem;
}

/* =============================================================================
   API RESPONSE PRE STYLING (MAIN RESPONSE DISPLAY)
   ============================================================================= */

/* Primary styling for API response display */
.api-response-pre {
    background: #1f2937 !important;
    color: #f3f4f6 !important;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    padding: 20px !important;
    border-radius: 8px !important;
    border: 1px solid #374151 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #f3f4f6 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: 400px !important;
}

/* JSON syntax highlighting for api-response-pre */
.api-response-pre .json-key,
.api-response-pre .string:first-child {
    color: #93c5fd !important; /* Light blue for keys */
    font-weight: 600 !important;
}

.api-response-pre .json-string,
.api-response-pre .string {
    color: #86efac !important; /* Light green for strings */
}

.api-response-pre .json-number,
.api-response-pre .number {
    color: #fbbf24 !important; /* Amber for numbers */
}

.api-response-pre .json-boolean,
.api-response-pre .boolean {
    color: #f472b6 !important; /* Pink for booleans */
}

.api-response-pre .json-null,
.api-response-pre .null {
    color: #ef4444 !important; /* Red for null */
}

/* Force bright text on all child elements */
.api-response-pre * {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

/* Additional ultra-high specificity selectors for api-response-pre */
body .api-response-pre,
html body .api-response-pre {
    background: #1f2937 !important;
    color: #f3f4f6 !important;
    -webkit-text-fill-color: #f3f4f6 !important;
}

/* Ensure syntax highlighting colors are bright and visible */
body .api-response-pre .json-key,
html body .api-response-pre .json-key {
    color: #93c5fd !important;
    -webkit-text-fill-color: #93c5fd !important;
}

body .api-response-pre .json-string,
html body .api-response-pre .json-string {
    color: #86efac !important;
    -webkit-text-fill-color: #86efac !important;
}

body .api-response-pre .json-number,
html body .api-response-pre .json-number {
    color: #fbbf24 !important;
    -webkit-text-fill-color: #fbbf24 !important;
}

body .api-response-pre .json-boolean,
html body .api-response-pre .json-boolean {
    color: #f472b6 !important;
    -webkit-text-fill-color: #f472b6 !important;
}

body .api-response-pre .json-null,
html body .api-response-pre .json-null {
    color: #ef4444 !important;
    -webkit-text-fill-color: #ef4444 !important;
} 