html {
    overflow-y: scroll;
}

.has-overlay {
    overflow: hidden;
}

.has-overlay>body {
    height: 100%;
    overflow-y: scroll;
}

/* Reset CSS for modal.css - Reverts all styles to defaults */
/* Easier to apply new style for popups than to overwrite all styles in modal.css */

.modal-container.modal_reset {
    -webkit-transform: none;
    -moz-transform: none;
    -o-transform: none;
    -ms-transform: none;
    transform: none;
    position: unset;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    opacity: 1;
    color: inherit;
    line-height: normal;
    display: block;
}

.modal-container.modal_reset:target {
    -webkit-transform: none;
    -moz-transform: none;
    -o-transform: none;
    -ms-transform: none;
    transform: none;
    opacity: 1;
    display: block;
}

.is-active.modal-container.modal_reset {
    display: block;
}

.modal-container.modal_reset .modal-inner {
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    width: auto;
    margin-left: 0;
    overflow-x: visible;
    background: transparent;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.modal-container.modal_reset .modal-inner>img,
.modal-container.modal_reset .modal-inner>video,
.modal-container.modal_reset .modal-inner>iframe {
    width: auto;
    height: auto;
    min-height: 0;
}

.modal-container.modal_reset .modal-inner>img {
    width: auto;
    max-width: none;
}

.modal-container.modal_reset header {
    border-bottom: none;
    padding: 0;
}

.modal-container.modal_reset header>h2 {
    margin: 0;
}

.modal-container.modal_reset .modal-content {
    max-height: none;
    border-bottom: none;
    padding: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-container.modal_reset .modal-content>* {
    max-width: none;
}

.modal-container.modal_reset footer {
    border-top: none;
    padding: 0;
}

.modal-container.modal_reset .modal-close {
    display: inline;
    text-indent: 0;
    overflow: visible;
    text-decoration: underline;
    cursor: auto;
}

.modal-container.modal_reset .modal-close:before {
    content: none;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    background: none;
}

.modal-container.modal_reset .modal-close:after {
    content: none;
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    margin-left: 0;
    background: transparent;
    padding: 0;
    font-size: inherit;
    text-decoration: none;
    text-indent: 0;
}

@media screen and (max-width: 690px) {
    .modal-container.modal_reset .modal-inner {
        width: auto;
        left: auto;
        right: auto;
        margin-left: 0;
    }

    .modal-container.modal_reset .modal-close {
        left: auto;
        right: auto;
        margin-left: 0;
    }

    .modal-container.modal_reset .modal-close:after {
        margin-left: 0;
    }
}

@media screen and (max-width: 30em) {
    .modal-container.modal_reset {
        -webkit-transform: none;
        transform: none;
        -webkit-transition: none;
        -moz-transition: none;
        -o-transition: none;
        -ms-transition: none;
        transition: none;
        display: block;
        height: auto;
        bottom: auto;
    }

    .modal-container.modal_reset:target {
        -webkit-transition: none;
        -moz-transition: none;
        -o-transition: none;
        -ms-transition: none;
        transition: none;
    }

    .modal-container.modal_reset:before {
        background-color: transparent;
        content: none;
        position: static;
        top: auto;
        left: auto;
        right: auto;
        z-index: auto;
        height: auto;
        -webkit-box-shadow: none;
        box-shadow: none;
    }

    .modal-container.modal_reset .modal-inner {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        top: auto;
        left: auto;
        right: auto;
        padding-top: 0;
        height: auto;
        overflow: visible;
        -webkit-box-shadow: none;
        box-shadow: none;
    }

    .modal-container.modal_reset .modal-content {
        max-height: none;
    }

    .modal-container.modal_reset .modal-close {
        right: auto;
        text-decoration: underline;
    }

    .modal-container.modal_reset .modal-close:before {
        display: none;
    }

    .modal-container.modal_reset .modal-close:after {
        content: none;
        top: auto;
        left: auto;
        z-index: auto;
        margin-left: 0;
        font-size: inherit;
        padding: 0;
    }
}

@media screen and (max-height: 46em) and (min-width: 30em) {
    .modal-container.modal_reset .modal-content {
        max-height: none;
    }
}

@media screen and (max-height: 36em) and (min-width: 30em) {
    .modal-container.modal_reset .modal-content {
        max-height: none;
    }
}

@media screen and (min-width: 30em) {
    .modal-container.modal_reset {
        -webkit-transition: none;
        -o-transition: none;
        transition: none;
    }
}

/* END: Reset CSS for modal.css */





.modal-container.modal_reset {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000999;
    color: var(--files-text);
    line-height: 1.3;
    -webkit-transform: translate(0, 400px);
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
    -webkit-transition: -webkit-transform .25s ease-in-out, opacity 1ms .25s;
    -moz-transition: -moz-transform .25s ease-in-out, opacity 1ms .25s;
    -o-transition: -o-transform .25s ease-in-out, opacity 1ms .25s;
    -ms-transition: -ms-transform .25s ease-in-out, opacity 1ms .25s;
    transition: transform .25s ease-in-out, opacity 1ms .25s;
    display: none;
    opacity: 0;
    --popup-width: 350px;
    --popup-top: 75px;
    --close-size: 15px;
    --popup-padding: 16px;
}

.modal-container.modal_reset .modal-close {
    display: block;
    overflow: hidden;
    cursor: pointer;
}

.modal-container.modal_reset .modal-close:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000001;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAEElEQVR42gEFAPr/AAAAAMwA0QDNTiUx4gAAAABJRU5ErkJggg==);
    opacity: 0.7;
    display: block;
}

.modal-container.modal_reset .modal-close:after {
    content: '';
    position: absolute;
    z-index: 10000002;
    line-height: 25px;
    border: 0;
    cursor: pointer;
    font-size: 0;
    background: url(/images/popups/close-shadow3.svg) center no-repeat;
    height: var(--close-size);
    width: var(--close-size);
    top: 12px;
    right: 10px;
    padding: 2px 8px;
}

.modal-container.modal_reset .modal-inner {
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    height: calc(100% - 42px);
    background: var(--files-bg);
    z-index: 10000003;
    overflow: auto;
    padding: 0;
}

.modal-container.modal_reset .modal-loader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--files-btn-gray-border);
    background: color-mix(in srgb, var(--files-bg) 50%, transparent);
    font-size: 50px;
    z-index: 1;
}

.modal-container.modal_reset .modal-inner::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.modal-container.modal_reset .modal-inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    box-shadow: rgba(255, 255, 255, 0.3) 0 0 0 1px;
}

.modal-container.modal_reset .modal-inner:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.55);
}


.modal-container.modal_reset .modal-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 20px var(--popup-padding);
}

.modal-container.modal_reset .modal-header .modal-header-main {
    font-size: 22px;
    font-weight: bold;
    line-height: 30px;
}

.modal-container.modal_reset .modal-header .modal-header-small {
    font-size: 16px;
    line-height: 21px;
}

/* If custom width is needed, use modal_reset_custom_width file */

/* min-width = --popup-width + 20px */
@media screen and (min-width: 370px) {
    .modal-container.modal_reset:not(.custom-width) {
        --popup-padding: 30px;
    }

    .modal-container.modal_reset:not(.custom-width) .modal-close:after {
        left: 50%;
        margin-left: calc((var(--popup-width) / 2 - var(--close-size)));
        top: calc(var(--popup-top) - var(--close-size) - 7px);
        background: url(/images/popups/close-shadow3.svg) center no-repeat;
        right: unset;
        padding: 0;
    }

    .modal-container.modal_reset:not(.custom-width) .modal-inner {
        width: var(--popup-width);
        margin-left: calc((var(--popup-width) / 2 * -1));
        left: 50%;
        top: var(--popup-top);
        max-height: calc(100% - calc(var(--popup-top) * 2));
        -webkit-border-radius: 20px;
        -moz-border-radius: 20px;
        border-radius: 20px;
        height: auto;
        -webkit-box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    }
}

/* for smaller screens, smaller gap from top and bottom */
/* min-width = --popup-width + 20px */
/* max-height = --popup-top * 2 + 400px */
@media screen and (max-height: 550px) and (min-width: 370px) {
    .modal-container.modal_reset:not(.custom-width) {
        --popup-top-smaller: 10%;
    }

    .modal-container.modal_reset:not(.custom-width) .modal-close:after {
        top: calc(var(--popup-top-smaller) - var(--close-size) - 7px);
    }

    .modal-container.modal_reset:not(.custom-width) .modal-inner {
        top: var(--popup-top-smaller);
        max-height: calc(100% - calc(var(--popup-top-smaller) * 2));
    }
}