/* LL2 0.6.403 — StickySubscribeCta: the sticky subscribe pill
   and its popup form. 0.6.411: the pill also rides every poll
   single, the popup is shared with the header Subscribe Free
   button site-wide, and the buttons are ORANGE #F97316
   (hover #EA580C) — John's subscribe-button color.
   0.6.417: the pill also rides the Holiday Events page,
   stacked above that page's "Add an event" sticky link.
   Every size is px (OceanWP's root font-size is 62.5%, so rem
   would shrink against intent). Button rules carry two-class
   specificity so the theme's button rules cannot outrank them.
   Scoped entirely under the .ll2-sticky-subscribe classes. */

.ll2-sticky-subscribe .ll2-sticky-subscribe__button {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1000;
    background: #F97316;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    cursor: pointer;
    /* The polls label is long: cap the pill so it wraps to at
       most two lines and never reaches across the viewport. */
    max-width: min(430px, calc(100vw - 36px));
}

.ll2-sticky-subscribe .ll2-sticky-subscribe__button:hover {
    background: #EA580C;
}

/* The "Subscribe Free" pill's second line (0.6.418): what a
   subscriber receives, in smaller print under the label.
   A block span inside the button, so both lines stay one
   click target. */
.ll2-sticky-subscribe .ll2-sticky-subscribe__subline {
    display: block;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    margin-top: 3px;
    opacity: .92;
}

/* The Holiday Events page (0.6.417): HolidayEventsView's
   green "Add an event" sticky link (.hev-sticky-cta) already
   owns the bottom-left corner at bottom:18px and stands
   roughly 48px tall. On this surface only, the subscribe
   pill stacks above it — 18px corner + the link's height +
   a 14px gap — so both stay visible and tappable. */
.ll2-sticky-subscribe--holiday .ll2-sticky-subscribe__button {
    bottom: 80px;
}

.ll2-sticky-subscribe .ll2-sticky-subscribe__button:focus-visible,
.ll2-sticky-subscribe-modal .ll2-sticky-subscribe-modal__close:focus-visible,
.ll2-sticky-subscribe__form .ll2-sticky-subscribe__submit:focus-visible {
    outline: 3px solid #0b6fa4;
    outline-offset: 3px;
}

/* The popup: the ll2-subscribe-modal paint, under this
   feature's own classes. */
.ll2-sticky-subscribe-modal {
    width: min(480px, calc(100vw - 30px));
    max-height: min(90vh, 750px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 26px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 20px 75px rgba(0, 0, 0, .35);
    color: #1b2934;
    background: #fff;
}

.ll2-sticky-subscribe-modal::backdrop {
    background: rgba(10, 27, 40, .66);
}

.ll2-sticky-subscribe-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 10px;
}

.ll2-sticky-subscribe-modal__head h2 {
    margin: 0;
    color: #173b51;
    font-size: 22px;
    line-height: 1.25;
}

.ll2-sticky-subscribe-modal .ll2-sticky-subscribe-modal__close {
    flex: 0 0 auto;
    cursor: pointer;
    border: 0;
    border-radius: 6px;
    background: #f1f4f7;
    color: #213647;
    font-size: 26px;
    line-height: 1;
    padding: 5px 12px;
}

.ll2-sticky-subscribe-modal__intro {
    font-size: 15px;
    line-height: 1.5;
    margin: 5px 0 15px;
}

.ll2-sticky-subscribe__form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
}

.ll2-sticky-subscribe__form input[type="text"],
.ll2-sticky-subscribe__form input[type="email"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.4;
    padding: 11px 12px;
    margin: 0 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #1b2934;
}

.ll2-sticky-subscribe__form .ll2-sticky-subscribe__submit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #F97316;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.ll2-sticky-subscribe__form .ll2-sticky-subscribe__submit:hover {
    background: #EA580C;
}

.ll2-sticky-subscribe__form .ll2-sticky-subscribe__submit[disabled] {
    opacity: .6;
    cursor: default;
}

.ll2-sticky-subscribe__notice {
    font-size: 13px;
    line-height: 1.5;
    color: #5b6b78;
    margin: 12px 0 0;
}

.ll2-sticky-subscribe__status {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 12px;
}

.ll2-sticky-subscribe__status:empty {
    margin-top: 0;
}

.ll2-sticky-subscribe__status[data-state="success"] {
    color: #127044;
    font-weight: 600;
}

.ll2-sticky-subscribe__status[data-state="error"] {
    color: #b91c1c;
}

@media (max-width: 560px) {
    .ll2-sticky-subscribe .ll2-sticky-subscribe__button {
        font-size: 15px;
        padding: 12px 16px;
        left: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }

    .ll2-sticky-subscribe-modal {
        padding: 18px;
    }
}
