/* Magazine cover popup */
.umdk-cover-popup,
.umdk-cover-popup * {
    box-sizing: border-box;
}

.umdk-cover-popup[hidden] {
    display: none !important;
}

.umdk-cover-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.umdk-cover-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 22, 36, .54);
    backdrop-filter: blur(2px);
}

.umdk-cover-popup__dialog {
    position: relative;
    z-index: 1;
    width: min(440px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.umdk-cover-popup__close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #122033;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(18, 32, 51, .22);
    z-index: 3;
}

.umdk-cover-popup__cover {
    position: relative;
    width: min(420px, calc(100vw - 40px));
    aspect-ratio: 210 / 297;
    overflow: hidden;
    border-radius: 0;
    background:
        linear-gradient(135deg, #4aa3c7 0%, #f4c437 100%);
    background-size: cover;
    background-position: center center;
    box-shadow: 0 32px 78px rgba(18, 32, 51, .38);
    isolation: isolate;
}

.umdk-cover-popup__shade {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: solid 10px #ffffff;
    background:
        linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.06) 46%, rgba(0,0,0,.50) 100%),
        radial-gradient(circle at 75% 16%, rgba(255,255,255,.40) 0 0, transparent 34%),
        radial-gradient(circle at 20% 76%, rgba(231,84,128,.22) 0 0, transparent 32%);
}

.umdk-cover-popup__content {
    position: absolute;
    left: 34px;
    right: 34px;
    top: 46px;
    color: #fff;
    z-index: 1;
    text-shadow: 0 3px 18px rgba(0,0,0,.24);
}

.umdk-cover-popup__label {
    font-size: 32px;
    line-height: 1;
    font-weight: 600;
    margin-bottom: 8px;
}

.umdk-cover-popup__title {
    font-family: 'Caveat', cursive;
    font-size: 70px;
    line-height: .76;
    font-weight: 700;
    max-width: 86%;
}

.umdk-cover-popup__subtitle {
    margin-top: 20px;
    max-width: 260px;
    font-size: 21px;
    line-height: 1.18;
    font-weight: 600;
}

.umdk-cover-popup__heart {
    position: absolute;
    right: 34px;
    top: 68px;
    z-index: 1;
    color: #e65382;
    font-size: 58px;
    line-height: 1;
    font-family: 'Caveat', cursive;
    text-shadow: 0 2px 14px rgba(255,255,255,.45);
}

.umdk-cover-popup__button {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 34px;
    width: calc(100% - 68px);
    max-width: 195px;
    min-height: 40px;
    transform: translateX(-50%);
    border: 0;
    border-radius: 12px;
    background: #998457;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 16px 34px rgba(18, 32, 51, .22);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.umdk-cover-popup__button:hover,
.umdk-cover-popup__button:focus {
    background: #8c784f;
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 20px 42px rgba(18, 32, 51, .28);
}

body.umdk-cover-popup-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .umdk-cover-popup {
        padding: 20px;
    }

    .umdk-cover-popup__dialog,
    .umdk-cover-popup__cover {
        width: min(calc(100vw - 40px), calc((100vh - 40px) * .707));
        max-height: calc(100vh - 40px);
    }

    .umdk-cover-popup__content {
        left: 26px;
        right: 26px;
        top: 36px;
    }

    .umdk-cover-popup__label {
        font-size: 26px;
    }

    .umdk-cover-popup__title {
        font-size: clamp(58px, 17vw, 88px);
    }

    .umdk-cover-popup__subtitle {
        font-size: 17px;
        max-width: 230px;
    }

    .umdk-cover-popup__heart {
        right: 26px;
        top: 54px;
        font-size: 46px;
    }

    .umdk-cover-popup__button {
        left: 50%;
        right: auto;
        bottom: 26px;
        width: calc(100% - 52px);
        max-width: 195px;
        min-height: 52px;
        transform: translateX(-50%);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 16px;
    }
}
