/* Pop-up Overlay */
.sub-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--sub-popup-overlay-color, rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sub-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Pop-up Container */
.sub-popup-container {
    background-color: var(--sub-popup-bg-color, #ffffff);
    padding: 30px 40px;
    border-radius: var(--sub-popup-border-radius, 12px);
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.visible .sub-popup-container {
    transform: scale(1);
}

/* Pop-up Content */
.sub-popup-container h2 {
    color: var(--sub-popup-title-color, #1e293b);
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 10px;
}

.sub-popup-container p {
    color: var(--sub-popup-text-color, #475569);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Close Button */
.sub-popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background-color: var(--sub-popup-close-btn-bg-color, #f1f5f9);
    color: var(--sub-popup-close-btn-color, #64748b);
    border-radius: 50%;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.sub-popup-close-btn:hover {
    background-color: #e2e8f0;
}

/* No Thanks Link */
.sub-popup-no-thanks {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
}

.sub-popup-no-thanks:hover {
    text-decoration: underline;
}

/* Floating Re-open Button */
.sub-reopen-popup-btn {
    position: fixed;
    bottom: 20px;
    /* 'left' or 'right' is set via inline style in JS */
    padding: 12px 24px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99997;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */

    /* Apply form button COLORS only */
    background: var(--sub-button-bg, linear-gradient(135deg, #667eea, #764ba2));
    color: var(--sub-button-text-color, white);
    border-radius: 50px; /* Keep original round shape */
    font-size: var(--sub-reopen-btn-fontsize, 16px);
    /* This button is now shown/hidden via display property in JS, no transition */
}

.sub-reopen-popup-btn .dashicons {
    line-height: 1;
    height: auto;
    width: auto;
}

/* Animations */
.fade-in { animation: subFadeIn 0.4s ease-out forwards; }
.fade-out { animation: subFadeOut 0.4s ease-in forwards; }
.slide-in-up { animation: subSlideInUp 0.5s ease-out forwards; }
.slide-out-down { animation: subSlideOutDown 0.5s ease-in forwards; }

@keyframes subFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes subFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes subSlideInUp { from { opacity: 0; transform: translateY(30px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes subSlideOutDown { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(30px) scale(0.98); } }