/* API Testing Page Styles */

.api-testing-container {
    min-height: 100vh;
    background-color: #f8f9fa;
}

.api-testing-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 10px 10px;
}

.api-testing-header h3 {
    color: white;
    margin-bottom: 0;
    font-weight: 300;
}

.auth-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-type-buttons .btn {
    flex: 1;
    min-width: 120px;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.auth-type-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.config-card, .response-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.config-card:hover, .response-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.config-card .card-header,
.response-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0 !important;
    padding: 1rem 1.5rem;
}

.config-card .card-body,
.response-card .card-body {
    padding: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.test-buttons {
    gap: 0.75rem;
}

.test-buttons .btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.test-buttons .btn:hover {
    transform: translateY(-2px);
}

.test-buttons .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.test-buttons .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
}

.test-buttons .btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

.response-status {
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 15px;
}

.response-timing {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.response-endpoint {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 5px;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

.response-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.response-content pre {
    background-color: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 1rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #212529;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.empty-response {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-response i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.examples-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.examples-card .card-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 15px 15px 0 0 !important;
    padding: 1rem 1.5rem;
}

.example-code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    word-break: break-all;
    position: relative;
}

.example-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Copy button styles */
.copy-button {
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.response-content:hover .copy-button,
.example-code:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: #dee2e6 !important;
}

/* Toast container positioning */
.toast-container {
    z-index: 1055;
}

.toast {
    min-width: 300px;
}

/* JSON Syntax Highlighting */
.response-content pre {
    color: #212529;
}

/* Loading spinner enhancement */
.spinner-border {
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar styling for response content */
.response-content::-webkit-scrollbar {
    width: 8px;
}

.response-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.response-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.response-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-type-buttons {
        flex-direction: column;
    }
    
    .auth-type-buttons .btn {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .config-card .card-body,
    .response-card .card-body {
        padding: 1rem;
    }
    
    .response-endpoint,
    .example-code {
        font-size: 0.75rem;
    }
    
    .copy-button {
        opacity: 1; /* Always visible on mobile */
    }
}