/* Popup de bienvenida a la newsletter. Marcado en templates/_partials/newsletter-popup.tpl */
.senan-pop[hidden] { display: none !important; }

.senan-pop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Quicksand', system-ui, sans-serif;
}
html.senan-pop-open { overflow: hidden; }

.senan-pop__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42, 58, 74, 0.5);
    animation: senan-pop-fade .25s ease both;
}

.senan-pop__card {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 28px 70px -24px rgba(96, 135, 169, 0.55);
    outline: 0;
    animation: senan-pop-in .3s ease both;
}

.senan-pop__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #6087A9;
    font-size: 24px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(96, 135, 169, 0.25);
}
.senan-pop__close:hover { background: #eef3f8; }

.senan-pop__head {
    padding: 26px 20px 18px;
    background: #f7f0e6;
    text-align: center;
}
.senan-pop__logo {
    display: inline-block;
    width: 120px;
    max-width: 50%;
    height: auto;
}

.senan-pop__body { padding: 24px 28px 22px; text-align: center; }

.senan-pop__kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #6087A9;
}
.senan-pop__title {
    margin: 0 0 10px;
    font-family: 'Quicksand', system-ui, sans-serif !important;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    color: #4d7192;
}
.senan-pop__text {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.55;
    color: #5a6b7a;
}

/* El tema da estilo a .block_newsletter (fondo, margenes...): se anula dentro del popup */
.senan-pop .block_newsletter {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.senan-pop__row { display: flex; gap: 8px; }
.senan-pop .senan-pop__form .senan-pop__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 18px;
    border: 1px solid #cfdbe5;
    border-radius: 999px;
    background: #ffffff;
    color: #3a3a3a;
    font: inherit;
    font-size: 15px;
}
.senan-pop .senan-pop__form .senan-pop__input:focus { outline: 0; border-color: #6087A9; box-shadow: 0 0 0 3px rgba(159, 187, 212, 0.45); }
.senan-pop .senan-pop__form .senan-pop__btn {
    position: static;   /* el tema lo coloca en absoluto dentro de .block_newsletter */
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    flex: 0 0 auto;
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: #6087A9;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}
.senan-pop .senan-pop__form .senan-pop__btn:hover { background: #4d7192; }
.senan-pop .senan-pop__form .senan-pop__btn[disabled] { opacity: .5; cursor: not-allowed; }
.senan-pop .senan-pop__form .senan-pop__btn[disabled]:hover { background: #6087A9; }

/* Casilla de consentimiento (hook de RGPD): se muestra la casilla nativa en vez de los iconos del tema */
.senan-pop .gdpr_consent { margin: 14px 0 0; text-align: left; }
.senan-pop .gdpr_consent .custom-checkbox { display: block; }
.senan-pop .gdpr_consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #5a6b7a;
    cursor: pointer;
}
.senan-pop .gdpr_consent input[type="checkbox"] {
    position: static;
    opacity: 1;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #6087A9;
}
.senan-pop .gdpr_consent .psgdpr_consent_icon,
.senan-pop .gdpr_consent label > span:first-of-type { display: none; }

/* Respuesta del modulo (alta correcta / error) */
.senan-pop .block_newsletter_alert {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}
.senan-pop .block_newsletter_alert.alert-success { background: #e8f3ec; color: #2f6b47; border: 0; }
.senan-pop .block_newsletter_alert.alert-danger { background: #fbeaea; color: #a84a4a; border: 0; }

.senan-pop__small { margin: 14px 0 4px; font-size: 12px; color: #7f8c99; }
.senan-pop__skip {
    padding: 4px 8px;
    border: 0;
    background: none;
    color: #6087A9;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

/* Tras suscribirse: solo queda el mensaje de confirmacion */
.senan-pop.is-done .senan-pop__form > .senan-pop__row,
.senan-pop.is-done .senan-pop__form .gdpr_consent,
.senan-pop.is-done .senan-pop__small,
.senan-pop.is-done .senan-pop__skip,
.senan-pop.is-done .senan-pop__kicker { display: none; }
.senan-pop.is-done .senan-pop__body { padding-bottom: 28px; }

@media (max-width: 480px) {
    .senan-pop { align-items: flex-end; padding: 10px; }
    .senan-pop__head { padding: 20px 20px 14px; }
    .senan-pop__logo { width: 96px; }
    .senan-pop__body { padding: 20px 20px 18px; }
    .senan-pop__title { font-size: 22px; }
    .senan-pop__row { flex-direction: column; }
    .senan-pop .senan-pop__form .senan-pop__btn { width: 100%; }
}

@keyframes senan-pop-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes senan-pop-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .senan-pop__backdrop, .senan-pop__card { animation: none; }
}
