/* ============================================
   CONDITIONAL FIELDS - CAMPOS CONDICIONAIS
   ============================================ */

   .conditional-field-condicional-group {
    position: relative;
}

.conditional-condicional-fields {
    border-left: 3px solid var(--primary-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
}

.conditional-condicional-fields:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.conditional-fields-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.conditional-fields-header .text-muted {
    font-style: italic;
}

/* Animações específicas para campos condicionais */
.conditional-condicional-fields.show {
    animation: slideInDown 0.3s ease-out;
}

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

/* Responsividade para campos condicionais */
@media (max-width: 768px) {
    .conditional-condicional-fields {
        padding: 0.75rem;
        margin-top: 0.75rem;
    }
}

.conditional-fields {
    border-left: 4px solid var(--primary-color);
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
}

.conditional-header h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   CHECKBOX MULTI REDIRECT
   ============================================ */

.checkbox-multi-redirect-group {
    position: relative;
    margin-bottom: 2rem;
}

.multi-redirect-item {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.multi-redirect-item:hover {
    border-color: var(--primary-color, #2A5E2C);
    background: linear-gradient(135deg, rgba(42, 94, 44, 0.02) 0%, #ffffff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(42, 94, 44, 0.1);
}

.multi-redirect-item.selected {
    border-color: var(--primary-color, #2A5E2C);
    background: linear-gradient(135deg, rgba(42, 94, 44, 0.05) 0%, #ffffff 100%);
    box-shadow: 0 4px 15px rgba(42, 94, 44, 0.15);
}

.multi-redirect-input[type="checkbox"],
.multi-redirect-input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    margin-right: 1rem;
    accent-color: var(--primary-color, #2A5E2C);
    transform: scale(1.2);
    flex-shrink: 0;
}

.checkbox-label,
.radio-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #434A54;
    cursor: pointer;
    margin: 0 !important;
    flex: 1;
}

.multi-redirect-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Dropdown especial */
.multi-redirect-input.form-control {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s ease;
}

.multi-redirect-input.form-control:focus {
    border-color: var(--primary-color, #2A5E2C);
    background: white;
    box-shadow: 0 0 0 3px rgba(42, 94, 44, 0.1);
}

/* Mensagens de redirecionamento */
.multi-redirect-message {
    animation: slideDown 0.5s ease-out;
}

.multi-redirect-message .redirect-message-content {
    padding: 0.5rem;
}

/* Campos condicionais */
.multi-redirect-fields {
    animation: expandDown 0.4s ease-out;
    border-left: 4px solid var(--primary-color, #2A5E2C) !important;
}

.conditional-header {
    border-bottom: 1px solid rgba(42, 94, 44, 0.1);
    padding-bottom: 0.75rem;
}

/* Indicador de ação pendente */
.checkbox-multi-redirect-group.action-pending {
    position: relative;
}

.checkbox-multi-redirect-group.action-pending::after {
    content: attr(data-pending-action);
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--primary-color, #2A5E2C);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    animation: pulse 2s infinite;
}

/* Animações */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 300px;
        transform: translateY(0);
    }
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: scaleY(0.8);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: scaleY(1);
    }
}

@keyframes pulse {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.8; transform: scale(1); }
}

/* Responsivo */
@media (max-width: 768px) {
    .multi-redirect-item {
        padding: 1rem;
        flex-direction: row;
        align-items: flex-start;
    }
    
    .multi-redirect-input[type="checkbox"],
    .multi-redirect-input[type="radio"] {
        transform: scale(1.1);
        margin-top: 0.2rem;
    }
    
    .checkbox-label,
    .radio-label {
        font-size: 1rem;
    }
    
    .multi-redirect-fields {
        padding: 1rem;
    }
}

/* ============================================
   CONDITIONAL FIELD CONDICIONAL - VERSÃO 2
   ============================================ */

.conditional-field-condicional-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.conditional-condicional-fields {
    border-left: 4px solid var(--primary-color, #2A5E2C);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.conditional-condicional-fields:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.conditional-fields-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    background: rgba(42, 94, 44, 0.05);
    margin: -1rem -1rem 1rem -1rem;
}

.conditional-fields-header .text-muted {
    color: var(--primary-color, #2A5E2C) !important;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Melhorar a aparência dos campos aninhados */
.conditional-condicional-fields .form-group {
    margin-bottom: 1.25rem;
}

.conditional-condicional-fields .form-group:last-child {
    margin-bottom: 0;
}

.conditional-condicional-fields .form-control {
    border-color: #d1d9e0;
    background: white;
}

.conditional-condicional-fields .form-control:focus {
    border-color: var(--primary-color, #2A5E2C);
    box-shadow: 0 0 0 2px rgba(42, 94, 44, 0.1);
}

/* Responsivo */
@media (max-width: 768px) {
    .conditional-condicional-fields {
        padding: 0.75rem;
        margin-top: 0.75rem;
        border-left-width: 3px;
    }
    
    .conditional-fields-header {
        margin: -0.75rem -0.75rem 0.75rem -0.75rem;
        padding: 0.6rem 0.75rem;
    }
    
    .conditional-fields-header .text-muted {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .conditional-condicional-fields {
        padding: 0.6rem;
        border-left-width: 2px;
    }
    
    .conditional-fields-header {
        margin: -0.6rem -0.6rem 0.6rem -0.6rem;
        padding: 0.5rem 0.6rem;
    }
}

/* ============================================
   FILE UPLOAD FIELD
   ============================================ */

.file-upload-container {
    border: 2px dashed #C8D1E0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.file-upload-container:hover {
    border-color: var(--primary-color, #024248);
    background-color: rgba(42, 94, 44, 0.02);
}

.file-upload-container.drag-over {
    border-color: var(--primary-color, #024248);
    background-color: rgba(42, 94, 44, 0.05);
    box-shadow: 0 0 10px rgba(42, 94, 44, 0.1);
}

.file-input-hidden {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* Zona de upload */
.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.upload-zone:hover {
    background-color: #e9ecef;
}

.upload-icon-large {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary-color, #024248);
    opacity: 0.8;
}

.upload-instructions {
    color: #495057;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color, #024248);
}

.upload-subtitle {
    font-size: 14px;
    color: #6c757d;
}

/* Painel de informações */
.upload-info-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.file-count {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

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

.browse-more-btn, .clear-files-btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.browse-more-btn {
    color: #007D7A;
    border-color: #007D7A;
}

.browse-more-btn:hover {
    background-color: rgba(42, 94, 44, 0.1);
}

.clear-files-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.clear-files-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.btn-icon {
    font-weight: bold;
}

/* Lista de arquivos */
.file-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.file-item-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.file-info {
    overflow: hidden;
}

.file-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 2px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 250px;
}

.file-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #6c757d;
}

.file-controls {
    display: flex;
    align-items: center;
}

.file-remove-btn {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.file-remove-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.file-error-badge {
    background-color: #dc3545;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Informações sobre arquivos permitidos */
.file-info-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color, #2A5E2C);
}

.info-label {
    font-weight: 600;
    color: #495057;
    margin-right: 5px;
}

/* Mensagem de erro geral */
.file-error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
    padding: 8px 12px;
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
    border-radius: 4px;
    animation: fadeIn 0.3s ease;
}

/* Animações gerais */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Responsividade File Upload */
@media (max-width: 768px) {
    .upload-info-panel {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .file-details {
        max-width: 70%;
    }
    
    .file-name {
        max-width: 200px;
    }
    
    .file-info-container {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .file-name {
        max-width: 180px;
    }
    
    .file-meta {
        flex-direction: column;
        gap: 2px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 5px;
    }
}