/* Fuente personalizada */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Container principal */
.simlimites-discount-container {
    font-family: 'Poppins', Arial, sans-serif;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

/* Formulario principal */
.discount-form-wrapper {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
    outline: 1px #EAECF0 solid;
    outline-offset: -1px;
}

.discount-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Títulos */
.form-title {
    color: #000;
    font-size: 36px;
    font-weight: 500;
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

.form-subtitle {
    color: #666;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

/* Campos del formulario */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    position: relative;
}

.form-field input {
    width: 100%;
    height: 62px;
    background: #F2F4F7;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-field input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px #00B8F1;
}

.form-field input::placeholder {
    color: #98A2B3;
    font-weight: 500;
}

.form-field input.error {
    border: 2px solid #ff4444;
    background: #fff5f5;
}

/* Botón principal */
.btn-primary {
    width: 100%;
    height: 64px;
    background: #00B8F1;
    border: none;
    border-radius: 9px;
    color: white;
    font-size: 20px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 6px 6px rgba(95.98, 94.38, 94.38, 0.15);
}

.btn-primary:hover {
    background: #0099cc;
    transform: translateY(-2px);
    box-shadow: 0px 8px 12px rgba(95.98, 94.38, 94.38, 0.25);
}

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Divisor */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E5E5;
}

.divider-text {
    padding: 0 20px;
    color: #B5B5B5;
    font-size: 16px;
    font-weight: 500;
}

/* Botones sociales */
.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.btn-google {
    background: #fff;
    color: #333;
    border: 2px solid #E5E5E5;
}

.btn-google:hover {
    border-color: #4285F4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
}

.btn-apple {
    background: #000;
    color: #fff;
}

.btn-apple:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-social:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Versión expandida de botones sociales para texto */
@media (min-width: 480px) {
    .btn-social {
        width: auto;
        min-width: 120px;
        padding: 0 20px;
        border-radius: 8px;
    }
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.modal-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.modal-content p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Modal de éxito */
#success-modal .modal-content {
    text-align: center;
    border-top: 5px solid #00B8F1;
}

#success-modal h3 {
    color: #00B8F1;
}

/* Modal de error */
#error-modal .modal-content {
    text-align: center;
    border-top: 5px solid #ff4444;
}

#error-modal h3 {
    color: #ff4444;
}

/* Responsive */
@media (max-width: 768px) {
    .simlimites-discount-container {
        padding: 10px;
    }
    
    .discount-form-wrapper {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 28px;
    }
    
    .form-subtitle {
        font-size: 14px;
    }
    
    .btn-primary {
        height: 56px;
        font-size: 18px;
    }
    
    .form-field input {
        height: 56px;
        font-size: 14px;
    }
    
    .social-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-social {
        width: 100%;
        height: 50px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .form-title {
        font-size: 24px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .modal-content h3 {
        font-size: 20px;
    }
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animaciones adicionales */
.form-field {
    animation: slideUp 0.6s ease;
    animation-fill-mode: both;
}

.form-field:nth-child(1) { animation-delay: 0.1s; }
.form-field:nth-child(2) { animation-delay: 0.2s; }
.form-field:nth-child(3) { animation-delay: 0.3s; }

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

/* Botones con iconos */
.btn-social svg {
    flex-shrink: 0;
}

/* Estilos para inputs con validación */
.form-field.success input {
    border: 2px solid #00B8F1;
    background: #f0f9ff;
}

/* Mensaje de ayuda */
.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* Loader personalizado */
.btn-primary.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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