/* popup-content.css */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #fff;
    max-width: 90%;
    width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
    color: #333;
}

.popup-close:hover,
.popup-close:focus {
    color: #000;
    outline: none;
}

.popup-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popup-inner {
    padding: 20px 0;
}

.popup-open .admin-bar .popup-content {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    .popup-open .admin-bar .popup-content {
        margin-top: 46px;
    }
}

/* Loading animation */
.popup-loader::after {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .popup-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .popup-close {
        font-size: 1.75rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Accessibility focus states */
.popup-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Scrollbar styling for popup content */
.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}