/* API Console Widget Styles */
.api-console-widget {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.api-console-header h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.2em;
}

.api-console-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    font-size: 0.9em;
    color: #0c5460;
    margin-bottom: 15px;
}

.security-icon {
    font-size: 1.1em;
}

.api-key-input-section {
    margin-bottom: 15px;
}

.api-key-input-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.api-key-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

#api-key-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

#api-key-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Single validation status indicator below input */
.validation-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 120px;
    justify-content: flex-start;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.validation-status.hidden {
    display: none;
}

.validation-status.valid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-status.invalid {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.validation-status.loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.validation-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-icon {
    font-size: 14px;
}

.status-text {
    font-size: 12px;
}

.toggle-visibility-btn,
.clear-key-btn {
    padding: 10px 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.toggle-visibility-btn:hover,
.clear-key-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.authenticated-actions,
.validating-actions,
.invalid-actions,
.unauthenticated-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unauthenticated-actions p,
.invalid-actions p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
    min-width: 160px;
}

.action-btn.primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.action-btn.primary:hover:not(:disabled) {
    background: #0056b3;
    border-color: #0056b3;
    color: white;
    text-decoration: none;
}

.action-btn.primary:disabled {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.action-btn.secondary {
    background: transparent;
    color: #007bff;
    border-color: #007bff;
}

.action-btn.secondary:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
}

/* Copy button styles */
.copy-btn {
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .api-key-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .validation-status {
        margin-top: 8px;
        min-width: auto;
        justify-content: center;
    }
    
    .auth-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: auto;
    }
}