/**
 * Estilos para panel de validación en tiempo real de formularios
 * Estilo NEXUS - Paleta Corporativa
 */

:root {
    --nexus-navy: #1a1f3a;
    --nexus-navy-light: #2a3050;
    --nexus-navy-dark: #0a0e27;
    --nexus-gold: #f4c430;
    --nexus-gold-dark: #d4a520;
    --nexus-gold-light: #ffd700;
    --nexus-white: #ffffff;
    --nexus-gray-light: #e8e9f0;
    --nexus-gray: #8b8fa3;
}

#validation-panel {
    border: 2px solid var(--nexus-navy);
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 15px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 5px 20px rgba(26, 31, 58, 0.15);
    position: relative;
    overflow: hidden;
}

#validation-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--nexus-gold);
    transition: all 0.3s;
}

#validation-panel.validation-panel-visible::before {
    width: 100%;
    opacity: 0.05;
}

/* Estado oculto */
.validation-panel-hidden {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
    border: none;
    transform: translateY(-10px);
}

/* Estado visible */
.validation-panel-visible {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
}

#validation-panel h6 {
    margin-bottom: 1rem;
    color: var(--nexus-navy);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#validation-panel h6::before {
    content: 'ℹ️';
    font-size: 1.25rem;
}

#validation-panel ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Validación válida (dorado NEXUS) */
#validation-panel li.valid {
    color: var(--nexus-navy);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: rgba(244, 196, 48, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--nexus-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

#validation-panel li.valid:hover {
    background: rgba(244, 196, 48, 0.15);
    transform: translateX(5px);
}

#validation-panel li.valid::before {
    content: '✓';
    color: var(--nexus-gold);
    font-weight: bold;
    font-size: 1.1rem;
    background: var(--nexus-gold);
    color: var(--nexus-navy);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

/* Validación inválida (rojo suave) */
#validation-panel li.invalid {
    color: var(--nexus-navy);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 8px;
    border-left: 3px solid #dc3545;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

#validation-panel li.invalid:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: translateX(5px);
}

#validation-panel li.invalid::before {
    content: '✗';
    color: #dc3545;
    font-weight: bold;
    font-size: 1.1rem;
    background: #dc3545;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

/* Estilos de validación en inputs */
.form-control.is-valid {
    border-color: var(--nexus-gold);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23f4c430' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
    box-shadow: 0 0 0 0.2rem rgba(244, 196, 48, 0.15);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Feedback de validación */
.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.5rem;
    font-weight: 500;
    padding-left: 0.5rem;
    border-left: 3px solid #dc3545;
}

.valid-feedback {
    display: block;
    font-size: 0.875rem;
    color: var(--nexus-gold-dark);
    margin-top: 0.5rem;
    font-weight: 500;
    padding-left: 0.5rem;
    border-left: 3px solid var(--nexus-gold);
}
