.dnh-promo-popup {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dnh-promo-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dnh-promo-popup[hidden] {
    display: none !important;
}

/* Overlay */
.dnh-promo-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgb(17 24 39 / 65%);
}

/* Popup */
.dnh-promo-popup__dialog {
    position: relative;
    z-index: 1;

    width: min(520px, calc(100vw - 32px));
    max-width: 520px;

    max-height: calc(100vh - 32px);

    background: #fff;
    border-radius: 16px;

    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);

    padding: 8px;

    overflow: hidden;

    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s ease;
}

.dnh-promo-popup.is-open .dnh-promo-popup__dialog {
    transform: translateY(0) scale(1);
}

/* Close Button */
.dnh-promo-popup__close {
    position: absolute;
    top: 15px;
    right: 15px;

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;

    background: #f5f5f5;
    color: #111;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    z-index: 10;

    transition: background 0.2s ease, transform 0.2s ease;
}

.dnh-promo-popup__close:hover {
    background: #e5e5e5;
    transform: scale(1.05);
}

/* Image Wrapper */
.dnh-promo-popup__image-wrap {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    overflow: hidden;

    border-radius: 8px;
}

/* Image */
.dnh-promo-popup__image {
    display: block;

    width: 100%;
    height: auto;

    max-width: 100%;
    max-height: calc(100vh - 48px);

    object-fit: contain;

    border-radius: 8px;
}

/* Bottom faded gradient */
.dnh-promo-popup__image-wrap::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 40%;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.45) 30%,
        rgba(0, 0, 0, 0.15) 65%,
        rgba(0, 0, 0, 0) 100%
    );

    pointer-events: none;

    z-index: 1;
}

/* CTA Container */
.dnh-promo-popup__actions {
    position: absolute;

    left: 50%;
    bottom: 20px;

    transform: translateX(-50%);

    z-index: 2;

    width: max-content;

    margin: 0;
}

/* CTA Button */
.dnh-promo-popup__cta {
    min-width: 160px;

    font-size: 16px;
    font-weight: 500;

    background: #FFD335;
    color: #000 !important;

    padding: 10px 25px;

    border-radius: 5px;

    display: inline-block;

    text-decoration: none;

    text-align: center;

    cursor: pointer;

    border: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.dnh-promo-popup__cta:hover {
    background: #3d6ef5;
    color: #fff !important;

    transform: translateY(-1px);
}

/* Prevent page scrolling when popup is open */
body.dnh-promo-popup-open {
    overflow: hidden;
}

/* Accessibility */
.dnh-promo-popup .visually-hidden {
    position: absolute !important;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* =========================
   TABLET
   ========================= */

@media (max-width: 767px) {

    .dnh-promo-popup {
        padding: 12px;
    }

    .dnh-promo-popup__dialog {
        width: min(520px, calc(100vw - 24px));

        max-width: 100%;

        max-height: calc(100vh - 24px);

        border-radius: 14px;

        padding: 6px;
    }

    .dnh-promo-popup__image {
        max-height: calc(100vh - 36px);
    }

    .dnh-promo-popup__close {
        top: 12px;
        right: 12px;

        width: 34px;
        height: 34px;

        font-size: 24px;
    }

    .dnh-promo-popup__actions {
        bottom: 18px;
    }
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 575px) {

    .dnh-promo-popup {
        padding: 10px;
    }

    .dnh-promo-popup__dialog {
        width: 100%;
        max-width: 100%;

        max-height: calc(100vh - 20px);

        padding: 5px;

        border-radius: 12px;
    }

    .dnh-promo-popup__image-wrap {
        width: 100%;
        border-radius: 7px;
    }

    .dnh-promo-popup__image {
        width: 100%;
        height: auto;

        max-width: 100%;
        max-height: calc(100vh - 30px);

        object-fit: contain;

        border-radius: 7px;
    }

    .dnh-promo-popup__image-wrap::after {
        height: 45%;

        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.40) 35%,
            rgba(0, 0, 0, 0.10) 70%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .dnh-promo-popup__close {
        top: 10px;
        right: 10px;

        width: 32px;
        height: 32px;

        font-size: 22px;
    }

    .dnh-promo-popup__actions {
        bottom: 14px;
    }

    .dnh-promo-popup__cta {
        min-width: 140px;

        font-size: 15px;

        padding: 9px 20px;
    }
}


/* =========================
   VERY SMALL SCREENS
   ========================= */

@media (max-width: 380px) {

    .dnh-promo-popup__dialog {
        padding: 4px;
    }

    .dnh-promo-popup__actions {
        bottom: 12px;
    }

    .dnh-promo-popup__cta {
        min-width: 125px;

        font-size: 14px;

        padding: 8px 16px;
    }
}