/* Estilos para o popup de configuração da IA */
.config-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.config-popup-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.config-popup-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-popup-header h2 {
    margin: 0;
    font-size: 24px;
}

.config-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.config-popup-close:hover {
    background-color: rgba(255,255,255,0.2);
}

.config-popup-body {
    padding: 30px;
}

.config-section {
    margin-bottom: 30px;
}

.config-section h3 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.thresholds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.threshold-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.threshold-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.threshold-item input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.words-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.words-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.words-item h4 {
    margin-top: 0;
    color: #007bff;
}

.words-item textarea {
    width: 100%;
    height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.timeouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.config-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.config-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.config-btn-primary {
    background: #007bff;
    color: white;
}

.config-btn-primary:hover {
    background: #0056b3;
}

.config-btn-secondary {
    background: #6c757d;
    color: white;
}

.config-btn-secondary:hover {
    background: #545b62;
}

.config-btn-success {
    background: #28a745;
    color: white;
}

.config-btn-success:hover {
    background: #1e7e34;
}

.config-btn-warning {
    background: #ffc107;
    color: #212529;
}

.config-btn-warning:hover {
    background: #e0a800;
}

.config-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.config-test-section {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #b3d9ff;
}

.config-alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    border: 1px solid transparent;
}

.config-alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.config-alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

@media (max-width: 768px) {
    .config-popup-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .words-section {
        grid-template-columns: 1fr;
    }
    
    .thresholds-grid {
        grid-template-columns: 1fr;
    }
    
    .timeouts-grid {
        grid-template-columns: 1fr;
    }
}
