/* Popup Marketing - Responsive CSS */

.popup-marketing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    padding: 20px;
    box-sizing: border-box;
    animation: popupFadeIn 0.3s ease-out;
}

/* Position: Center (default) */
.popup-marketing-overlay.position-center {
    align-items: center;
    justify-content: center;
}

/* Position: Top Right */
.popup-marketing-overlay.position-top-right {
    align-items: flex-start;
    justify-content: flex-end;
}

/* Position: Top Left */
.popup-marketing-overlay.position-top-left {
    align-items: flex-start;
    justify-content: flex-start;
}

/* Position: Bottom Right */
.popup-marketing-overlay.position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

/* Position: Bottom Left */
.popup-marketing-overlay.position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-marketing-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: popupSlideIn 0.3s ease-out;
}

.popup-marketing-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-marketing-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.popup-marketing-content {
    display: flex;
    flex-direction: column;
}

.popup-marketing-image {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
}

.popup-marketing-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.popup-marketing-video {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
}

.popup-marketing-video video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: contain;
    background: #000;
}

.popup-marketing-video iframe {
    width: 100%;
    height: 280px;
    display: block;
    border: none;
}

.popup-marketing-body {
    padding: 24px;
    text-align: center;
}

.popup-marketing-heading {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.popup-marketing-text {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.popup-marketing-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.popup-marketing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: #ffffff !important;
}

.popup-marketing-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.popup-marketing-button-2 {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4) !important;
}

.popup-marketing-button-2:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5) !important;
}

/* Tablet Styles */
@media (max-width: 768px) {
    .popup-marketing-container {
        max-width: 90%;
        margin: 10px;
    }

    .popup-marketing-image {
        max-height: 200px;
    }

    .popup-marketing-video {
        max-height: 200px;
    }

    .popup-marketing-video video {
        max-height: 200px;
    }

    .popup-marketing-body {
        padding: 20px;
    }

    .popup-marketing-heading {
        font-size: 16px;
    }

    .popup-marketing-text {
        font-size: 13px;
        max-height: 120px;
    }

    .popup-marketing-button {
        padding: 12px 28px;
        font-size: 14px;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    .popup-marketing-overlay {
        padding: 10px;
    }

    .popup-marketing-container {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 12px;
    }

    .popup-marketing-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .popup-marketing-image {
        max-height: 180px;
    }

    .popup-marketing-video {
        max-height: 180px;
    }

    .popup-marketing-video video {
        max-height: 180px;
    }

    .popup-marketing-body {
        padding: 16px;
    }

    .popup-marketing-heading {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .popup-marketing-text {
        font-size: 12px;
        margin-bottom: 16px;
        max-height: 100px;
    }

    .popup-marketing-button {
        padding: 10px 24px;
        font-size: 13px;
        width: 100%;
        text-align: center;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .popup-marketing-heading {
        font-size: 14px;
    }

    .popup-marketing-text {
        font-size: 11px;
        max-height: 80px;
    }

    .popup-marketing-body {
        padding: 12px;
    }
}

/* Hide scrollbar when popup is open */
body.popup-marketing-open {
    overflow: hidden;
}

/* Corner positions - smaller popup for corners */
.popup-marketing-overlay.position-top-right .popup-marketing-container,
.popup-marketing-overlay.position-top-left .popup-marketing-container,
.popup-marketing-overlay.position-bottom-right .popup-marketing-container,
.popup-marketing-overlay.position-bottom-left .popup-marketing-container {
    max-width: 380px;
}

/* Mobile: all positions become center */
@media (max-width: 576px) {
    .popup-marketing-overlay.position-top-right,
    .popup-marketing-overlay.position-top-left,
    .popup-marketing-overlay.position-bottom-right,
    .popup-marketing-overlay.position-bottom-left {
        align-items: center;
        justify-content: center;
    }
    
    .popup-marketing-overlay.position-top-right .popup-marketing-container,
    .popup-marketing-overlay.position-top-left .popup-marketing-container,
    .popup-marketing-overlay.position-bottom-right .popup-marketing-container,
    .popup-marketing-overlay.position-bottom-left .popup-marketing-container {
        max-width: 100%;
    }
}
