/* Popup/Modal - Shared Component Styles */

/* Popup Modal */
.popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.popup-content {
    position: relative;
    z-index: 2001;
    background: var(--card);
    border-radius: 1.5rem;
    overflow: hidden;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: popupSlideIn 0.3s ease;
}

.popup-content .popup-scrollable-content {
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2002;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.popup-menu-btn {
    position: absolute;
    top: 1rem;
    right: 4rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2002;
}

.popup-menu-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.popup-menu-dropdown {
    position: absolute;
    top: 4rem;
    right: 1rem;
    background: var(--card);
    border: 1.5px solid var(--secondary);
    border-radius: 0.75rem;
    padding: 0.5rem;
    z-index: 2003;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 150px;
}

.popup-menu-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
}

.popup-menu-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Fullscreen Image Modal */
.fullscreen-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.fullscreen-image-modal img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}

.fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary);
    font-size: 2rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 5001;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-scrollable-content {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Filter Popup */
.filter-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.filter-popup-content {
    background: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.filter-popup-content.large-popup {
    max-width: 600px;
}

.filter-popup-content h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.close-popup-btn,
.apply-filter-btn {
    width: 100%;
    padding: 0.875rem;
    margin-top: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.apply-filter-btn {
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    color: var(--primary);
}

.apply-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.close-popup-btn {
    background: var(--background);
    color: var(--primary);
    border: 1.5px solid var(--secondary);
}

.close-popup-btn:hover {
    background: var(--card);
    border-color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .popup-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .filter-popup-content {
        padding: 1.5rem;
    }
}

