/* 
 * Spiritual Names Request Form - Enhanced UI
 * Basado en los estilos del tema mataji y Bootstrap 5.3.0
 */

:root {
    --sn-primary: #212529;
    --sn-secondary: #F39200;
    --sn-distant: #4D68B0;
    --sn-boy: #6BABDC;
    --sn-azureish: #DAE2F1;
    --sn-lightgray: #EDEDED;
    --sn-gray: #707070;
    --sn-white: #ffffff;
    --sn-field-height: 52px; /* altura uniforme para inputs y selects */
    --sn-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Contenedor principal del formulario */
.spiritual-names-form-container {
    background: var(--sn-white);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0 0 2rem 0;
    font-family: 'Open Sans', sans-serif;
    min-height: auto;
}

/* Header del formulario */
.sn-form-header {
    background: linear-gradient(135deg, var(--sn-distant) 0%, var(--sn-boy) 100%);
    color: var(--sn-white);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.sn-form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.sn-form-header h1 {
    font-family: "Barlow Semi Condensed", sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 1;
    color: var(--sn-white);
}

/* Reduce excessive animations - keep only subtle transitions */
.sn-btn,
.sn-radio-item,
.sn-form-group input,
.sn-form-group select,
.sn-form-group textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Remove bounce and jump animations */
@keyframes selectionBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Simplify button hover effects */
.sn-btn:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sn-radio-item:hover {
    transform: none;
}

.sn-form-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Indicador de progreso */
.sn-progress-container {
    background: var(--sn-lightgray);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.sn-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
}

.sn-progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
    transform: translateY(-50%);
}

.sn-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--sn-boy), var(--sn-distant));
    z-index: 2;
    transform: translateY(-50%);
    transition: width 0.6s ease;
    width: 0%;
}

.sn-step {
    background: var(--sn-white);
    border: 2px solid #dee2e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

.sn-step.active {
    background: var(--sn-secondary);
    border-color: var(--sn-secondary);
    color: var(--sn-white);
}

.sn-step.completed {
    background: var(--sn-distant);
    border-color: var(--sn-distant);
    color: var(--sn-white);
}

.sn-step.completed .fas {
    font-size: 0.8rem;
}

.sn-step-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--sn-gray);
    margin-top: 0.5rem;
}
.sn-step-label{
    width: 33.33%;
    text-align: center;
    display: block;
}
.sn-step-label:first-child{
    text-align: left;
}
.sn-step-label:last-child{
    text-align: right;
}   
.sn-step-label.active {
    color: var(--sn-primary);
    font-weight: 600;
}

/* Contenido del formulario */
.sn-form-content {
    padding: 1.5rem 2.5rem;
    transition: height 0.3s var(--sn-ease-out); /* suaviza cambios de altura entre pasos */
    position: relative;
    min-height: auto; /* se adapta al contenido */
}

/* Durante la animaci?n de altura, ocultamos overflow para evitar parpadeos */
/* Keep layout stable while switching steps */
.sn-form-content.sn-animating {
    overflow: visible;
}

/* Asegura que las secciones no afecten el flujo cuando se superponen */
.sn-form-section {
    will-change: opacity, transform;
}

/* Cuando estamos animando, las secciones se superponen dentro del contenedor */
.sn-form-content.sn-animating .sn-form-section {
    position: static;
}

/* Clases de transici?n para un crossfade/slide suave */
.sn-section-enter,
.sn-section-enter-active,
.sn-section-leave,
.sn-section-leave-active {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Secciones del formulario */
.sn-form-section {
    display: none;
}

.sn-form-section.active {
    display: block;
}

.sn-form-section h4 {
    color: var(--sn-primary);
    font-family: "Barlow Semi Condensed", sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

/* Only use Barlow Semi Condensed for titles, not for all text */
.spiritual-names-form-container,
.spiritual-names-form-container * {
    font-family: 'Open Sans', sans-serif;
}

.spiritual-names-form-container h1,
.spiritual-names-form-container h2,
.spiritual-names-form-container h3,
.spiritual-names-form-container h4,
.spiritual-names-form-container h5,
.spiritual-names-form-container h6,
.spiritual-names-form-container .sn-form-header h1,
.spiritual-names-form-container .sn-form-section h4 {
    font-family: "Barlow Semi Condensed", sans-serif;
}

.sn-form-section h4::before {
    content: '';
    width: 4px;
    height: 2rem;
    background: linear-gradient(135deg, var(--sn-boy), var(--sn-distant));
    border-radius: 2px;
    margin-right: 1rem;
}

/* Campos del formulario mejorados */
.sn-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.sn-form-group label {
    color: var(--sn-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.sn-form-group .sn-radio-item label {
    margin-bottom: 0;
}

.sn-form-group label .required-asterisk {
    color: var(--sn-secondary);
    margin-left: 0.25rem;
    font-weight: bold;
}

.sn-form-group .form-control,
.sn-form-group .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
    height: var(--sn-field-height);
    line-height: 1.5;
}

.sn-form-group .form-control:focus,
.sn-form-group .form-select:focus {
    border-color: var(--sn-distant);
    box-shadow: 0 0 0 0.25rem rgba(77, 104, 176, 0.15);
    background-color: var(--sn-white);
    transform: translateY(-1px);
}

.sn-form-group .form-control.is-valid {
    border-color: #198754;
    background-color: rgba(25, 135, 84, 0.05);
}

.sn-form-group .form-control.is-invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Campos de radio y checkbox mejorados */
.sn-radio-group {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    flex-direction: row;
}

/* estado inv?lido para radios */
.sn-radio-group.sn-invalid {
    border: 2px dashed #dc3545;
    border-radius: 6px;
    padding: 0.75rem;
    background: rgba(220, 53, 69, 0.05);
}

.sn-radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    background: var(--sn-white);
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
    /* width: 100%; */
}

.sn-radio-item:hover {
    border-color: var(--sn-boy);
    background: rgba(107, 171, 220, 0.1);
}

.sn-radio-item.selected {
    border-color: var(--sn-distant);
    background: rgba(77, 104, 176, 0.1);
    color: var(--sn-distant);
    font-weight: 600;
}

.sn-radio-item input[type="radio"] {
    display: none;
}

/* Secci?n de familia */
.sn-family-section {
    background: var(--sn-azureish);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--sn-distant);
}

.sn-family-member {
    background: var(--sn-white);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    position: relative;
    transition: all 0.3s ease;
}

.sn-family-member:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sn-family-member .remove-btn {
    z-index: 1;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--sn-secondary);
    color: var(--sn-white);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.sn-family-member .remove-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Botones del formulario */
.sn-btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sn-btn-primary {
    background: linear-gradient(135deg, var(--sn-secondary), #ff9500);
    color: var(--sn-white);
    box-shadow: 0 4px 15px rgba(243, 146, 0, 0.3);
}

.sn-btn-primary:hover {
    background: linear-gradient(135deg, #ff9500, var(--sn-secondary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 146, 0, 0.4);
    color: var(--sn-white);
}

.sn-btn-secondary {
    background: var(--sn-distant);
    color: var(--sn-white);
    box-shadow: 0 4px 15px rgba(77, 104, 176, 0.3);
}

.sn-btn-secondary:hover {
    background: #3d5a99;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 104, 176, 0.4);
    color: var(--sn-white);
}

.sn-btn-outline {
    background: transparent;
    color: var(--sn-distant);
    border: 2px solid var(--sn-distant);
}

.sn-btn-outline:hover {
    background: var(--sn-distant);
    color: var(--sn-white);
}

.sn-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--sn-white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.sn-btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: var(--sn-white);
}

/* Navegaci?n del formulario (legacy - now replaced by step navigation) */
.sn-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: var(--sn-lightgray);
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

/* Navegaci?n de pasos individuales */
.sn-step-navigation {
    padding: 1.5rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

.sn-nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Mensajes de alerta mejorados */
.sn-alert {
    padding: 1.125rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: none;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.sn-alert > i {
    flex-shrink: 0;
    margin-top: 0.15em;
}

.sn-alert .sn-alert-text {
    flex: 1;
    min-width: 0;
}

.sn-alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #0a3622;
    border-left: 4px solid #198754;
}

.sn-alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #58151c;
    border-left: 4px solid #dc3545;
}

.sn-alert-info {
    background: rgba(77, 104, 176, 0.1);
    color: #2c3e50;
    border-left: 4px solid var(--sn-distant);
}

.sn-alert-ikyta .sn-alert-text {
    letter-spacing: 0.01em;
}

@media (min-width: 768px) {
    .sn-alert-ikyta {
        max-width: 42em;
    }
}

.sn-alert-warning{
    background: rgba(255, 153, 0, 0.1);
    color: #2c3e50;
    border-left: 4px solid var(--sn-secondary);
}

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

/* Removed pulse animation for calmer experience */
.sn-loading {
    /* Static loading state, no animation */
    opacity: 0.7;
}

/* Tooltips informativos */
.sn-tooltip {
    position: relative;
    cursor: help;
    color: var(--sn-distant);
    margin-left: 0.5rem;
}

.sn-tooltip::before {
    content: '?';
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sn-boy);
    color: var(--sn-white);
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    line-height: 18px;
}

.sn-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sn-primary);
    color: var(--sn-white);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Responsividad */
@media (max-width: 768px) {
    .spiritual-names-form-container {
        margin: 0;
    }
    
    .sn-form-header {
        padding: 1.5rem;
    }
    
    .sn-form-header h1 {
        font-size: 1.5rem;
    }
    
    .sn-form-content {
        padding: 1.5rem;
    }
    
    .sn-progress-container {
        padding: 1rem;
    }
    
    .sn-progress-steps {
        margin-bottom: 0.5rem;
    }
    
    .sn-step {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .sn-step-labels {
        font-size: 0.75rem;
    }
    
    .sn-radio-group {
        gap: 1rem;
    }
    
    .sn-radio-item {
        min-width: 100px;
        flex: 1;
    }
    
    .sn-form-navigation {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .sn-nav-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .sn-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .sn-form-header h1 {
        font-size: 1.8rem;
    }
    
    .sn-form-header p {
        font-size: 1rem;
    }
    
    .sn-form-content {
        padding: 1rem;
    }
    
    .sn-step-labels {
        display: none;
    }
    
    .sn-family-member {
        padding: 1rem;
    }
    
    .sn-family-member .remove-btn {
        top: 0.5rem;
        right: 0.5rem;
        width: 28px;
        height: 28px;
    }
}

/* Estados de carga */
.sn-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(5px);
}

.sn-loading-content {
    text-align: center;
    color: var(--sn-primary);
}

.sn-loading-content .sn-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--sn-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.sn-loading-content p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.sn-loading-content p:first-of-type {
    font-size: 1.3rem;
    color: var(--sn-distant);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Validaci?n en tiempo real */
.sn-validation-message {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sn-validation-message.valid {
    color: #198754;
}

.sn-validation-message.invalid {
    color: #dc3545;
}

.sn-validation-icon {
    font-size: 0.9rem;
}

/* Accesibilidad mejorada */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states mejorados */
.sn-btn:focus,
.sn-form-group .form-control:focus,
.sn-form-group .form-select:focus {
    outline: 2px solid var(--sn-distant);
    outline-offset: 2px;
}

/* Alta contraste para mejor accesibilidad */
@media (prefers-contrast: high) {
    .sn-btn-primary {
        background: var(--sn-primary);
        border: 2px solid var(--sn-white);
    }
    
    .sn-form-group .form-control,
    .sn-form-group .form-select {
        border-width: 3px;
    }
} 

/* Animaciones adicionales para campos */
.sn-animate-success {
    animation: none !important; /* Removed success pulse animation */
}

.sn-animate-error {
    animation: errorShake 0.6s ease;
}

.sn-animate-selection {
    animation: none !important; /* Removed selection bounce animation */
}

/* Simplified animations - only subtle error feedback */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Removed successPulse and selectionBounce for calmer experience */

/* Progreso de pasos individuales */
.sn-step-progress {
    margin-left: auto;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--sn-gray);
}

.sn-step-progress-bar {
    width: 100px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.sn-step-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sn-boy), var(--sn-distant));
    border-radius: 2px;
    transition: width 0.6s ease;
}

.sn-step-progress-text {
    font-weight: 500;
    white-space: nowrap;
}

/* Estados activos de campos */
.sn-field-active label {
    color: var(--sn-distant);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Notificaciones del sistema */
.sn-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--sn-white);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s ease;
    border-left: 4px solid;
}

.sn-notification-show {
    transform: translateX(0);
    opacity: 1;
}

.sn-notification-success {
    border-left-color: #198754;
    color: #0a3622;
}

.sn-notification-error {
    border-left-color: #dc3545;
    color: #58151c;
}

.sn-notification-warning {
    border-left-color: #ffc107;
    color: #664d03;
}

.sn-notification-info {
    border-left-color: var(--sn-distant);
    color: #2c3e50;
}

.sn-notification i {
    font-size: 1.1rem;
}

.sn-notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: auto;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.sn-notification-close:hover {
    opacity: 1;
}

/* Loader de env?o mejorado - igual al de destiny cards */

/* Estados de transici?n de pasos mejorados */
.sn-form-section {
    transition: none;
    opacity: 1;
    transform: none;
}

.sn-form-section:not(.active) {
    display: none;
}

/* Mejoras en campos de loading */
.sn-loading {
    position: relative;
    pointer-events: none;
}

.sn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--sn-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translateY(-50%);
}

/* Mejoras en tooltips */
.sn-tooltip:hover::after {
    animation: fadeInUp 0.3s ease;
}

/* Estados mejorados para radio buttons */
.sn-radio-item {
    position: relative;
    overflow: hidden;
}

.sn-radio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.sn-radio-item:hover::before {
    left: 100%;
}

.sn-radio-item.selected {
    box-shadow: 0 4px 15px rgba(77, 104, 176, 0.2);
}

/* Efectos de focus mejorados */
.sn-form-group .form-control:focus,
.sn-form-group .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(77, 104, 176, 0.15), 0 5px 15px rgba(77, 104, 176, 0.1);
}

/* Animaciones de entrada para secciones */
.sn-family-section,
#teacherFields,
#otherSourceWrapper {
    transition: all 0.3s ease;
}

/* Mejoras en la navegaci?n de pasos */
.sn-step {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sn-step.active {
    box-shadow: 0 4px 15px rgba(243, 146, 0, 0.3);
}

.sn-step.completed {
    box-shadow: 0 4px 15px rgba(77, 104, 176, 0.3);
}

/* Indicadores de progreso de barra mejorados */
.sn-progress-bar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mejoras en miembros de familia */
.sn-family-member {
    transition: all 0.3s ease;
    overflow: hidden;
}

.sn-family-member .remove-btn {
    transition: all 0.3s ease;
    transform: scale(0.9);
}

.sn-family-member:hover .remove-btn {
    transform: scale(1);
}

/* Estados de validaci?n mejorados */
.sn-form-group .form-control.is-valid {
    border-color: #198754;
    background-color: rgba(25, 135, 84, 0.05);
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.1);
}

.sn-form-group .form-control.is-invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.1);
}

/* Animaciones de entrada del formulario */
.spiritual-names-form-container {
    transition: all 0.5s ease;
}

/* Mejoras para dispositivos m?viles */
@media (max-width: 768px) {
    .sn-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .sn-notification-show {
        transform: translateY(0);
    }
    
    .sn-step-progress {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .sn-step-progress-bar {
        width: 100%;
    }
    
    .sn-family-member .remove-btn {
        transform: scale(1);
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .sn-animate-success,
    .sn-animate-error,
    .sn-animate-selection,
    .sn-form-section,
    .sn-notification,
    .spiritual-names-form-container,
    .sn-family-member,
    .sn-step,
    .sn-progress-bar,
    .sn-form-group .form-control,
    .sn-form-group .form-select {
        animation: none !important;
        transition: none !important;
    }
    
    .sn-spinner {
        animation: none !important;
    }
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    .sn-notification {
        border: 2px solid;
        box-shadow: none;
    }
    
    .sn-form-group .form-control:focus,
    .sn-form-group .form-select:focus {
        outline: 3px solid var(--sn-distant);
        outline-offset: 2px;
        box-shadow: none;
    }
    
    .sn-radio-item.selected {
        border-width: 3px;
        box-shadow: none;
    }
}

/* Estados de impresi?n */
@media print {
    .sn-form-header,
    .sn-progress-container,
    .sn-form-navigation,
    .sn-notification,
    .sn-loading-overlay {
        display: none !important;
    }
    
    .sn-form-section {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .sn-family-member {
        page-break-inside: avoid;
        border: 1px solid #000 !important;
        margin-bottom: 1rem !important;
    }
} 

/* Match select height and style to inputs */
.sn-form-group .form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23707070'%3E%3Cpath d='M3.2 5.5l4.8 4.8 4.8-4.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 16px 16px;
}

/* Ensure consistent focus state between input and select */
.sn-form-group .form-select:focus {
  border-color: var(--sn-distant);
  box-shadow: 0 0 0 0.25rem rgba(77, 104, 176, 0.15);
  background-color: var(--sn-white);
  transform: translateY(-1px);
}

/* Normalize webkit appearance already applied above */

/* Modal for incomplete request */
.sn-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.sn-modal-content {
    background: var(--sn-white);
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.sn-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--sn-lightgray);
    background: linear-gradient(135deg, var(--sn-distant) 0%, var(--sn-boy) 100%);
    color: var(--sn-white);
    border-radius: 6px 6px 0 0;
}

.sn-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sn-white) !important;
}

.sn-modal-header h3 i {
    font-size: 1.5rem;
    color: var(--sn-white) !important;
}

.sn-modal-body {
    padding: 1.5rem;
}

.sn-modal-body p {
    margin: 0 0 1rem 0;
    color: var(--sn-gray);
    line-height: 1.6;
}

.sn-modal-body p:last-child {
    margin-bottom: 0;
}

.sn-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--sn-lightgray);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.sn-modal-footer .sn-btn {
    min-width: 140px;
}

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

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