/**
 * Estilos para Personalização de Agentes
 * Adicionar ao style.css principal
 */

/* Agent Customization Container */
.agent-customization-container {
    padding: 1rem 0;
}

.customization-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E5E7EB;
}

.customization-header h4 {
    color: var(--color-primary, #4A47A3);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Search Box */
.search-box input {
    border-radius: 8px;
    border: 2px solid #E5E7EB;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary, #4A47A3);
    box-shadow: 0 0 0 4px rgba(74, 71, 163, 0.1);
}

/* Agent Card */
.agent-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary, #4A47A3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary, #4A47A3);
}

.agent-card:hover::before {
    opacity: 1;
}

.agent-card.customized {
    border-color: var(--color-primary, #4A47A3);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

.agent-card.customized::before {
    opacity: 1;
}

/* Agent Icon */
.agent-icon-wrapper {
    flex-shrink: 0;
}

.agent-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary, #4A47A3), #6B7280);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 4px 8px rgba(74, 71, 163, 0.3);
}

/* Agent Info */
.agent-info {
    flex-grow: 1;
}

.agent-name {
    color: var(--color-text-base, #111827);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.agent-description {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
}

.agent-category {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Agent Card Actions */
.agent-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-card-actions button {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.agent-card-actions button:hover {
    transform: translateY(-2px);
}

/* Custom Preview */
.agent-custom-preview {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #F9FAFB;
    border-radius: 8px;
    border-left: 3px solid var(--color-primary, #4A47A3);
}

.agent-custom-preview small {
    color: var(--color-text-muted, #6B7280);
    line-height: 1.5;
}

/* Customization Form */
.customization-form {
    padding: 1rem 0;
}

.customization-section {
    margin-bottom: 2rem;
}

.customization-section h6 {
    color: var(--color-primary, #4A47A3);
    font-weight: 600;
    margin-bottom: 1rem;
}

.customization-section .form-label {
    font-weight: 500;
    color: var(--color-text-base, #111827);
    margin-bottom: 0.5rem;
}

.customization-section .form-control,
.customization-section .form-select {
    border-radius: 8px;
    border: 2px solid #E5E7EB;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.customization-section .form-control:focus,
.customization-section .form-select:focus {
    outline: none;
    border-color: var(--color-primary, #4A47A3);
    box-shadow: 0 0 0 4px rgba(74, 71, 163, 0.1);
}

.customization-section small {
    color: var(--color-text-muted, #6B7280);
    font-size: 0.8rem;
}

/* Preview Box */
.preview-box {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #E5E7EB;
}

.preview-box pre {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-base, #111827);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Modal Styles */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--color-primary, #4A47A3), #6B7280);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem 2rem;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 2rem;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #E5E7EB;
    padding: 1rem 2rem;
    background: #F9FAFB;
    border-radius: 0 0 16px 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .agent-card {
        padding: 1rem;
    }

    .agent-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .customization-filters .col-md-6,
    .customization-filters .col-md-3 {
        width: 100%;
    }

    .modal-dialog-xl {
        max-width: 95%;
        margin: 1rem auto;
    }

    .modal-body {
        max-height: calc(100vh - 250px);
    }
}

/* Loading State */
#agentsSettingsGrid .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Empty State */
#agentsSettingsGrid .text-center i {
    opacity: 0.5;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agent-card {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar Customization */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #F1F1F1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--color-primary, #4A47A3);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #3D3B8B;
}
