/* newsletter-styles.css */
/* Estilos para el popup y formularios de newsletter */

/* Modal overlay */
.newsletter-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-in-out;
    opacity: 0;
    pointer-events: none;
}

.newsletter-modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

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

/* Modal contenedor */
.newsletter-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    padding: 0;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

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

/* Modal Header */
.newsletter-modal-header {
    background: linear-gradient(135deg, rgba(8, 247, 79, 0.93) 0%, #00cc66 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.newsletter-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.newsletter-modal-header p {
    margin: 10px 0 0 0;
    font-size: 14px;
    opacity: 0.95;
}

/* Botón de cerrar */
.newsletter-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.newsletter-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Body */
.newsletter-modal-body {
    padding: 30px;
}

.newsletter-modal-body h3 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.newsletter-modal-body p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* Formulario */
.newsletter-form {
    margin: 20px 0;
}

.newsletter-form-group {
    margin-bottom: 15px;
}

.newsletter-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.newsletter-form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.newsletter-form-group input[type="email"]:focus {
    outline: none;
    border-color: #00cc66;
    background: #f0fdf4;
}

.newsletter-form-group input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Características */
.newsletter-features {
    background: #f8f9fa;
    border-left: 4px solid #00cc66;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.newsletter-features h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
}

.newsletter-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.newsletter-features li {
    color: #666;
    font-size: 13px;
    padding: 5px 0;
    display: flex;
    align-items: center;
}

.newsletter-features li:before {
    content: "✓";
    color: #00cc66;
    font-weight: bold;
    margin-right: 8px;
    font-size: 16px;
}

/* Modal Footer */
.newsletter-modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Botones */
.newsletter-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    min-width: 120px;
    text-align: center;
}

.newsletter-btn-primary {
    background: #007BFF;
    color: white;
}

.newsletter-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

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

.newsletter-btn-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.newsletter-btn-secondary:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.newsletter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading state */
.newsletter-btn.loading {
    position: relative;
    color: transparent;
}

.newsletter-btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Privacidad */
.newsletter-privacy {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    text-align: center;
    line-height: 1.5;
}

.newsletter-privacy a {
    color: #007BFF;
    text-decoration: none;
}

.newsletter-privacy a:hover {
    text-decoration: underline;
}

/* Mensaje de éxito */
.newsletter-success {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    text-align: center;
    margin-bottom: 20px;
}

.newsletter-success h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .newsletter-modal {
        width: 95%;
        max-width: 100%;
    }
    
    .newsletter-modal-header {
        padding: 20px;
    }
    
    .newsletter-modal-header h2 {
        font-size: 20px;
    }
    
    .newsletter-modal-body {
        padding: 20px;
    }
    
    .newsletter-modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .newsletter-btn {
        width: 100%;
        min-width: auto;
    }
}
