/* WordPress Style Popup CSS - Matching test-wp-modal */
.el-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 9999 !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.el-popup-overlay.el-popup-show {
    opacity: 1;
}

.el-popup-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(1);
    transition: all 0.3s ease;
    font-family: "Lato", sans-serif;
}

.el-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.el-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.el-popup-content {
    padding: 0;
    position: relative;
}

.el-popup-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.el-popup-event-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.el-popup-image {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.el-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.el-popup-placeholder {
    font-size: 48px;
    color: #68776E;
}

.el-popup-details {
    text-align: center;
    padding: 2rem;
}

.el-popup-title {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    position: relative;
    font-family: "Lato", sans-serif;
}

.el-popup-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #68776E, #5a6b5f);
    border-radius: 2px;
}

.el-popup-date {
    color: #68776E;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 18px;
    background: rgba(104, 119, 110, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    display: inline-block;
    border: 2px solid rgba(104, 119, 110, 0.2);
    font-family: "Lato", sans-serif;
}

.el-popup-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    white-space: pre-line;
    font-family: "Lato", sans-serif;
}

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

.el-popup-btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 140px;
    font-family: "Lato", sans-serif;
}

.el-popup-btn-primary {
    background: #000;
    color: white;
    font-size: 16px;
    padding: 15px 30px;
    position: relative;
    overflow: hidden;
}

.el-popup-btn-primary::before {
    content: '';
}

.el-popup-btn-primary:hover {
    background: #333;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: white;
    text-decoration: none;
}

.el-popup-btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.el-popup-btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.el-popup-btn-secondary {
    background: #f8f9fa;
    color: #000;
    border: 2px solid #000;
}

.el-popup-btn-secondary:hover {
    background: #000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* Animation */
.el-popup-overlay.el-popup-show {
    animation: fadeIn 0.3s ease-out;
}

.el-popup-overlay.el-popup-show .el-popup-container {
    animation: slideIn 0.3s ease-out;
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Carousel Styles */
.el-popup-carousel {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none !important;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    display: flex !important;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    opacity: 0;
    font-size: 18px;
}

.el-popup-carousel:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    margin: 0;
    justify-content: center;
}

.el-popup-carousel:hover .carousel-indicators {
    opacity: 1;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .el-popup-container {
        margin: 10px;
        max-width: none;
    }
    
    .el-popup-content {
        padding: 20px;
    }
    
    .el-popup-title {
        font-size: 20px;
    }
    
    .el-popup-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .el-popup-btn {
        min-width: auto;
    }
    
    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }

    .el-popup-carousel {
        height: 200px;
    }
}

/* Accessibility improvements */
.el-popup-overlay:focus-within .el-popup-container {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

.el-popup-btn:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

.el-popup-close:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}