/* ============================================
   SHORTCODE: Validaciones de Formulario
   Tres columnas con listas compactas y modales
   ============================================ */

/* Contenedor principal */
.revisor-validaciones {
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Estados: Placeholder y Loading */
.validaciones-placeholder,
.validaciones-loading {
    text-align: center;
    padding: 60px 20px;
    color: #757575;
}

.validaciones-placeholder i,
.validaciones-loading i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdbdbd;
}

.validaciones-placeholder p,
.validaciones-loading p {
    font-size: 16px;
    margin: 0;
}

/* Contenedor de tres columnas */
.validaciones-contenedor {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

/* Panel individual (columna) */
.validaciones-panel {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* Título del panel */
.validaciones-panel-titulo {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 16px;
    font-weight: 600;
    color: #424242;
    display: flex;
    align-items: center;
    gap: 8px;
}

.validaciones-panel-titulo i {
    color: #1e88e5;
}

/* Lista de campos (scrollable) */
.validaciones-lista {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    margin-bottom: 15px;
}

/* Scrollbar personalizado */
.validaciones-lista::-webkit-scrollbar {
    width: 6px;
}

.validaciones-lista::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 3px;
}

.validaciones-lista::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 3px;
}

.validaciones-lista::-webkit-scrollbar-thumb:hover {
    background: #9e9e9e;
}

/* Item de la lista (campo) */
.validaciones-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.validaciones-item:hover {
    border-color: #1e88e5;
    box-shadow: 0 1px 4px rgba(30, 136, 229, 0.2);
}

/* Etiqueta del campo */
.validaciones-item-label {
    font-size: 12px;
    font-weight: 600;
    color: #616161;
    min-width: 100px;
    flex-shrink: 0;
}

/* Valor del campo */
.validaciones-item-valor {
    flex: 1;
    font-size: 13px;
    color: #212121;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.validaciones-item-valor.sin-datos {
    color: #9e9e9e;
    font-style: italic;
}

/* Botón de editar (pequeño) */
.validaciones-btn-editar {
    background: #1e88e5;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.validaciones-btn-editar:hover {
    background: #1976d2;
    transform: scale(1.05);
}

.validaciones-btn-editar i {
    font-size: 12px;
}

/* Botón de validar (al final de cada columna) */
.validaciones-btn-validar {
    background: #4caf50;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: auto;
}

.validaciones-btn-validar:hover {
    background: #43a047;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.validaciones-btn-validar:active {
    transform: translateY(0);
}

.validaciones-btn-validar.validado {
    background: #66bb6a;
    cursor: default;
    pointer-events: none;
}

.validaciones-btn-validar.validado i {
    animation: checkBounce 0.4s ease;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ============================================
   MODAL PARA EDITAR CAMPO
   ============================================ */

.validaciones-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.validaciones-modal-contenido {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header del modal */
.validaciones-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.validaciones-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #212121;
}

.validaciones-modal-cerrar {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #757575;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.validaciones-modal-cerrar:hover {
    background: #f5f5f5;
    color: #212121;
}

/* Body del modal */
.validaciones-modal-body {
    padding: 20px;
}

.validaciones-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #424242;
    font-size: 14px;
}

.validaciones-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.validaciones-input:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.validaciones-ayuda {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #757575;
}

/* Footer del modal */
.validaciones-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.validaciones-btn-cancelar,
.validaciones-btn-guardar {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.validaciones-btn-cancelar {
    background: #f5f5f5;
    color: #616161;
}

.validaciones-btn-cancelar:hover {
    background: #e0e0e0;
}

.validaciones-btn-guardar {
    background: #1e88e5;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.validaciones-btn-guardar:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .validaciones-contenedor {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .validaciones-lista {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .revisor-validaciones {
        padding: 15px;
    }
    
    .validaciones-item-label {
        min-width: 80px;
        font-size: 11px;
    }
    
    .validaciones-item-valor {
        font-size: 12px;
    }
    
    .validaciones-modal-contenido {
        width: 95%;
    }
}
