/* Newsletter Popup Styles */
.newsletter-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    padding: 16px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.newsletter-popup-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.newsletter-popup {
    /* Restaurar la paleta anterior pero conservar el blur del overlay */
    background: linear-gradient(135deg, var(--color-uva) 0%, rgba(47, 36, 23, 0.95) 100%);
    border-radius: 15px;
    max-width: 560px; /* antes 900px */
    width: min(92%, 560px);
    max-height: min(90vh, 90dvh);
    padding: 0;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    display: flex;
    overflow: hidden;
}

.newsletter-popup-image {
    display: none !important;
}

/* Imágenes laterales deshabilitadas para usar blur en overlay */

.newsletter-popup-content {
    flex: 1;
    padding: 28px; /* antes 40px */
    order: 2;
    color: var(--color-beige);
    max-height: min(90vh, 90dvh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.newsletter-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(253, 247, 235, 0.2);
    border: none;
    color: var(--color-beige);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.newsletter-popup-close:hover {
    background: rgba(253, 247, 235, 0.3);
    color: var(--color-beige);
    transform: rotate(90deg);
}

.newsletter-popup-icon {
    text-align: center;
    margin-bottom: 20px;
}

.newsletter-popup-icon i {
    font-size: 50px;
    color: var(--color-gold);
}

.newsletter-popup h2 {
    color: var(--color-gold);
    font-size: 2rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

.newsletter-popup p {
    color: rgba(253, 247, 235, 0.85);
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.6;
}

.newsletter-popup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-popup-form input,
.newsletter-popup-form select {
    padding: 15px 20px;
    border: 1px solid rgba(253, 247, 235, 0.3);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(253, 247, 235, 0.08);
    color: var(--color-beige);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.newsletter-popup-form input:focus,
.newsletter-popup-form select:focus {
    outline: none;
    border-color: var(--color-gold);
    background: rgba(253, 247, 235, 0.15);
}

.newsletter-popup-form input::placeholder {
    color: rgba(253, 247, 235, 0.7);
}

.newsletter-popup-form select {
    appearance: none;
    cursor: pointer;
    background: rgba(253, 247, 235, 0.08);
    color: var(--color-beige);
    border-color: rgba(253, 247, 235, 0.3);
}

.newsletter-popup-form select option {
    color: var(--color-beige);
    background: var(--color-uva);
}

.newsletter-popup-form button {
    background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
    color: var(--color-beige);
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.newsletter-popup-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(193, 85, 35, 0.4);
}

.newsletter-popup-form button:active {
    transform: translateY(0);
}

.newsletter-popup-form .form-consent {
    color: rgba(253, 247, 235, 0.9);
    font-size: 0.9rem;
}

.newsletter-popup-form .form-consent input[type="checkbox"] {
    accent-color: var(--color-gold);
    margin-top: 2px;
}

.newsletter-popup-form .form-consent a {
    color: var(--color-gold);
}

.newsletter-popup-message {
    display: none;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

.newsletter-popup-message.success {
    background: rgba(86, 110, 43, 0.2);
    color: #fff;
    border: 1px solid var(--color-green);
    display: block;
}

.newsletter-popup-message.error {
    background: rgba(193, 85, 35, 0.15);
    color: var(--color-orange);
    border: 1px solid var(--color-orange);
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .newsletter-popup {
        flex-direction: column;
        width: 100%;
        max-height: min(92vh, 92dvh);
    }

    .newsletter-popup-image {
        display: none;
    }

    .newsletter-popup-content {
        padding: 24px 20px;
        max-height: min(92vh, 92dvh);
    }

    .newsletter-popup h2 {
        font-size: 1.6rem;
    }

    .newsletter-popup p {
        font-size: 1rem;
    }

    .newsletter-popup-icon i {
        font-size: 40px;
    }
}

/* Consent layout overrides */
.newsletter-popup-form .form-consent {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

/* Oculta el label original para evitar que su click active el checkbox */
.newsletter-popup-form .form-consent label {
    display: none;
}

.newsletter-popup-form .privacy-text {
    line-height: 1.4;
    flex: 1;
}

.newsletter-popup-form .privacy-text a {
    color: var(--color-gold);
    text-decoration: underline;
}
