/* ============================================================================
   VOICE MODULE - CSS STYLES
   ADD THIS TO public/css/style.css OR CREATE A NEW FILE
   ============================================================================ */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* Modal Container */
.agent-config-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
.agent-config-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-sync {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-sync:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
}

/* Tabs */
.config-tabs {
    display: flex;
    gap: 5px;
    padding: 15px 20px 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.config-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-size: 0.95rem;
    transition: all 0.3s;
    color: #666;
}

.config-tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.config-tab-btn.active {
    background: white;
    color: #667eea;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
}

/* Modal Body */
.agent-config-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.config-tab-content {
    animation: fadeIn 0.3s ease-in;
}

.config-tab-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Range Sliders */
.range-slider {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-value {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 10px;
}

/* Version History */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.version-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.version-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.version-card.active {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(102, 126, 234, 0.1));
}

.version-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.version-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.version-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-draft {
    background: #ffc107;
    color: #333;
}

.status-deploying {
    background: #17a2b8;
    color: white;
}

.status-deployed {
    background: #28a745;
    color: white;
}

.status-failed {
    background: #dc3545;
    color: white;
}

.version-active {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.version-meta {
    margin: 10px 0;
    color: #666;
    font-size: 0.9rem;
}

.version-meta p {
    margin: 5px 0;
}

.version-description {
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

.version-changes {
    margin: 10px 0;
}

.version-changes h5 {
    margin: 0 0 8px 0;
    color: #333;
}

.version-changes ul {
    margin: 0;
    padding-left: 20px;
}

.version-changes li {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.version-changes code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #667eea;
}

.version-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.btn-restore {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-restore:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Modal Footer */
.agent-config-modal .modal-footer {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.change-description-container {
    margin-bottom: 15px;
}

.change-description-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancel, .btn-save-local, .btn-deploy {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-cancel {
    background: #dc3545;
    color: white;
}

.btn-cancel:hover {
    background: #c82333;
}

.btn-save-local {
    background: #ffc107;
    color: #333;
}

.btn-save-local:hover {
    background: #e0a800;
}

.btn-deploy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-deploy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Feedback Section */
.voice-feedback-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 8px;
    border: 2px solid #667eea;
}

.voice-feedback-section h4 {
    margin: 0 0 15px 0;
    color: #667eea;
}

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

.btn-feedback-like, .btn-feedback-dislike, .btn-feedback-auto {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-feedback-like {
    background: #28a745;
    color: white;
}

.btn-feedback-like:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-feedback-dislike {
    background: #dc3545;
    color: white;
}

.btn-feedback-dislike:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-feedback-auto {
    background: #17a2b8;
    color: white;
}

.btn-feedback-auto:hover {
    background: #138496;
    transform: translateY(-2px);
}

.feedback-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.feedback-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Admin-only elements */
.admin-only {
    /* Will be shown/hidden by JavaScript based on user role */
}

/* Responsive */
@media (max-width: 768px) {
    .agent-config-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .config-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .config-tab-btn {
        white-space: nowrap;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-cancel, .btn-save-local, .btn-deploy {
        width: 100%;
    }
    
    .feedback-buttons {
        flex-direction: column;
    }
    
    .btn-feedback-like, .btn-feedback-dislike, .btn-feedback-auto {
        width: 100%;
    }
}
