/* =========================================================
   AP NEWSLETTER POPUP — PRODUCTION CSS
   ========================================================= */


/* ---------- ISOLATION ---------- */

#ap-overlay,
#ap-overlay * {
    box-sizing: border-box;
}


/* ---------- OVERLAY ---------- */

#ap-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(19, 27, 24, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

#ap-overlay.open {
    display: flex;
}


/* ---------- POPUP ---------- */

#ap-overlay #ap-popup {
    position: relative;
    display: grid;
    grid-template-columns: 57% 43%;
    width: min(960px, 94vw);
    max-height: 92vh;
    overflow: hidden;
    border-radius: 18px;
    background: #fbfaf4;
    box-shadow: 0 24px 75px rgba(0, 0, 0, 0.40);
    color: #173d35;
    font-family: Arial, sans-serif;
}


/* ---------- LEFT CONTENT ---------- */

#ap-overlay #ap-popup .content {
    padding: 38px 40px 28px;
    background:
        radial-gradient(
            circle at 0 100%,
            rgba(180, 191, 142, 0.25),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #fbfaf4,
            #fffdf8
        );
}


/* ---------- EYEBROW ---------- */

#ap-overlay #ap-popup .eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 20px;
    color: #657b4f;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 4px;
    white-space: nowrap;
}

#ap-overlay #ap-popup .eyebrow span {
    display: block;
    width: 48px;
    height: 1px;
    background: #71885b;
}


/* ---------- HEADLINE ---------- */

#ap-overlay #ap-title {
    margin: 0 0 24px;
    color: #173d35;
    font-family: Georgia, serif;
    font-size: 36px;
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.7px;
}

#ap-overlay #ap-title strong {
    color: #647b4d;
    font-weight: 700;
}


/* ---------- BENEFITS ---------- */

#ap-overlay #ap-popup .benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 0 24px;
}

#ap-overlay #ap-popup .benefits > div {
    padding: 0 10px;
    color: #173d35;
    font-size: 12.5px;
    line-height: 1.3;
    text-align: center;
}

#ap-overlay #ap-popup .benefits > div + div {
    border-left: 1px solid #d7d8c9;
}

#ap-overlay #ap-popup .benefits b {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #eef0df;
    color: #536c3e;
    font-size: 0;
}

#ap-overlay #ap-popup .benefits b::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}


/* Leaf */

#ap-overlay #ap-popup .benefits > div:nth-child(1) b::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536c3e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 4C13 4 7 6 5 11c-1.4 3.4.5 6.6 3.8 7.3C14 19.4 19 13 20 4Z'/%3E%3Cpath d='M5 20c2.5-5 6.3-8.5 11-11'/%3E%3Cpath d='M10 13c-2.6-2.1-5.2-2.7-7.5-1.9.1 4.3 2.1 7.1 5.6 7.6'/%3E%3C/svg%3E");
}


/* Steaming bowl */

#ap-overlay #ap-popup .benefits > div:nth-child(2) b::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536c3e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11h14c0 5-2.7 8-7 8s-7-3-7-8Z'/%3E%3Cpath d='M7 19h10'/%3E%3Cpath d='M9 8c-1.5-1.4 1.5-2.3 0-4'/%3E%3Cpath d='M13 8c-1.5-1.4 1.5-2.3 0-4'/%3E%3Cpath d='M17 8c-1.5-1.4 1.5-2.3 0-4'/%3E%3C/svg%3E");
}


/* Heart */

#ap-overlay #ap-popup .benefits > div:nth-child(3) b::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536c3e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 5.8a5.4 5.4 0 0 0-7.6 0L12 7l-1.2-1.2a5.4 5.4 0 0 0-7.6 7.6L12 22l8.8-8.6a5.4 5.4 0 0 0 0-7.6Z'/%3E%3C/svg%3E");
}


/* ---------- FORM ---------- */

#ap-overlay #ap-form {
    margin: 0;
}

#ap-overlay #ap-email {
    display: block;
    width: 100%;
    height: 54px;
    margin: 0;
    border: 1px solid #aaa;
    border-radius: 8px;
    outline: none;
    padding: 0 17px;
    background: #fff;
    color: #173d35;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: normal;
    box-shadow: none;
}

#ap-overlay #ap-email:focus {
    border-color: #526e39;
    outline: 2px solid rgba(82, 110, 57, 0.16);
}

#ap-overlay #ap-email::placeholder {
    color: #8a8a8a;
    opacity: 1;
}

#ap-overlay #ap-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}


/* ---------- CTA ---------- */

#ap-overlay #ap-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 57px;
    margin: 11px 0 0;
    border: 0;
    border-radius: 30px;
    padding: 0 20px;
    background: linear-gradient(90deg, #526e39, #647e4b);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
}

#ap-overlay #ap-submit i {
    margin-left: 18px;
    color: #fff;
    font-size: 25px;
    line-height: 1;
    font-style: normal;
}

#ap-overlay #ap-submit:disabled {
    opacity: 0.65;
    cursor: default;
}


/* ---------- STATUS ---------- */

#ap-overlay #ap-status {
    min-height: 20px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
}

#ap-overlay #ap-status.success {
    color: #3d662f;
    font-weight: 700;
}

#ap-overlay #ap-status.error {
    color: #9b2f2f;
}


/* ---------- NOTE + PRIVACY ---------- */

#ap-overlay #ap-popup .note {
    margin: 9px 0 0;
    color: #173d35;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

#ap-overlay #ap-popup .privacy {
    margin: 20px 0 0;
    color: #858585;
    font-size: 10.5px;
    line-height: 1.4;
    text-align: center;
}


/* ---------- BOTANICAL IMAGE ---------- */

#ap-overlay #ap-popup .photo {
    min-height: 560px;
    background-image:
        linear-gradient(
            90deg,
            #fbfaf4 0%,
            rgba(251, 250, 244, 0.82) 8%,
            rgba(251, 250, 244, 0.30) 19%,
            transparent 36%
        ),
        url("images/popup-botanical-v2.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* ---------- CLOSE BUTTON ---------- */

#ap-overlay #ap-close {
    position: absolute;
    z-index: 5;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.13);
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #173d35;
    font-family: Arial, sans-serif;
    font-size: 29px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}


/* =========================================================
   THANK YOU STATE
   ========================================================= */

#ap-overlay #ap-popup.ap-success .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 560px;
    padding: 45px 40px;
    text-align: center;
}

#ap-overlay #ap-popup.ap-success .eyebrow {
    width: 100%;
    margin: 0 0 24px;
}

#ap-overlay #ap-popup.ap-success #ap-title {
    width: 100%;
    margin: 0 0 28px;
    text-align: center;
}

#ap-overlay #ap-popup.ap-success .benefits {
    display: none;
}

#ap-overlay #ap-popup.ap-success #ap-form {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

#ap-overlay #ap-popup.ap-success #ap-success-message {
    margin: 0 auto 25px;
    color: #173d35;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 700;
    text-align: center;
}

#ap-overlay #ap-popup.ap-success .note {
    width: 100%;
    margin: 0 0 24px;
    text-align: center;
}

#ap-overlay #ap-popup.ap-success .privacy {
    width: 100%;
    margin: 0;
    text-align: center;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    #ap-overlay {
        padding: 12px;
    }

    #ap-overlay #ap-popup {
        grid-template-columns: 1fr;
        width: min(520px, 96vw);
        max-height: 94vh;
    }

    #ap-overlay #ap-popup .photo {
        display: none;
    }

    #ap-overlay #ap-popup .content {
        padding: 32px 14px 24px;
    }

    /*
       On mobile the benefit texts have different natural widths,
       so slightly unequal columns use the available space better.
    */
    #ap-overlay #ap-popup .benefits {
        grid-template-columns: 29% 34% 37%;
    }

    #ap-overlay #ap-popup .benefits > div {
        padding-left: 5px;
        padding-right: 5px;
    }

    #ap-overlay #ap-title {
        font-size: 27px;
        line-height: 1.06;
        letter-spacing: -0.4px;
    }

    #ap-overlay #ap-popup .eyebrow {
        gap: 10px;
        letter-spacing: 2px;
    }

    #ap-overlay #ap-popup .eyebrow span {
        width: 28px;
    }

    #ap-overlay #ap-popup.ap-success .content {
        min-height: auto;
        padding: 38px 22px 28px;
    }
}