.popup-default {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    padding: var(--area-box) 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    padding: 10px;
}

.popup-default-item {
    display: flex;
    margin: auto;
    padding: calc(var(--area-box) * 1.5);
    background: #ffffff;
    -webkit-border-radius: var(--radius-normal);
    -moz-border-radius: var(--radius-normal);
    border-radius: var(--radius-normal);
}

.popup-default{
    display: none;
}

a.popup-default-item:not(:first-of-type) {
    display: none;
}

h2.popup-default-h2 {
    padding: 10px;
    font-size: 18px;
    color: #000;
}


.popup-default-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e1e1e1;
}

button.close-popup-btn {
    margin: 10px;
    font-size: 16px;
    padding: 10px 20px;
    background: #F44336;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

a.popup-default-item {
    background: #fff;
    padding: 5px;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    /* No max-height here */
    overflow: hidden;
}

.popup-default-img {
    max-height: calc(90vh - 60px);  /* Setting max-height here */
    width: auto;
    height: auto;
    object-fit: contain;
    max-width: 100%;
}