/**
 * Popup Manager CSS
 * Responsive popup styling with animations and size variants
 */

/* Overlay */
.popup-manager-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-manager-overlay.popup-manager-show {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.popup-manager-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8) translateY(-20px);
    transition: transform 0.3s ease;
}

.popup-manager-overlay.popup-manager-show .popup-manager-container {
    transform: scale(1) translateY(0);
}

/* Size variants */
.popup-manager-container.popup-size-xs {
    width: 300px;
    min-height: 200px;
}

.popup-manager-container.popup-size-s {
    width: 400px;
    min-height: 250px;
}

.popup-manager-container.popup-size-m {
    width: 500px;
    min-height: 300px;
}

.popup-manager-container.popup-size-l {
    width: 600px;
    min-height: 400px;
}

.popup-manager-container.popup-size-xl {
    width: 800px;
    min-height: 500px;
}

/* Popup Content */
.popup-manager-content {
    position: relative;
    width: 100%;
    height: 100%;
}



.popup-manager-overlay.popup-manager-show .popup-manager-container {
    max-height: 100vh;
    overflow-y: auto !important;
  }
/* Close Button */
.popup-manager-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding-bottom: 4px;
    backdrop-filter: blur(10px);
    color: white !important;
    background-color: #0202022b;
}

.popup-manager-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Image */
.popup-manager-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 100%;
}

/* Button Container */
.popup-manager-button-container {
    position: absolute;
    z-index: 5;
}

.popup-manager-button-container.position-top-left {
    top: 20px;
    left: 20px;
}

.popup-manager-button-container.position-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.popup-manager-button-container.position-top-right {
    top: 20px;
    right: 20px;
}

.popup-manager-button-container.position-center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.popup-manager-button-container.position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popup-manager-button-container.position-center-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.popup-manager-button-container.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.popup-manager-button-container.position-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.popup-manager-button-container.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

/* Custom Button */
.popup-manager-custom-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.3);
}

.popup-manager-custom-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.4);
}

.popup-manager-custom-button:active {
    transform: translateY(0);
}

/* Never Show Again */
.popup-manager-never-show {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.popup-manager-never-show-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.popup-manager-never-show-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .popup-manager-container {
        width: 95vw !important;
        max-width: 95vw;
        margin: 20px;
    }
    
    .popup-manager-container.popup-size-xs,
    .popup-manager-container.popup-size-s,
    .popup-manager-container.popup-size-m,
    .popup-manager-container.popup-size-l,
    .popup-manager-container.popup-size-xl {
        width: 95vw;
        min-height: auto;
    }
    
    .popup-manager-button-container.position-top-left,
    .popup-manager-button-container.position-top-right {
        top: 10px;
    }
    
    .popup-manager-button-container.position-top-left,
    .popup-manager-button-container.position-bottom-left {
        left: 10px;
    }
    
    .popup-manager-button-container.position-top-right,
    .popup-manager-button-container.position-bottom-right {
        right: 10px;
    }
    
    .popup-manager-button-container.position-bottom-left,
    .popup-manager-button-container.position-bottom-right {
        bottom: 10px;
    }
    
    .popup-manager-custom-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .popup-manager-container {
        margin: 10px;
        border-radius: 6px;
    }
    
    .popup-manager-custom-button {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .popup-manager-close {
        top: 5px;
        right: 10px;
        font-size: 20px;
    }
}

/* Animation keyframes */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .popup-manager-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .popup-manager-overlay {
        display: none !important;
    }
}

/* Test popup specific styles */
.test-popup-overlay {
    z-index: 10000 !important; /* Higher than normal popups */
}

.test-popup-overlay .popup-manager-container {
    border: 3px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

/* Test mode watermark */
.test-popup-watermark {
    position: absolute !important;
    top: 5px !important;
    left: 5px !important;
    background: rgba(255, 0, 0, 0.9) !important;
    color: white !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    border-radius: 3px !important;
    z-index: 20 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
}

/* Test popup animations */
.test-popup-overlay.popup-manager-show {
    animation: testPopupPulse 0.5s ease-in-out;
}

@keyframes testPopupPulse {
    0% {
        background-color: rgba(0, 0, 0, 0.7);
    }
    50% {
        background-color: rgba(255, 0, 0, 0.1);
    }
    100% {
        background-color: rgba(0, 0, 0, 0.7);
    }
}

/* Content popup specific styles */
.popup-manager-content-container {
    padding: 20px;
    text-align: center;
}

.popup-manager-shop-logo {
    max-width: 150px;
    height: auto;
    margin: 0 auto 15px;
    display: block;
}

.popup-manager-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.2;
}

.popup-manager-text-content {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

.popup-manager-text-content p {
    margin-bottom: 10px;
}

.popup-manager-text-content strong,
.popup-manager-text-content b {
    color: #333;
    font-weight: bold;
}

.popup-manager-text-content em,
.popup-manager-text-content i {
    font-style: italic;
}

.popup-manager-text-content ul,
.popup-manager-text-content ol {
    text-align: left;
    display: inline-block;
    margin: 10px 0;
}

.popup-manager-text-content ul li,
.popup-manager-text-content ol li {
    margin-bottom: 5px;
}

/* Responsive adjustments for content popups */
@media (max-width: 768px) {
    .popup-manager-shop-logo {
        max-width: 120px;
    }
    
    .popup-manager-title {
        font-size: 20px;
    }
    
    .popup-manager-text-content {
        font-size: 14px;
    }
    
    .popup-manager-content-container {
        padding: 15px;
    }
} 