/**
 * Alosmania — Premium Dynamic Popup CSS
 * Responsive design with scale-in and backdrop-blur animations
 * Supports dynamic CSS --accent brand variable
 */

#popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
}

.popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px;
}

.popup-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-card {
    position: relative;
    max-width: 550px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s;
    opacity: 0;
    overflow: hidden;
}

.popup-backdrop.active .popup-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Image Popup Styles */
.popup-card-image {
    max-width: 500px;
    background: transparent;
    box-shadow: none;
    border-radius: 12px;
}

.popup-card-image .popup-close-btn {
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

/* Close Button Styles */
.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    color: #4b5563;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.popup-close-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: rotate(90deg);
}

.popup-link {
    display: block;
    width: 100%;
    height: 100%;
}

.popup-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease;
}

.popup-card-image .popup-link:hover .popup-img {
    transform: scale(1.02);
}

/* Text & HTML Content Styles */
.popup-text-content {
    padding: 40px 30px 30px;
    text-align: center;
    font-family: 'DM Sans', 'Inter', sans-serif;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.6;
}

.popup-text-content h1, 
.popup-text-content h2, 
.popup-text-content h3, 
.popup-text-content h4 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 700;
}

.popup-text-content p {
    margin-bottom: 20px;
    color: #4b5563;
}

/* Customize buttons inside text popup */
.popup-text-content .btn, 
.popup-text-content button {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent);
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.popup-text-content .btn:hover, 
.popup-text-content button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive Queries */
@media (max-width: 576px) {
    .popup-backdrop {
        padding: 15px;
    }
    
    .popup-card {
        border-radius: 12px;
    }
    
    .popup-text-content {
        padding: 35px 20px 25px;
        font-size: 14px;
    }
    
    .popup-close-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
}
