/* Попап і сторінка підписки (inc/sendpulse.php). Поля — класи форми футера (footer.css). */
.am-sp-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .2s ease;
}

.am-sp-popup[hidden] {
    display: none !important;
}

.am-sp-popup.is-open {
    opacity: 1;
}

.am-sp-popup-lock,
.am-sp-popup-lock body {
    overflow: hidden;
}

body:has(.am-sp-popup.is-open) #wpadminbar {
    display: none;
}

.am-sp-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 40, 40, .55);
}

.am-sp-popup__dialog {
    position: relative;
    width: min(100%, 480px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 40px 32px 28px;
    border-radius: 4px;
    background: #fff;
    color: #282828;
    font-family: "Montserrat", Arial, sans-serif;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.am-sp-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #282828;
    cursor: pointer;
}

.am-sp-popup__close:hover,
.am-sp-popup__close:focus-visible {
    background: #f2f2f2;
    color: #3E5338;
}

.am-sp-popup__close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.am-sp-popup__title,
.am-sp-page-form__title {
    display: block;
    margin: 0 0 10px;
    color: #3E5338;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.15;
}

.am-sp-popup__text,
.am-sp-page-form__text {
    margin: 0 0 20px;
    color: #686868;
    font-size: 15px;
    line-height: 1.35;
}

.am-sp-popup__note,
.am-sp-page-form__note {
    margin: 14px 0 0;
    color: #8f8f8f;
    font-size: 12px;
    line-height: 1.35;
}

.am-sp-form.am-newsletter-form {
    grid-template-columns: 1fr;
    gap: 10px;
}

.am-sp-form .am-newsletter-field,
.am-sp-form .am-newsletter-submit {
    width: 100%;
}

.am-sp-form .am-newsletter-field--phone input {
    height: 50px;
}

.am-sp-form .am-newsletter-form__status {
    position: static;
    grid-column: 1;
}

.am-sp-form.is-success {
    display: block;
}

.am-sp-form.is-success > :not(.am-newsletter-success) {
    display: none !important;
}

.am-sp-form .am-newsletter-success {
    width: 100%;
}

.am-sp-form .am-newsletter-success__copy > span {
    white-space: normal;
}

.am-sp-page-form .am-sp-page-form__title {
    margin-top: 0;
}

.am-sp-page-form {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 4px;
    background: #f2f2f2;
    font-family: "Montserrat", Arial, sans-serif;
}

@media (max-width: 767px) {
    .am-sp-popup__dialog {
        padding: 36px 16px 20px;
    }

    .am-sp-popup__title,
    .am-sp-page-form__title {
        font-size: 22px;
    }

    .am-sp-page-form {
        padding: 20px 16px;
    }
}
