/* Newsletter popup and footer sign-up (resources/views/includes/newsletter). Site colours come
   in as --nl-primary / --nl-primary-dark / --nl-tint from the layout. */

.nl-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Form */
.nl-form { margin: 0; }
.nl-form__row { display: flex; gap: 8px; }
.nl-form__input {
    flex: 1; min-width: 0; height: 48px; padding: 0 14px;
    border: 1px solid #cdd5df; border-radius: 10px; background: #fff; color: #16202c; font-size: 16px;
}
.nl-form__input:focus { outline: none; border-color: var(--nl-primary); box-shadow: 0 0 0 3px var(--nl-tint); }
.nl-form__btn {
    flex: none; height: 48px; padding: 0 22px; border: 0; border-radius: 10px;
    background: var(--nl-primary); color: #fff; font-weight: 650; font-size: 16px; cursor: pointer;
}
.nl-form__btn:hover { background: var(--nl-primary-dark); }
.nl-form__btn:disabled { opacity: .6; cursor: wait; }
.nl-form__btn:focus-visible, .nl-popup__close:focus-visible, .nl-popup__skip:focus-visible { outline: 3px solid var(--nl-primary); outline-offset: 2px; }
.nl-form__status { margin: 8px 0 0; font-size: 14px; font-weight: 600; min-height: 0; }
.nl-form__status:empty { display: none; }
.nl-form__status.is-ok { color: #11753f; }
.nl-form__status.is-error { color: #b42318; }
.nl-form.is-done .nl-form__row { display: none; }
.nl-form.is-done .nl-form__status { font-size: 16px; margin-top: 0; }
.nl-form__fine { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: #5b6675; }
.nl-form__fine a { color: inherit; text-decoration: underline; }

/* Popup */
.nl-popup {
    width: min(460px, calc(100vw - 32px)); padding: 36px 32px 20px; border: 0; border-radius: 18px;
    background: #fff; color: #16202c; text-align: center;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .28);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.nl-popup::backdrop { background: rgba(16, 24, 40, .55); }
.nl-popup[open] { animation: nl-in .25s ease-out; }
@keyframes nl-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nl-popup__close {
    position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: transparent; color: #5b6675; font-size: 26px; line-height: 1; cursor: pointer;
}
.nl-popup__close:hover { background: #f1f4f8; color: #16202c; }
.nl-popup__icon {
    width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--nl-tint); color: var(--nl-primary); font-size: 24px;
}
.nl-popup__title { margin: 0 0 8px; font-size: 22px; font-weight: 750; line-height: 1.25; color: inherit; }
.nl-popup__text { margin: 0 0 20px; color: #5b6675; font-size: 15px; line-height: 1.55; }
.nl-popup .nl-form { text-align: left; }
.nl-popup__skip { margin-top: 10px; border: 0; background: none; color: #5b6675; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* Phones: a non-blocking sheet at the bottom of the screen */
.nl-popup--sheet {
    position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; z-index: 1050;
    border-radius: 18px 18px 0 0; padding: 22px 18px 12px; text-align: left;
}
.nl-popup--sheet .nl-popup__icon { display: none; }
.nl-popup--sheet .nl-popup__title { font-size: 18px; padding-right: 36px; }
.nl-popup--sheet .nl-popup__text { font-size: 14px; margin-bottom: 14px; }
.nl-popup--sheet .nl-form__row { flex-direction: column; }
.nl-popup--sheet .nl-form__input { flex: none; }
.nl-popup--sheet .nl-popup__skip { display: none; }

/* Footer band */
.nl-band {
    display: grid; grid-template-columns: 1fr minmax(320px, 480px); gap: 24px; align-items: center;
    background: #fff; border: 1px solid #e2e7ee; border-radius: 16px; padding: 24px 28px; margin-bottom: 40px;
}
.nl-band__title { margin: 0 0 4px; font-size: 20px !important; font-weight: 750; color: #16202c; text-transform: none !important; }
.nl-band__text { margin: 0; color: #5b6675; font-size: 15px; }
/* The footer theme greys out its own text and links; keep the band readable */
.footerWrap .nl-band__text, .footerWrap .nl-form__fine, .footerWrap .nl-form__fine a { color: #5b6675; }

@media (max-width: 767px) {
    .nl-band { grid-template-columns: 1fr; padding: 20px; }
    .nl-band .nl-form__row { flex-direction: column; }
    .nl-band .nl-form__input { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
    .nl-popup[open] { animation: none; }
}
