.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.popup-overlay[hidden] {
    display: none;
}

.popup-ctnr {
    width: 100%;
    max-width: 800px;
    margin: auto;
}

.popup-content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
    max-height: 90vh;
    overflow-y: auto;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .3s ease;
    z-index: 10;
}

.popup-close:hover,
.popup-close:focus {
    color: #000;
    outline: 2px solid #000;
    outline-offset: 2px;
}

.popup-header {
    padding: 2rem 3rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.popup-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
}

.popup-body {
    padding: 2rem 3rem;
}

@media (max-width: 768px) {
    .popup-ctnr {
        max-width: 100%;
    }
    
    .popup-header,
    .popup-body {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .popup-close {
        top: 0.75rem;
        right: 0.75rem;
    }
}