/* Frontend Popup Styles */
.wp-popup-ad {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.popup-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
    line-height: 1;
}

.popup-close:hover {
    color: #000;
}

/* Modal Popup */
.wp-popup-modal {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-popup-modal .popup-content {
    max-width: 500px;
    margin: 20px;
    padding: 30px;
    text-align: center;
}

/* Slide-in Popup */
.wp-popup-slide-in {
    bottom: 20px;
    right: 20px;
    width: 350px;
    animation: slideInUp 0.5s ease-out;
}

.wp-popup-slide-in .popup-content {
    padding: 20px;
}

/* Fullscreen Popup */
.wp-popup-fullscreen {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.wp-popup-fullscreen .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    padding: 40px;
    text-align: center;
}

/* Top Bar Popup */
.wp-popup-topbar {
    top: 0;
    left: 0;
    width: 100%;
    animation: slideInDown 0.5s ease-out;
}

.wp-popup-topbar .popup-content {
    border-radius: 0;
    padding: 15px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.wp-popup-topbar .popup-close {
    position: relative;
    top: auto;
    right: auto;
    margin-left: 20px;
}

/* Exit Intent Popup */
.wp-popup-exit-intent {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-popup-exit-intent .popup-content {
    max-width: 450px;
    margin: 20px;
    padding: 35px;
    text-align: center;
    animation: bounceIn 0.6s ease-out;
}

/* Content Styles */
.popup-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
}

.popup-text {
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.5;
}

.popup-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

.popup-video {
    margin: 15px 0;
}

.popup-video iframe {
    width: 100%;
    max-width: 400px;
    height: 225px;
    border-radius: 5px;
}

.popup-button {
    display: inline-block;
    padding: 12px 30px;
    margin: 15px 0;
    background: #007cba;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white !important;
}

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Prevent body scroll when popup is active */
body.popup-active {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-popup-modal .popup-content,
    .wp-popup-fullscreen .popup-content,
    .wp-popup-exit-intent .popup-content {
        max-width: 90%;
        padding: 20px;
    }

    .wp-popup-slide-in {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    .popup-title {
        font-size: 20px;
    }

    .popup-text {
        font-size: 14px;
    }

    .popup-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wp-popup-slide-in {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .popup-video iframe {
        height: 180px;
    }
}