/**
 * Promo Popup — Global promotional popup
 * Desktop: fixed bottom-right, row layout (image + content)
 * Mobile: fixed bottom, stacked, close button outside above card
 * Figma: Desktop 1213:13540, Mobile 1316:452
 */

/* ── Base / Desktop ── */
.promo-popup {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    /* Animation: slide up + fade in */
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.promo-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Close button — desktop: inside card, top-right */
.promo-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #777287;
    padding: 0;
    transition: color 0.2s;
}

.promo-popup__close:hover {
    color: #1D004B;
}

/* Card */
.promo-popup__card {
    display: flex;
    flex-direction: row;
    gap: 32px;
    padding: 32px;
    border-radius: 8px;
    background: #FFF;
    box-shadow: 0 4px 20px 4px rgba(39, 43, 43, 0.10);
    max-width: 860px;
}

/* Image */
.promo-popup__image {
    flex-shrink: 0;
    width: 400px;
    height: 228px;
    border-radius: 8px;
    overflow: hidden;
}

.promo-popup__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Body */
.promo-popup__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    flex: 1;
    padding-right: 24px;
}

.promo-popup__title {
    font-family: "Funnel Sans", sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 120%;
    color: #1D004B;
    margin: 0;
}

.promo-popup__text {
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 140%;
    color: #000;
    margin: 0;
}

.promo-popup__cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 4px;
    background: #7336E3;
    color: #FFF;
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.promo-popup__cta:hover {
    background: #5f28c4;
    color: #FFF;
}

/* ── Mobile (768px) ── */
@media (max-width: 768px) {
    .promo-popup {
        bottom: 16px;
        right: 16px;
        left: auto;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    /* Close button — outside, above card */
    .promo-popup__close {
        position: static;
        width: 40px;
        height: 40px;
        border-radius: 500px;
        background: #FFF;
        box-shadow: 0 4px 15px 3px rgba(39, 43, 43, 0.08);
        color: #777287;
        flex-shrink: 0;
    }

    .promo-popup__card {
        flex-direction: column;
        gap: 24px;
        padding: 16px;
        border-radius: 10px;
        max-width: 90vw;
        width: 100%;
    }

    .promo-popup__image {
        width: 100%;
        height: auto;
        aspect-ratio: 400 / 228;
        border-radius: 6px;
    }

    .promo-popup__body {
        gap: 12px;
        padding-right: 0;
    }

    .promo-popup__title {
        font-size: 22px;
    }

    .promo-popup__text {
        font-size: 16px;
    }

    .promo-popup__cta {
        align-self: stretch;
        text-align: center;
    }
}
