/* refined-promo-popup.css v2 */
.ds-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ds-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ds-popup-modal {
    background: #fff;
    width: 90%;
    max-width: 850px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.ds-popup-overlay.active .ds-popup-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.ds-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    /* Slightly smaller icon */
    line-height: 1;
    color: #333;
    cursor: pointer;
    z-index: 20;
    /* Above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ds-popup-close:hover {
    background: #fff;
    color: #000;
    transform: scale(1.1);
}

/* =========================================
   MODE A: Image Only (Full Width)
   ========================================= */
.ds-popup-modal.mode-image-only {
    max-width: 600px;
}

.ds-popup-modal.mode-image-only .ds-popup-body {
    width: 100%;
}

.ds-popup-modal.mode-image-only .ds-popup-image {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   MODE B: Split Layout (Desktop default)
   ========================================= */
.ds-popup-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (min-width: 768px) {
    .ds-popup-modal.mode-split {
        max-width: 900px;
        min-height: 480px;
    }

    .ds-popup-modal.mode-split .ds-popup-body {
        flex-direction: row;
    }

    .ds-popup-modal.mode-split .ds-popup-sidebar {
        width: 55%;
        position: relative;
        background-color: #f0f2f5;
        overflow: hidden;
    }

    .ds-popup-modal.mode-split .ds-popup-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
    }

    .ds-popup-modal.mode-split .ds-popup-content-wrapper {
        width: 45%;
        padding: 48px 32px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: linear-gradient(135deg, #ffffff 0%, #fcfcfc 100%);
    }
}

/* =========================================
   Mobile Layout (Shared)
   ========================================= */
@media (max-width: 767px) {
    .ds-popup-modal {
        width: 92% !important;
        max-width: 92% !important;
    }

    .ds-popup-body {
        flex-direction: column !important;
    }

    .ds-popup-sidebar,
    .ds-popup-image-container {
        width: 100% !important;
        height: auto !important;
        min-height: 180px;
    }

    .ds-popup-image {
        width: 100%;
        height: auto;
        display: block;
    }

    .ds-popup-content-wrapper {
        padding: 24px 20px !important;
        text-align: center;
        width: 100% !important;
    }
}


/* Elements Styling */
.ds-popup-badge {
    display: inline-block;
    background: #eef2ff;
    color: #0d6efd;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    align-self: flex-start;
}

@media (max-width: 767px) {
    .ds-popup-badge {
        align-self: center;
    }
}

.ds-popup-headline {
    font-size: 32px;
    /* Larger heading */
    font-weight: 800;
    color: #111;
    margin: 0 0 16px 0;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.ds-popup-subheadline {
    font-size: 16px;
    color: #555;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.ds-popup-html {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #0d6efd;
}

/* Buttons Row */
.ds-popup-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

@media (max-width: 767px) {
    .ds-popup-actions {
        justify-content: center;
    }
}


.ds-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #fff;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
}

.ds-popup-btn:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.3);
}

.ds-popup-btn-secondary {
    background: transparent;
    color: #555;
    border: 1px solid #ddd;
    box-shadow: none;
    padding: 14px 24px;
}

.ds-popup-btn-secondary:hover {
    background: #f8f9fa;
    color: #333;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}


/* Footer (Don't Show Again + CTA) */
.ds-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fcfcfc;
    border-top: 1px solid #eee;
    gap: 16px;
}

.ds-popup-footer-left {
    display: flex;
    align-items: center;
}

.ds-popup-footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.ds-dont-show-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: #666;
    font-size: 13px;
    transition: color 0.2s;
}

.ds-dont-show-label:hover {
    color: #333;
}

.ds-dont-show-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #0d6efd;
    cursor: pointer;
}

@media (max-width: 767px) {
    .ds-popup-footer {
        flex-direction: column-reverse;
        padding: 20px;
        text-align: center;
    }

    .ds-popup-footer-left,
    .ds-popup-footer-right {
        width: 100%;
        justify-content: center;
    }

    .ds-popup-footer-right .ds-popup-actions {
        width: 100%;
    }

    .ds-popup-footer-right .ds-popup-btn {
        width: 100%;
    }
}

/* Fallback Block */
.ds-popup-fallback-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}