/**
 * GROWTH-95 — Free Server Gift popup.
 *
 * Standalone stylesheet: enqueued only on the pages that render the popup
 * (functions.php -> godlike_free_gift_should_render()), so it stays out of the
 * main css/main.css bundle. Same convention as css/new/featured-seeds.css.
 *
 * Overlay geometry / colours mirror .flash-sale-modal (css/new/modals/flash-sale-modal.scss)
 * so both promos look like one family.
 *
 * The z-index is the one thing deliberately NOT mirrored (DEV-455). Sharing the flash-sale
 * band meant DOM order decided the stacking, and footer.php renders this popup after the
 * flash-sale modal — so this popup drew on top while the flash-sale CLOSE button (2002, above
 * our modal's 2001) floated over it. Sitting above the whole 2000-2002 band is a tiebreaker,
 * not the fix: the two are kept off the screen at the same time by js/free-server-gift.js,
 * which waits for the other promo to close before showing anything. This only makes sure that
 * if they ever do meet, the result is one modal on top of one backdrop rather than a mix.
 */

.free-gift[hidden] {
    display: none;
}

.free-gift__wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    position: fixed;
    z-index: 2100;
    top: 0;
    left: 0;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(27, 27, 44, .5);
}

/* [hidden] must beat the display:flex above. */
.free-gift__wrapper[hidden] {
    display: none;
}

.free-gift__modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2101;
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    padding: 32px;
    gap: 12px;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 16px;
    background: linear-gradient(#1B1B2C, #1B1B2C) padding-box,
    linear-gradient(267.71deg, #007CEE -37.36%, #5F39CB 98.08%) border-box;
}

.free-gift__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.free-gift__badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(267.71deg, #007CEE -37.36%, #5F39CB 98.08%);
}

.free-gift__badge--ready {
    background: #21A366;
}

.free-gift__title {
    margin: 4px 0 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 32px;
    color: #fff;
}

.free-gift__text {
    margin: 0;
    font-size: 15px;
    line-height: 22px;
    color: rgba(255, 255, 255, .72);
}

.free-gift__benefits {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.free-gift__benefit {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    line-height: 22px;
    color: #fff;
}

.free-gift__benefit::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #21A366;
    box-shadow: 0 0 0 4px rgba(33, 163, 102, .24);
}

.free-gift__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}

.free-gift__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.free-gift__button--primary {
    color: #fff;
    background: #007CEE;
}

.free-gift__button--primary:hover {
    background: #0A6FCE;
}

.free-gift__button--link {
    color: rgba(255, 255, 255, .72);
    background: none;
}

.free-gift__button--link:hover {
    color: #fff;
}

@media screen and (max-width: 700px) {
    .free-gift__modal {
        padding: 24px 16px;
    }

    .free-gift__title {
        font-size: 22px;
        line-height: 28px;
    }
}
