/* Campaign popup, loaded only while the popup is enabled */
.campaign-popup-open,
.campaign-popup-open body {
    overflow: hidden;
}
.campaign-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.campaign-popup[hidden] {
    display: none;
}
.campaign-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    cursor: pointer;
}
.campaign-popup-dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 1040px;
    max-height: 100%;
    overflow: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    color: #000;
}
.campaign-popup-dialog:focus {
    outline: none;
}
/* The theme's global scrollbar has an inset shadow meant for the page, popups get a thin one instead */
.campaign-popup-dialog,
.campaign-popup-content {
    scrollbar-width: thin;
    scrollbar-color: #d3d3d3 transparent;
}
.campaign-popup-dialog::-webkit-scrollbar,
.campaign-popup-content::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}
.campaign-popup-dialog::-webkit-scrollbar-track,
.campaign-popup-content::-webkit-scrollbar-track {
    box-shadow: none;
    background: transparent;
}
.campaign-popup-dialog::-webkit-scrollbar-thumb,
.campaign-popup-content::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: #d3d3d3;
}
.campaign-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
    cursor: pointer;
    transition: background-color .4s, color .4s;
}
.campaign-popup-close:hover {
    background: #15B1A0;
    color: #fff;
}
.campaign-popup-close:focus-visible {
    outline: 2px solid #15B1A0;
    outline-offset: 2px;
}
.campaign-popup-visual {
    position: relative;
    display: block;
    min-height: min(520px, calc(100vh - 48px));
}
.campaign-popup-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.campaign-popup-content {
    display: flex;
    flex-direction: column;
    container: popup-content / inline-size;
    gap: 16px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 60px 44px 40px;
    font-size: 17px;
    line-height: 145%;
}
.campaign-popup-content p,
.campaign-popup-content li {
    margin: 0;
    text-wrap: pretty;
}
.campaign-popup-title {
    margin: 0;
    padding-right: 24px;
    font-family: 'Gotham Pro';
    font-size: 30px;
    font-weight: bold;
    line-height: 115%;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    text-wrap: balance;
}
.campaign-popup-text p + p {
    margin-top: 6px;
}
.campaign-popup-text p:first-child {
    font-weight: 600;
    color: #15B1A0;
}
.campaign-popup-content .campaign-popup-list-title {
    margin: 4px 0 10px;
    font-family: 'Gotham Pro';
    font-size: 18px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: -0.02em;
}
.campaign-popup-list ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.campaign-popup-list li {
    position: relative;
    padding-left: 22px;
    font-size: 16px;
}
.campaign-popup-list li::before {
    content: '';
    position: absolute;
    top: .55em;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #15B1A0;
}
.campaign-popup-list strong {
    font-weight: 600;
}
.campaign-popup-outro {
    font-size: 15px;
    color: #555;
}
.campaign-popup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}
.campaign-popup-actions .btn {
    padding: 14px 24px;
    font-size: 18px;
    white-space: normal;
}
.campaign-popup-actions .btn-stroke:hover {
    color: #fff;
    background: #581E54;
    border-color: #581E54;
}

/* Russian copy runs longer, so the desktop type is smaller */
@media all and (min-width: 768px) {
    .campaign-popup:lang(ru) .campaign-popup-content {
        gap: 12px;
        padding: 52px 36px 32px;
        font-size: 16px;
    }
    .campaign-popup:lang(ru) .campaign-popup-title {
        font-size: 24px;
    }
    .campaign-popup:lang(ru) .campaign-popup-list li {
        font-size: 15px;
    }
    .campaign-popup:lang(ru) .campaign-popup-list ul {
        gap: 6px;
    }
    .campaign-popup:lang(ru) .campaign-popup-actions .btn {
        padding-inline: 18px;
        font-size: 16px;
    }
}

@media all and (max-width: 767px) {
    .campaign-popup {
        padding: 16px;
    }
    .campaign-popup-dialog {
        display: flex;
        flex-direction: column;
        max-width: 420px;
    }
    /* Sticky so the close button stays reachable while the dialog scrolls */
    .campaign-popup-close {
        position: sticky;
        top: 10px;
        right: auto;
        flex: none;
        align-self: flex-end;
        margin: 10px 10px -54px 0;
    }
    .campaign-popup-visual {
        flex: none;
        min-height: 0;
        aspect-ratio: 3 / 2;
    }
    .campaign-popup-content {
        gap: 12px;
        max-height: none;
        overflow-y: visible;
        padding: 24px 20px 28px;
        font-size: 16px;
    }
    .campaign-popup-title {
        padding-right: 0;
        font-size: 22px;
    }
    .campaign-popup-list li {
        font-size: 15px;
    }
    .campaign-popup-actions .btn {
        font-size: 16px;
    }
}

/* Stack the buttons when they would not fit on one row */
@container popup-content (max-width: 330px) {
    .campaign-popup-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
