/* Simple Promo Popup - Frontend Styles */
#spp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#spp-popup-overlay.spp-visible {
    opacity: 1;
}

#spp-popup-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    width: 90vw;
    max-width: 1280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

/* Close button - plain SVG, no circle */
#spp-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #000;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s ease;
}

#spp-popup-close:hover {
    opacity: 0.6;
}

#spp-popup-close svg {
    width: 16px;
    height: 16px;
}

/* Two-column body */
.spp-popup-body {
    display: flex;
    gap: 22px;
}

/* Left column: image as cover */
.spp-popup-col-image {
    position: relative;
    flex: 0 0 60%;
    overflow: hidden;
    /* aspect-ratio is set via inline style from PHP */
}

.spp-popup-col-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    z-index: 1;
    pointer-events: none;
}

.spp-popup-col-image > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Logo overlay at bottom center of image column */
.spp-popup-logo {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
}

.spp-popup-logo img {
    max-width: 320px;
    width:60%;
    height: auto;
}

/* Right column: text content */
.spp-popup-col-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.spp-popup-text {
    padding: 60px 60px 60px 24px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}
.spp-popup-text p{
    margin-bottom:16px;
}
.spp-popup-text p.title-margin{
    margin-bottom:40px;
}
.spp-popup-text *[data-style="no-whitespace"]{
    white-space:nowrap;
}

.spp-popup-text *[data-fontsize="xs"] {
    font-size: 12px;
}
.spp-popup-text *[data-fontsize="s"] {
    font-size: 14px;
}
.spp-popup-text *[data-fontsize="m"] {
    font-size: 16px;
}
.spp-popup-text *[data-fontsize="l"] {
    font-size: 24px;
    line-height: 1.3;
}
.spp-popup-text *[data-fontsize="xl"] {
    font-size: 32px;
    line-height: 1.2;
}
.spp-popup-text *[data-fontsize="xxl"] {
    font-size: 48px;
    line-height: 1.1;
}

.spp-popup-text *[data-style="title"] {
    font-family: "Aldine721 BT", serif;
    font-weight: 300;
}

.spp-popup-text *[data-style="button"] {
    display: inline-block;
    color: #fff !important;
    text-decoration: none;
    background: #1c1c1c;
    border-radius: 40px;
    text-align: center;
    width: 100%;
    transition: 0.5s all;
    margin-top:24px;
}
.spp-popup-text *[data-style="button"]:hover {
    background: #ff9662;
    color: #1c1c1c !important;
    transition: 0.5s all;
}
.spp-popup-text *[data-style="button"] *{
    color: inherit !important;
    text-decoration: inherit !important;
    padding: 12px 24px;
    width: 100%;
    display: inline-block;
}

.spp-popup-text p:last-child {
    margin-bottom: 0;
}

/* Desktop / Mobile image visibility */
.spp-img-mobile {
    display: none;
}

.spp-img-desktop {
    display: block;
}

.spp-logo-mobile {
    display: none;
}

.spp-logo-desktop {
    display: inline-block;
}

@media (max-width: 1024px) {
    .spp-popup-text {
        padding: 60px 24px;
    }
    .spp-popup-text *[data-fontsize="xs"] {
        font-size: 10px;
    }
    .spp-popup-text *[data-fontsize="s"] {
        font-size: 12px;
    }
    .spp-popup-text *[data-fontsize="m"] {
        font-size: 14px;
    }
    .spp-popup-text *[data-fontsize="l"] {
        font-size: 20px;
    }
    .spp-popup-text *[data-fontsize="xl"] {
        font-size: 24px;
    }
    .spp-popup-text *[data-fontsize="xxl"] {
        font-size: 36px;
    }
    .spp-popup-body {
        gap: 0;
    }
    .spp-popup-text p.title-margin{
        margin-bottom:24px;
    }
    .spp-popup-text *[data-style="button"]{
        margin-top:8px;
    }
    .spp-popup-logo img {
        max-width: 180px;
        height: auto;
    }
}

/* Under 992px: single column, narrow popup */
@media (max-width: 992px) {
    #spp-popup-container {
        width: calc(100vw - 48px);
        max-width: 420px;
    }

    .spp-popup-body {
        flex-direction: column;
        gap: 0;
    }
    .spp-popup-text{
        text-align: center;
        padding:24px;
    }
    .spp-popup-text *[data-fontsize="xs"] {
        font-size: 10px;
    }
    .spp-popup-text *[data-fontsize="s"] {
        font-size: 12px;
    }
    .spp-popup-text *[data-fontsize="m"] {
        font-size: 14px;
    }
    .spp-popup-text *[data-fontsize="l"] {
        font-size: 18px;
    }
    .spp-popup-text *[data-fontsize="xl"] {
        font-size: 20px;
    }
    .spp-popup-text *[data-fontsize="xxl"] {
        font-size: 32px;
    }

    .spp-popup-col-image {
        aspect-ratio: auto !important;
    }

    .spp-popup-col-image > img {
        position: static;
        width: 100%;
        height: auto;
        object-fit: initial;
    }

    #spp-popup-close {
        color: #fff;
    }

    .spp-popup-logo img {
        max-width: 160px;
    }

    .spp-img-desktop {
        display: none;
    }

    .spp-img-mobile {
        display: block;
    }

    /* If only desktop image exists, still show it on mobile */
    .spp-img-desktop:only-of-type {
        display: block;
    }

    .spp-logo-desktop {
        display: none;
    }

    .spp-logo-mobile {
        display: inline-block;
    }

    .spp-logo-desktop:only-of-type {
        display: inline-block;
    }
}
