/* Estilos Ultra-Modernos Glassmorphism para AE Smart Forms */
.ae-smart-form-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 45px rgba(14, 57, 80, 0.08);
    border-radius: 20px;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    position: relative;
    overflow: hidden;
}

.ae-smart-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #0E3950 0%, #ECAD20 100%);
}

/* Estilos para el Modal Popup Global */
.ae-smart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: ae-modal-fade 0.3s ease-out;
}

@keyframes ae-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ae-smart-modal-box {
    background: transparent;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    position: relative;
    animation: ae-modal-scale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    border-radius: 20px;
}

@keyframes ae-modal-scale {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.ae-smart-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #0E3950;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.ae-smart-modal-close:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    transform: rotate(90deg);
}

.ae-smart-modal-box .ae-smart-form-container {
    margin: 0;
}

.ae-sf-header {
    text-align: center;
    margin-bottom: 35px;
}

/* Tracker de Pasos / Wizard Navigation */
.ae-sf-wizard-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
    padding: 0 10px;
}

.ae-sf-tracker-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.ae-sf-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #64748b;
    transition: all 0.3s ease;
}

.ae-sf-tracker-step.active {
    color: #0E3950;
}

.ae-sf-tracker-step.active .ae-sf-step-num {
    background: #0E3950;
    border-color: #0E3950;
    color: #ECAD20;
    box-shadow: 0 4px 12px rgba(14, 57, 80, 0.25);
}

.ae-sf-tracker-step.completed .ae-sf-step-num {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.ae-sf-tracker-line {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    margin: 0 15px;
    border-radius: 2px;
}

@media (max-width: 600px) {
    .ae-sf-step-txt { display: none; }
    .ae-sf-tracker-line { margin: 0 8px; }
}

/* Botonera de Navegación */
.ae-sf-nav-buttons {
    display: flex;
    margin-top: 30px;
    gap: 15px;
}

.ae-sf-nav-buttons.justify-end { justify-content: flex-end; }
.ae-sf-nav-buttons.justify-between { justify-content: space-between; }

.ae-sf-btn-prev {
    background: #f1f5f9;
    color: #0E3950;
    border: 2px solid #cbd5e1;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ae-sf-btn-prev:hover {
    background: #e2e8f0;
    border-color: #0E3950;
}

.ae-sf-btn-next {
    background: #0E3950;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(14, 57, 80, 0.2);
}

.ae-sf-btn-next:hover:not(:disabled) {
    background: #154c6a;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(14, 57, 80, 0.3);
}

.ae-sf-btn-next:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.ae-sf-header h2 {
    font-size: 28px;
    color: #0E3950;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.ae-sf-header p {
    font-size: 15.5px;
    color: #64748b;
    margin: 0;
}

/* Tarjetas de Selección de Intención */
.ae-sf-intent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .ae-sf-intent-grid {
        grid-template-columns: 1fr;
    }
    .ae-smart-form-container {
        padding: 25px 20px;
    }
}

.ae-sf-intent-card {
    position: relative;
    cursor: pointer;
}

.ae-sf-intent-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ae-sf-card-content {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.25s ease;
    height: 100%;
    box-sizing: border-box;
}

.ae-sf-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.ae-sf-card-content h3 {
    font-size: 17px;
    color: #0E3950;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.ae-sf-card-content p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.ae-sf-intent-card:hover .ae-sf-card-content {
    border-color: #0E3950;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 57, 80, 0.08);
}

.ae-sf-intent-card input[type="radio"]:checked + .ae-sf-card-content {
    border-color: #0E3950;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(14, 57, 80, 0.12), 0 10px 25px rgba(14, 57, 80, 0.1);
    transform: scale(1.02);
}

/* Invitación Directa a WhatsApp */
.ae-sf-whatsapp-invitation {
    margin: 25px 0 15px 0;
    text-align: center;
}

.ae-sf-wa-divider {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.ae-sf-wa-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.ae-sf-wa-divider span {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 0 15px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ae-sf-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
    transition: all 0.25s ease;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
}

.ae-sf-wa-btn:hover {
    background: linear-gradient(135deg, #28e16f 0%, #159e8e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
}

.ae-sf-wa-icon {
    font-size: 20px;
}

/* Campos de Formulario */
.ae-sf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

@media (max-width: 600px) {
    .ae-sf-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.ae-sf-field {
    display: flex;
    flex-direction: column;
}

.ae-sf-field.full-width {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.ae-sf-field label, .ae-sf-field-title {
    font-size: 14px;
    font-weight: 700;
    color: #0E3950;
    margin-bottom: 8px;
    display: block;
}

.ae-sf-field input, .ae-sf-field select, .ae-sf-field textarea {
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14.5px;
    color: #0E3950;
    font-weight: 500;
    background: #f8fafc;
    outline: none;
    transition: all 0.25s ease;
}

.ae-sf-field input:focus, .ae-sf-field select:focus, .ae-sf-field textarea:focus {
    border-color: #0E3950;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(14, 57, 80, 0.1);
}

.ae-sf-service-selector select {
    width: 100%;
    font-size: 16px;
    padding: 14px;
    font-weight: 700;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Preguntas Dinámicas */
.ae-sf-dynamic-box {
    background: #f8fafc;
    border-left: 4px solid #ECAD20;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    animation: ae-sf-fade-in 0.3s ease-out;
}

@keyframes ae-sf-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ae-sf-dynamic-box h4 {
    margin: 0 0 15px 0;
    color: #0E3950;
    font-size: 17px;
    font-weight: 800;
}

/* Botón de Envío y Aceptación */
.ae-sf-policy-check {
    margin-bottom: 20px;
}

.ae-sf-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: #475569;
    cursor: pointer;
}

.ae-sf-checkbox-label input {
    margin-top: 3px;
    accent-color: #0E3950;
    width: 16px;
    height: 16px;
}

.ae-sf-submit-wrap {
    text-align: right;
}

.ae-sf-btn {
    background: linear-gradient(135deg, #ECAD20 0%, #d99b19 100%);
    color: #0E3950;
    border: none;
    padding: 15px 40px;
    font-size: 16.5px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(236, 173, 32, 0.35);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ae-sf-btn:hover {
    background: linear-gradient(135deg, #f5b72b 0%, #e0a31e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 173, 32, 0.45);
}

.ae-sf-alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
}

.ae-sf-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.ae-sf-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
