.cf-popup-overlay[hidden] {
    display: none !important;
}

.cf-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #0008;
    overscroll-behavior: contain;
}

.cf-popup {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    box-sizing: border-box;
    border-radius: 22px;
    padding: 36px;
    background: #fff;
    color: #222;
    box-shadow: 0 12px 60px #0004;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    overscroll-behavior: contain;
}

.cf-popup #cf-popup-title {
    margin: 0 0 20px;
    padding: 0 32px;
    text-align: center;
    color: inherit;
    font-family: inherit;
    font-size: 26px;
    line-height: 1.2;
}

.cf-popup .cf-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    color: #222;
    box-shadow: none;
    font: 15px/1 sans-serif;
    cursor: pointer;
}

.cf-popup .cf-popup-close:hover {
    background: #e5e5e5;
    color: #222;
}

.cf-popup :focus-visible {
    outline: 2px solid #222;
    outline-offset: 3px;
}

.cf-popup-content > :last-child {
    margin-bottom: 0;
}

.cf-popup-content img {
    max-width: 100%;
    height: auto;
}

.cf-popup-content .cf-popup-charity-image {
    display: block;
    width: 200px;
    margin: 0 auto 20px;
}

.cf-popup-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
}

.cf-popup-colors .cf-popup-color {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cf-progress-color);
    box-shadow: 0 3px 8px #0002;
}

.cf-popup-color .cf-popup-color-check {
    display: block;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--cf-progress-check, #222);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 1px #0006);
}

@media (max-width: 767px) {
    .cf-popup-overlay { padding: 15px; }
    .cf-popup { padding: 30px 22px; max-height: calc(100vh - 30px); max-height: calc(100dvh - 30px); }
    .cf-popup #cf-popup-title { font-size: 23px; }
    .cf-popup-colors { gap: 10px; }
    .cf-popup-colors .cf-popup-color { flex-basis: 36px; width: 36px; height: 36px; }
}

.cf-popup.cf-popup--image {
    padding: 0;
}

.cf-popup--image #cf-popup-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.cf-popup--image .cf-popup-banner-link,
.cf-popup--image .cf-popup-banner {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
}

.cf-popup--image .cf-popup-banner {
    height: auto;
}

.cf-popup-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.cf-popup .cf-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 24px;
    border: 0;
    border-radius: 100px;
    background: #f0f7ff;
    color: #2d2d2d;
    text-transform: uppercase;
    box-shadow: 0 5px 10px #0002;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.cf-popup .cf-popup-button:hover {
    background: #444;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 5px 12px #0004;
}
