/* REGISTER WIDGET - Estilos modernos */
.formulario-registro {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Efecto de partículas de fondo */
.form-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: float 20s infinite linear;
    z-index: 0;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(360deg); }
}

.form-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: white;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group input,
.form-group select {
    color: white;
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group select:focus {
    color: black;
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #a0aec0;
}

/* Estilos para el select de suscripción */
.select-rol {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ESTILOS PARA CAMPO DE TELÉFONO Y CÓDIGO DE PAÍS */
.phone-field {
    margin-bottom: 1.8rem;
}

.phone-field label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: white;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.optional-field {
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    font-size: 0.9em;
    margin-left: 0.5rem;
    font-style: italic;
}

.phone-input-group {
    display: flex;
    gap: 10px;
    position: relative;
}

.country-code-container,
.phone-number-container {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Estilos para el select de código de país */
.select-pais-codigo {
    width: 100%;
    padding: 1rem 1.2rem;
    padding-right: 3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
}

.select-pais-codigo:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 1);
}

.select-pais-codigo:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Input de número de teléfono */
.input-telefono {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.input-telefono::placeholder {
    color: #a0aec0;
}

.input-telefono:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 1);
}

.input-telefono:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    color: #2d3748;
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Texto de ayuda */
.helper-text {
    display: block;
    width: 100%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
    margin-top: 0.5rem;
    font-style: italic;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Estilos para la validación condicional */
.select-pais-codigo.required-highlight {
    border-color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.1) !important;
    box-shadow: 
        0 0 0 3px rgba(251, 191, 36, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.1) !important;
    animation: pulseHighlight 2s infinite;
}

@keyframes pulseHighlight {
    0%, 100% {
        border-color: #fbbf24;
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    }
    50% {
        border-color: #f59e0b;
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
    }
}

/* Estilos para errores */
.select-pais-codigo.error,
.input-telefono.error {
    border-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.05) !important;
    box-shadow: 
        0 0 0 3px rgba(220, 53, 69, 0.15),
        0 4px 15px rgba(0, 0, 0, 0.1) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Mensajes de error específicos para teléfono */
.phone-field .field-error {
    position: absolute;
    bottom: -22px;
    left: 0;
    color: #dc3545;
    font-size: 0.85em;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    z-index: 10;
    white-space: nowrap;
}

/* Estilos para los optgroups en el select */
.select-pais-codigo optgroup {
    font-weight: 600;
    color: #667eea;
    background: rgba(255, 255, 255, 0.95);
}

.select-pais-codigo option {
    padding: 8px 12px;
    background: white;
    color: #2d3748;
}

.select-pais-codigo option:hover,
.select-pais-codigo option:focus {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Estados de interacción */
.input-telefono:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.8);
}

.select-pais-codigo:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.8);
}

/* Indicador de campo activo */
.phone-field.active .input-telefono,
.phone-field.active .select-pais-codigo {
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
}

/* Indicador visual cuando el teléfono tiene contenido */
.input-telefono.filled {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos específicos para el captcha */
.captcha-group {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.imagen-captcha {
    max-width: 200px;
    height: auto;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    margin: 0.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.captcha-piezas {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    text-align: left;
}

.pieza-rotacion {
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.pieza-rotacion label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

.pieza-rotacion select {
    width: 140px;
    margin-left: 0.5rem;
    padding: 0.6rem;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    background: white;
}

/* Botones modernizados */
.btn-submit {
    color: white;
    border: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    padding: 1rem 2rem;
    text-shadow: -1px -1px 1px rgba(255, 255, 255, 0.3);
    overflow: hidden;
    outline: none;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(0);
}

/* Botón Anterior */
.btn-submit.anterior {
    background-color: #6c757d;
    box-shadow: 
        0 4px 0 #4a5568,
        0 6px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-submit.anterior:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 #4a5568,
        0 8px 15px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Botón Siguiente */
.btn-submit.siguiente {
    background-color: #30a130;
    box-shadow:
        0 4px 0 #2d7a30,
        0 6px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-submit.siguiente:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #2d7a30,
        0 8px 15px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Contenedor para los botones */
.botones-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.botones-container.espaciado {
    justify-content: space-between;
}

/* Progress Bar Modernizado */
.progressbar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.progressbar-step-1,
.progressbar-step-2,
.progressbar-step-3,
.progressbar-step-4,
.progressbar-step-5,
.progressbar-step-6 {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.6s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.progressbar-step-1 { width: 3%; }
.progressbar-step-2 { width: 27%; }
.progressbar-step-3 { width: 50%; }
.progressbar-step-4 { width: 74%; }
.progressbar-step-5 { width: 80%; }
.progressbar-step-6 { width: 100%; }

/* Step Indicators Modernizados */
.step-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #667eea;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.step-indicator.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.step-indicator.completed {
    background: #48bb78;
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
}

/* Línea conectadora entre indicadores */
.step-indicators::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 2px;
}

/* Notification Widget Modernizado */
.stepper-register-widget {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.3));
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
}

.stepper-register-widget p {
    margin: 0.5rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stepper-register-widget hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 1rem 0;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeInUp 0.5s ease-out;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

.btn-submit:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .formulario-registro {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .botones-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-submit {
        width: 100%;
        min-width: auto;
    }
    
    .captcha-piezas {
        text-align: center;
    }
    
    .step-indicator {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem 1rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.8rem 1rem;
    }
    
    .stepper-register-widget {
        padding: 1rem;
        margin: 1rem auto;
    }
}

/* Estilos para validación */
.form-group input.error,
.form-group select.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.step-validation-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilos para validación */

.form-group input.error,
.form-group select.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.step-validation-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modo oscuro opcional */
@media (prefers-color-scheme: dark) {
    .form-container {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    .form-group input,
    .form-group select {
        background: rgba(45, 55, 72, 0.95);
        color: white;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .form-group input::placeholder {
        color: #a0aec0;
    }
    
    .captcha-group {
        background: rgba(45, 55, 72, 0.95);
    }
    
    .pieza-rotacion label {
        color: #e2e8f0;
    }
    
    .select-pais-codigo,
    .input-telefono {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .select-pais-codigo:hover,
    .input-telefono:hover {
        background: rgba(55, 65, 82, 0.95);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .select-pais-codigo:focus,
    .input-telefono:focus {
        background: rgba(65, 75, 92, 0.95);
        border-color: rgba(255, 255, 255, 0.3);
        color: #f7fafc;
    }
    
    .select-pais-codigo::placeholder,
    .input-telefono::placeholder {
        color: #a0aec0;
    }
    
    .select-pais-codigo option {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .select-pais-codigo option:hover,
    .select-pais-codigo option:focus {
        background: linear-gradient(135deg, #4a5568, #2d3748);
        color: white;
    }
    
    .select-pais-codigo.required-highlight {
        border-color: #f59e0b !important;
        background: rgba(245, 158, 11, 0.15) !important;
    }
    
    .input-telefono.filled {
        background: rgba(55, 65, 82, 0.95);
        border-color: rgba(102, 126, 234, 0.4);
    }
    
    .phone-field label {
        color: #e2e8f0;
    }
    
    .optional-field {
        color: rgba(226, 232, 240, 0.7);
    }
    
    .helper-text {
        color: rgba(226, 232, 240, 0.8);
    }
}