/* ============================================
   WIZARD REGISTRO LOHMIA - CSS PRODUCCIÓN
   Versión: 2.0.0 Optimizada
   Fecha: 2025-10-15
   ============================================ */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --primary: #00BCD4;
    --primary-hover: #00ACC1;
    --primary-light: #E0F7FA;

/* ============================================
   FIX CRÍTICO: WIZARD COMPLETAMENTE FIJO
   ============================================ */

html {
    overflow: hidden !important;
    height: auto !important;
    width: 100vw;
}

.wizard-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden !important;
}

.wizard-container {
    overflow: hidden;
    position: relative;
}

.wizard-body {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
    --success: #4CAF50;
    --error: #ff4757;
    --border: #e0e0e0;
    --bg-light: #f5f5f5;
    --bg-gray: #f8f9fa;
    --text: #333;
    --text-light: #666;
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto !important;
    padding: 20px;
    overflow-x: hidden;
}

/* ============================================
   MODAL Y CONTAINER
   ============================================ */
.wizard-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.wizard-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 720px !important;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   HEADER
   ============================================ */
.wizard-header {
    flex-shrink: 0;
    padding: 28px 32px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.wizard-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
}

.wizard-subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* ============================================
   PROGRESS STEPPER
   ============================================ */
.wizard-progress {
    padding-bottom: 8px !important;
    flex-shrink: 0;
    padding: 24px 32px 0px 32px;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 5px;
    background: #E5E7EB;
    z-index: 1;
    border-radius: 2px;
}

.progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.4);
    width: 0%;
    border-radius: 2px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.progress-step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.98);
    border: 4px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #9CA3AF;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.completed .progress-step-circle {
    position: relative;
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-size: 0;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
    transform: scale(1.05);
}

.progress-step.completed .progress-step-circle::after {
    content: "✓";
    position: absolute;
    font-size: 22px;
    font-weight: 900;
    color: white;
    animation: checkmarkPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.progress-step.active .progress-step-circle {
    border-color: var(--primary);
    color: var(--primary);
    border-width: 3px;
    box-shadow: 0 4px 16px rgba(0, 188, 212, 0.3), 0 0 0 4px rgba(0, 188, 212, 0.15);
    transform: scale(1.1);
    animation: pulseStepper 2s infinite;
}

.progress-step-label {
    font-size: 13px;
    color: #9CA3AF;
    font-weight: 600;
    transition: color 0.3s ease;
}

.progress-step.active .progress-step-label {
    color: var(--primary);
    font-weight: 700;
}

.progress-step.completed .progress-step-label {
    color: var(--text);
}

/* ============================================
   WIZARD BODY
   ============================================ */
.wizard-body {
/* DESACTIVADO:     flex: 0 0 auto;  */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    margin-top: 20px;
    min-height: 0;
    /* DESACTIVADO:     display: flex; */
    /* DESACTIVADO:     flex-direction: column; */
}

.wizard-body::-webkit-scrollbar {
    width: 6px;
}

.wizard-body::-webkit-scrollbar-track {
    background: transparent;
}

.wizard-body::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.25);
    border-radius: 10px;
}

.wizard-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.4);
}

/* ============================================
   WIZARD STEPS
   ============================================ */
.wizard-step {
    display: none;
    opacity: 0;
    padding: 0px 32px 16px 32px;
    transition: opacity 0.3s ease;
}

.wizard-step.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* ============================================
   INPUTS Y FORMULARIOS
   ============================================ */
.wizard-input-group {
    margin-bottom: 18px;
}

.wizard-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    letter-spacing: 0.1px;
}

.wizard-label[data-icon]::before {
    margin-right: 6px;
    font-size: 16px;
}

.wizard-label[data-icon="user"]::before { content: "👤"; }
.wizard-label[data-icon="email"]::before { content: "📧"; }
.wizard-label[data-icon="lock"]::before { content: "🔒"; }
.wizard-label[data-icon="person"]::before { content: "👨‍💼"; }
.wizard-label[data-icon="phone"]::before { content: "📞"; }
.wizard-label[data-icon="country"]::before { content: "🌍"; }
.wizard-label[data-icon="comunidad"]::before { content: "🏛️"; }
.wizard-label[data-icon="state"]::before { content: "📍"; }
.wizard-label[data-icon="city"]::before { content: "🏘️"; }

.wizard-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    background: rgba(255, 255, 255, 0.98);
}

.wizard-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.wizard-input:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.wizard-input::placeholder {
    color: #9CA3AF;
}

/* Selects nativos */
select.wizard-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23333' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* ============================================
   PASSWORD TOGGLE
   ============================================ */
.password-wrapper {
    position: relative;
}

.password-wrapper .wizard-input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #00FFFF;
    background: rgba(0, 188, 212, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-textfield-decoration-container {
    display: none;
}

/* ============================================
   USER TYPE CARDS
   ============================================ */
.user-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    padding-top: 25px;
    gap: 24px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.user-type-card {
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    z-index: 1;
    padding: 40px 28px 32px;
    border: 3px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), border 0.2s ease, outline 0.2s ease;
    background: #ffffff;
    min-height: 260px;
    max-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: auto;
}

.user-type-card * {
    pointer-events: none;
}

.user-type-card:hover {

    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 188, 212, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
}


.user-type-icon {
    font-size: 68px;
    margin-top: 8px;
    min-height: 80px;
    max-height: 80px;
    height: 80px;
    width: 80px;
    line-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.user-type-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 18px;
}

.user-type-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* ============================================
   PHONE PREFIX
   ============================================ */
.phone-group {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
}

/* ============================================
   SELECT2 STYLING
   ============================================ */
.select2-container,
.select2-container *,
.select2-selection,
.select2-selection__rendered,
.select2-selection__arrow {
    pointer-events: auto;
}

.select2-container--default .select2-selection--single {
    height: 46px;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 4px 12px;
}

.select2-container--default .select2-selection--single:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    padding-left: 0;
}

.select2-container--open .select2-dropdown {
    z-index: 99999;
    border: 2px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.select2-results__options {
    max-height: 250px;
    overflow-y: auto;
}

.select2-results__option {
    padding: 10px 12px;
    font-size: 15px;
}

.select2-container--default .select2-results__option--highlighted {
    background-color: var(--primary-light);
    color: var(--text);
}

.select2-selection__rendered img,
.select2-results__option img {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    vertical-align: middle;
}

/* ============================================
   VALIDACIÓN INLINE
   ============================================ */
.inline-error,
.inline-success {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

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

.inline-error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    color: #dc2626;
}

.inline-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #10b981;
    color: #059669;
}

.input-error {
    border-color: #ef4444;
}

.input-success {
    border-color: #10b981;
}

.input-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.input-success:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* ============================================
   FOOTER BUTTONS
   ============================================ */
.wizard-footer-buttons {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px 32px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.wizard-btn {
    padding: 13px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.wizard-btn-secondary {
    background: #ffffff;
    color: #4b5563;
    border: 2px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.wizard-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.wizard-btn-secondary:active {
    transform: translateY(0);
}

.wizard-btn-next {
    background: linear-gradient(135deg, #00E5FF 0%, #00BCD4 50%, #00A8B8 100%);
    color: #ffffff;
    border: none;
    padding: 15px 42px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35), 0 2px 8px rgba(0, 184, 212, 0.2);
    position: relative;
    overflow: hidden;
    animation: pulse-siguiente 3s ease-in-out infinite;
}

.wizard-btn-next::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 100%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.wizard-btn-next:hover {
    background: linear-gradient(135deg, #00F0FF 0%, #00C8E0 50%, #00A8B8 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 229, 255, 0.45), 0 4px 12px rgba(0, 184, 212, 0.3);
    animation: none;
}

.wizard-btn-next:hover::before {
    left: 200%;
}

.wizard-btn-next:active {
    transform: translateY(-1px) scale(0.99);
}

.wizard-btn-next:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35), 0 0 0 4px rgba(0, 229, 255, 0.15);
}

@keyframes pulse-siguiente {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35), 0 2px 8px rgba(0, 184, 212, 0.2);
    }
    50% {
        box-shadow: 0 6px 24px rgba(0, 229, 255, 0.45), 0 2px 10px rgba(0, 184, 212, 0.3);
    }
}

.wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   FOOTER LINKS
   ============================================ */
.wizard-footer-links {
    padding: 35px 0 12px 0;
    border-top: none;
    background: transparent;
    width: 100%;
    margin-top: 50px;
    display: grid;
    place-items: center;
    grid-template-columns: 1fr;
}

.wizard-footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    display: inline;
    position: relative;
    transition: opacity 0.2s ease;
}

.wizard-footer-links a:hover {
    opacity: 0.7;
}

.wizard-footer-links span {
    color: #ccc;
    margin: 0 15px;
    font-size: 13px;
    display: inline;
}

/* ============================================
   NOTIFICACIÓN
   ============================================ */
.notification-overlay {
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.notification-overlay.show {
    opacity: 1;
    display: block;
}

#notification {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #00FFFF 0%, #00A8E8 100%);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    display: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#notification.show {
    opacity: 1;
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

.notification-content {
    text-align: center;
    color: white;
}

.notification-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {

/* Responsive Notificación Móvil */
@media (max-width: 768px) {
    .notification {
        top: 80px !important;
        transform: translate(-50%, 0) scale(0.9) !important;
        width: 90vw !important;
        max-width: 90vw !important;
        padding: 20px !important;
    }

    .notification.show {
        transform: translate(-50%, 0) scale(1) !important;
    }

    .notification-icon {
        font-size: 48px !important;
    }

    .notification-title {
        font-size: 18px !important;
    }

    .notification-message {
        font-size: 14px !important;
    }
}
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.notification-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.notification-message {
    font-size: 16px;
    opacity: 0.95;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .wizard-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 0;
    }

    .wizard-container {
        max-width: 100%;
        max-height: none;
        border-radius: 0;
    }

    .wizard-header {
        padding: 20px;
    }

    .wizard-title {
        font-size: 20px;
    }

    .wizard-progress {
    padding-bottom: 8px !important;
        padding: 20px;
    }

    .progress-step-circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .progress-step-label {
        font-size: 11px;
    }

    .wizard-body {
        padding: 0;
    }

    .wizard-step {
        padding: 20px;
    }

    .user-type-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .user-type-card {
    box-sizing: border-box;
    overflow: visible;
        min-height: 180px;
        max-height: 180px;
    }

    .user-type-icon {
        font-size: 52px;
    margin-top: 8px;
        height: 64px;
        width: 64px;
        min-height: 64px;
        max-height: 64px;
        line-height: 64px;
    }

    .phone-group {
        grid-template-columns: 1fr;
    }

    .wizard-footer-buttons {
        padding: 16px 20px;
        gap: 12px;
    }

    .wizard-btn {
        min-width: 120px;
        padding: 12px 20px;
        font-size: 14px;
    margin-top: 8px;
    }

    .wizard-btn-next {
        padding: 12px 28px;
    }

    .wizard-footer-links {
        padding: 15px 0 12px 0;
    }

    .wizard-footer-links a {
        font-size: 12px;
    margin-top: 8px;
    }
}

@media (max-width: 400px) {
    .wizard-footer-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .wizard-btn {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE - DESKTOP
   ============================================ */
@media (min-width: 768px) {
    .wizard-progress {
    padding-bottom: 8px !important;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 30px 40px;
    }

    .progress-steps {
        max-width: 480px;
        width: 100%;
    }
}

/* ============================================
   FIN DEL CSS
   ============================================ */

/* ═══════════════════════════════════════════════════════════════
   SOLUCIÓN 2: Iconos ✓ ✗ dentro de inputs
   ═══════════════════════════════════════════════════════════════ */

/* Input-group con position relative para iconos absolutos */
.wizard-input-group {
    position: relative !important;
    margin-bottom: 20px !important;
}

/* Padding-right en inputs para dejar espacio al icono */
.wizard-input {
    padding-right: 45px !important;
}

/* Contenedor de icono de validación */
.validation-icon {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 20px !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

/* Mostrar icono cuando está activo */
.validation-icon.show {
    opacity: 1 !important;
}

/* Icono válido (verde) */
.validation-icon.valid {
    color: #4CAF50 !important;
}

/* Icono inválido (rojo) */
.validation-icon.invalid {
    color: #ff4757 !important;
}

/* Borde del input según validación */
.wizard-input.is-valid {
    border-color: #4CAF50 !important;
}

.wizard-input.is-invalid {
    border-color: #ff4757 !important;
}

/* Ocultar textos de ayuda pequeños si existen */
.wizard-input-group small {
    font-size: 11px !important;
    color: #999 !important;
    margin-top: 4px !important;
}

/* Ocultar mensajes inline-error e inline-success */
.inline-error,
.inline-success {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   FIX: Solo 1 scroll en wizard-body
   ═══════════════════════════════════════════════════════════════ */

/* Inputs y selects SIN scroll propio */
.wizard-input,
select.wizard-input,
input.wizard-input {
    overflow: hidden !important;
    overflow-y: hidden !important;
}

/* Input-groups sin scroll */
.wizard-input-group {
    overflow: visible !important;
}

/* Select2 sin overflow propio */
.select2-container,
.select2-selection {
    overflow: visible !important;
}

/* Solo wizard-body tiene scroll */
.wizard-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════
   OPTIMIZACIÓN SELECT2 PARA MÓVIL
   ═══════════════════════════════════════════════════════════════ */

/* Dropdown con altura máxima adaptativa */
.select2-results__options {
    max-height: 40vh !important;
    overflow-y: auto !important;
}

/* Móvil: 5-6 resultados visibles */
@media (max-width: 768px) {
    .select2-results__options {
        max-height: 35vh !important;
    }
    
    .select2-results__option {
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    
    .select2-search--dropdown .select2-search__field {
        font-size: 16px !important;
        padding: 12px !important;
    }
}

/* ============================================
   FIX SELECT2 DROPDOWN WIDTH
   ============================================ */
.select2-container {
    width: 100% !important;
}

.select2-dropdown {
    min-width: 300px !important;
    width: auto !important;
}

.select2-container--open .select2-dropdown {
    min-width: 300px !important;
    width: 100% !important;
}

span.select2-selection {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    width: 100% !important;
}

/* ============================================
   SELECT2 DROPDOWN FIX FINAL
   ============================================ */

/* Dropdown principal */
.select2-dropdown {
    position: absolute !important;
    width: 390px !important;
    max-width: 390px !important;
    border: 3px solid #00BCD4 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    margin-top: 4px !important;
    background: white !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Contenedor de búsqueda */
.select2-search--dropdown {
    padding: 10px !important;
    background: white !important;
    border: none !important;
}

/* Campo de búsqueda */
.select2-search__field {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    border: 3px solid #00BCD4 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
}

.select2-search__field:focus {
    outline: none !important;
    border-color: #00BCD4 !important;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1) !important;
}

/* Ocultar primera opción si es placeholder */
.select2-results__option:first-child[role="option"]:not([aria-selected]) {
    display: none !important;
}

/* Quitar resaltado azul del item seleccionado */
.select2-results__option--highlighted {
    background-color: #E0F7FA !important;
    color: #333 !important;
}

.select2-results__option[aria-selected="true"] {
    background-color: #f5f5f5 !important;
    color: #333 !important;
}

/* Hover suave */
.select2-results__option:hover {
    background-color: #E0F7FA !important;
}

/* Resultados */
.select2-results {
    max-height: 300px !important;
    overflow-y: auto !important;
    padding: 4px !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    cursor: pointer !important;
}

/* Responsive móvil */
@media (max-width: 600px) {
    .select2-dropdown {
        width: calc(100vw - 60px) !important;
        max-width: calc(100vw - 60px) !important;
    }
}

/* Eliminar línea gris entre opciones */
.select2-results__option {
    border: none !important;
    border-bottom: none !important;
}

.select2-results__option[aria-selected="true"] {
    background-color: transparent !important;
    border: none !important;
}

/* Suavizar transición hover */
.select2-results__option {
    transition: background-color 0.2s ease !important;
}

/* ============================================
/* Reducir padding superior del paso 4 */
#step-4 {
    padding-top: 5px !important;
}

/* Asegurar que wizard-body no tenga altura mínima forzada */
.wizard-body {
    min-height: auto !important;
}

/* En móvil, reducir aún más */
@media (max-width: 600px) {
    #step-4 {
        padding: 10px 16px !important;
    }
    
    .wizard-step {
        padding: 10px 16px !important;
    }
}

/* ═══════════════════════════════════════════════
   FIX MINIMALISTA - Solo reducir espacio Paso 4
   ═══════════════════════════════════════════════ */

/* Reducir padding del contenedor principal */
.wizard-container {
    padding: 20px !important;
}

/* Ajustar wizard-body para no expandirse innecesariamente */
.wizard-body {
}

/* Reducir padding superior de todos los pasos */
.wizard-step {
    padding-top: 0px !important;
    padding-bottom: 5px !important;
}

/* Responsive: Reducir aún más en móvil */
@media (max-width: 600px) {
    .wizard-container {
        padding: 12px !important;
    }
    
    .wizard-step {
        padding: 8px 16px !important;
    }
}
/* ═══════════════════════════════════════════════════════════════
   LAYOUT DEFINITIVO - Footer a misma altura en todos los pasos
   ═══════════════════════════════════════════════════════════════ */

/* Container principal con flexbox vertical */
.wizard-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    max-width: 720px !important;
    min-height: auto;
    max-height: none;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    position: relative;
}

/* Header: Fijo arriba */
.wizard-header {
    flex: 0 0 auto;
    padding: 20px 32px;
    border-bottom: 1px solid rgba(0, 188, 212, 0.15);
}

/* Body: Crece y tiene scroll */
.wizard-body {
    flex: 0 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 32px;
    margin-top: 20px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar personalizado */
.wizard-body::-webkit-scrollbar {
    width: 6px;
}

.wizard-body::-webkit-scrollbar-thumb {
    background: rgba(0, 188, 212, 0.3);
    border-radius: 10px;
}

/* Pasos */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

/* Footer: Fijo abajo - FUERA de wizard-body */
.wizard-footer-buttons {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 32px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 1px solid rgba(0, 188, 212, 0.15);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

/* Links del footer */
.wizard-footer-links {
    flex: 0 0 auto;
    position: relative;
    padding: 0.75rem 1rem;
    text-align: center;
}

/* Responsive móvil */
@media (max-width: 768px) {
    .wizard-container {
        min-height: auto;
        max-height: none;
        border-radius: 0;
    }
    
    .wizard-header {
        padding: 28px 24px 24px;
    }
    
    .wizard-body {
        padding: 20px;
    }
    
    .wizard-footer-buttons {
        padding: 15px 20px;
        flex-direction: row;
    }
}

/* ══════════════════════════════════════════════════════════════ */
/* OCULTAR FOOTER LINKS EN PASOS 2, 3, 4                           */
/* ══════════════════════════════════════════════════════════════ */

#step-2.active ~ .wizard-footer-links,
#step-3.active ~ .wizard-footer-links,
#step-4.active ~ .wizard-footer-links {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* REDUCIR ESPACIO ENTRE STEPPER Y CONTENIDO                       */
/* ══════════════════════════════════════════════════════════════ */

.wizard-body {
    padding-top: 0px !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* FIX AGRESIVO: ELIMINAR ESPACIO ENTRE STEPPER Y CONTENIDO       */
/* ══════════════════════════════════════════════════════════════ */

.wizard-progress {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.wizard-body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wizard-step {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wizard-step h2:first-child {
    margin-top: 0 !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* FIX POSICIONAMIENTO: Steps deben estar en la parte superior    */
/* ══════════════════════════════════════════════════════════════ */

.wizard-step {
    position: relative !important;
    top: 0 !important;
}

.wizard-step.active {
    position: relative !important;
    top: 0 !important;
}

@keyframes pulseStepper {
    0%, 100% { 
        box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(0, 188, 212, 0.2);
    }
}

@keyframes checkmarkPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.user-type-card:hover .user-type-icon,

.wizard-btn-next.loading,
.wizard-btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.wizard-btn-next.loading::after,
.wizard-btn-submit.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-8deg); }
    75% { transform: scale(1.15) rotate(8deg); }
}

.notification-icon {
    animation: celebrate 0.8s ease-out;
}

.user-type-card::before {
    border-radius: 16px;
    content: '';
    position: absolute;
    inset: 0;
    padding: 4px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.03) 0%, rgba(0, 188, 212, 0.06) 100%);
    opacity: 0;
    border-radius: 16px;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.user-type-card:hover::before {
    opacity: 1;
}

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

.wizard-step.active {
    animation: fadeInSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.progress-line-fill {
    background: linear-gradient(
        90deg,
        #00E5FF 0%,
        #00BCD4 25%,
        #00FFFF 50%,
        #00BCD4 75%,
        #0097A7 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.wizard-label,
.terms-checkbox label {
    cursor: default;
}

    z-index: 1;
}

.user-type-card::before {
    border-radius: 16px;
    z-index: 0;
}

.user-type-card > * {
    position: relative;
    z-index: 2;
}

/* ============================================
   CARD SELECCIONADA - BORDE AZUL COMPLETO
   ============================================ */
.user-type-card.selected {
    border: 4px solid #00BCD4 !important;
    border-color: #00BCD4 !important;
    outline: 3px solid rgba(0, 188, 212, 0.4) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 8px rgba(0, 188, 212, 0.12), 
                0 12px 32px rgba(0, 188, 212, 0.32), 
                0 4px 16px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-4px) !important;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, rgba(0, 188, 212, 0.08) 100%) !important;
    z-index: 100 !important;
    position: relative !important;
}

.user-type-card.selected .user-type-icon {
    transform: scale(1.12) !important;
    filter: brightness(1.15) !important;
}

.user-type-card.selected .user-type-title {
    color: #00BCD4 !important;
    font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL RESPONSIVE - Adaptación móvil/web
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .wizard-modal {
        padding: 10px !important;
    }
    
    .wizard-container {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 0 auto !important;
        max-height: 95vh !important;
    }
    
    .success-modal-overlay {
        padding: 10px !important;
    }
    
    .success-modal-content {
        width: 90vw !important;
        max-width: 90vw !important;
        padding: 20px !important;
        margin: 0 auto !important;
    }
    
    .success-modal-icon {
        font-size: 48px !important;
    }
    
    .success-modal-title {
        font-size: 20px !important;
    }
    
        max-width: 90vw !important;
        padding: 15px !important;
        font-size: 14px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .wizard-container {
        width: 85vw !important;
        max-width: 700px !important;
    }
    
    .success-modal-content {
        width: 80vw !important;
        max-width: 500px !important;
    }
}

@media (min-width: 1025px) {
    .wizard-container {
        width: 600px !important;
    }
    
    .success-modal-content {
        width: 450px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   POPUP DE VALIDACIÓN (wizard-alert)
   ═══════════════════════════════════════════════════════════════ */
.wizard-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: white;
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    min-width: 320px;
    max-width: 500px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.wizard-alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.wizard-alert-error {
    border-left: 4px solid var(--lohmia-error, #ff4757);
}

.wizard-alert-success {
    border-left: 4px solid var(--lohmia-success, #4CAF50);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-icon {
    font-size: 20px;
    line-height: 1;
}

.alert-message {
    color: var(--text-primary, #333);
    font-size: 15px;
    line-height: 1.4;
    flex: 1;
}

/* Responsive Móvil */
@media (max-width: 768px) {
    .wizard-alert {
        min-width: 260px !important;
        max-width: 75vw !important;
        padding: 10px 14px !important;
        top: 70px !important;
        font-size: 13px !important;
    }

    .alert-message {
        font-size: 13px;
    }

    .alert-icon {
        font-size: 18px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   REQUISITOS DE CONTRASEÑA
   ═══════════════════════════════════════════════════════════════ */
.password-requirements {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.req-icon {
    font-size: 16px;
    font-weight: bold;
    min-width: 20px;
}

.req-text {
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .password-requirements {
        padding: 10px !important;
        font-size: 12px !important;
    }
    
    .req-text {
        font-size: 12px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   POPUP MÓVIL COMPACTO
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .notification {
        width: 65vw !important;
        max-width: 280px !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
    }
    
    .notification-title {
        font-size: 16px !important;
    }
    
    .notification-message {
        font-size: 12px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   POPUP MÓVIL COMPACTO - Usando ID para máxima especificidad
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    #notification {
        width: 65vw !important;
        max-width: 280px !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
        top: 80px !important;
        left: 50% !important;
        transform: translate(-50%, 0) !important;
    }
    
    #notification .notification-title {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }
    
    #notification .notification-message {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    
    #notification .notification-icon {
        font-size: 32px !important;
    }
}
