.pg-common-popup[hidden] {
    display: none !important;
}

.pg-common-popup {
    align-items: center;
    background: rgba(0, 0, 0, 0.68);
    display: flex;
    inset: 0;
    justify-content: center;
    overflow: hidden;
    padding: 28px;
    position: fixed;
    z-index: 100000;
}

body.pg-common-popup-open {
    overflow: hidden;
}

.pg-common-popup__panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    width: min(920px, 100%);
}

.pg-common-popup__panel--with-photo {
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 54%);
}

.pg-common-popup__panel--without-photo {
    max-width: 680px;
}

.pg-common-popup__panel--photo-only {
    max-width: 720px;
}

.pg-common-popup__panel--photo-only .pg-common-popup__media {
    height: min(72vh, 600px);
}

.pg-common-popup__close {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    display: flex;
    height: 40px;
    justify-content: center;
    padding: 9px;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 40px;
    z-index: 2;
}

.pg-common-popup__close:hover,
.pg-common-popup__close:focus-visible {
    background: rgba(0, 0, 0, 0.07);
}

.pg-common-popup__close:focus-visible,
.pg-common-popup__link:focus-visible {
    outline: 3px solid rgba(31, 164, 104, 0.42);
    outline-offset: 2px;
}

.pg-common-popup__close svg {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
    width: 22px;
}

.pg-common-popup__media {
    min-height: 440px;
}

.pg-common-popup__media--mobile {
    display: none;
}

.pg-common-popup__photo {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.pg-common-popup__content {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 64px 48px 48px;
}

.pg-common-popup__panel--without-photo .pg-common-popup__content {
    align-items: center;
    min-height: 420px;
    padding: 68px 56px 56px;
    text-align: center;
}

.pg-common-popup__logo {
    align-self: center;
    display: block;
    height: auto;
    margin: 0 0 24px;
    max-height: 99px;
    max-width: 253px;
    object-fit: contain;
}

.pg-common-popup__title {
    align-self: center;
    color: #1fa468;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 22px;
    overflow-wrap: anywhere;
    text-align: center;
    width: 100%;
}

.pg-common-popup__description {
    color: #454545;
    font-size: 16px;
    line-height: 1.75;
    overflow-wrap: anywhere;
    width: 100%;
}

.pg-common-popup__description p {
    margin: 0;
}
.pg-common-popup__description div {
   min-height: 1.5rem;
}

.pg-common-popup__link {
    align-items: center;
    align-self: flex-end;
    background: #21a66a;
    border-radius: 5px;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 14px;
    justify-content: center;
    line-height: 1.2;
    margin-top: 30px;
    min-height: 44px;
    min-width: 132px;
    padding: 12px 18px;
    text-decoration: none;
}

.pg-common-popup__panel--without-photo .pg-common-popup__link {
    align-self: center;
}

.pg-common-popup__link:hover {
    background: #188a57;
    color: #fff;
}

.pg-common-popup__link-arrow {
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 767px) {
    .pg-common-popup {
        align-items: center;
        padding: 18px;
    }

    .pg-common-popup__panel {
        max-height: calc(100vh - 36px);
        max-height: calc(100dvh - 36px);
    }

    .pg-common-popup__panel--with-photo {
        display: block;
    }

    .pg-common-popup__media--desktop {
        display: none;
    }

    .pg-common-popup__media--mobile {
        display: block;
    }

    .pg-common-popup__media {
        height: min(42vh, 300px);
        min-height: 220px;
    }

    .pg-common-popup__content,
    .pg-common-popup__panel--without-photo .pg-common-popup__content {
        align-items: center;
        min-height: 0;
        padding: 58px 24px 32px;
        text-align: center;
    }

    .pg-common-popup__panel--has-mobile-photo .pg-common-popup__content {
        padding-top: 32px;
    }

    .pg-common-popup__logo {
        margin-bottom: 18px;
        max-height: 80px;
        max-width: 218px;
    }

    .pg-common-popup__title {
        font-size: 25px;
        margin-bottom: 16px;
    }

    .pg-common-popup__description {
        font-size: 14px;
        line-height: 1.65;
    }

    .pg-common-popup__link,
    .pg-common-popup__panel--without-photo .pg-common-popup__link {
        align-self: center;
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .pg-common-popup:not([hidden]) .pg-common-popup__panel {
        animation: pg-common-popup-enter 180ms ease-out;
    }

    @keyframes pg-common-popup-enter {
        from {
            opacity: 0;
            transform: translateY(10px) scale(0.985);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}
