/* Popup Overlay/Dim */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    /* Use Grid for robust centering */
    display: grid !important;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Container */
.popup-modal {
    background: #fff;
    width: 500px;
    /* Default width, can be overridden via JS */
    max-width: 90%;
    max-height: 90vh;
    /* Prevent overflow on small screens */
    margin: auto;
    /* Fallback for centering */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Slider/Carousel Structure */
.popup-slider-container {
    width: 100%;
    /* Fill remaining height to push footer down */
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    /* To vertically center slide if needed, or just contain track */
    flex-direction: column;
}

.popup-slider-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%;
}

.popup-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 20px;
}

/* Header & Footer */
.popup-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.popup-footer {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* Controls (Arrows & Dots) */
.popup-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px 10px;
    color: #555;
    transition: color 0.2s;
}

.popup-nav-btn:hover {
    color: #000;
}

.popup-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
}

.popup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.2s;
}

.popup-dot.active {
    background: #333;
}

/* Checkbox Label */
.popup-dont-show-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
}

.popup-close-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}