html {
    min-height: 100vh;
    background-color: var(--body--background-color);
}

:target { scroll-margin-top: 80px; }

::-webkit-scrollbar { width: 14px; height: 18px; }
::-webkit-scrollbar-thumb {
    height: 6px;
    border: 4px solid rgba(0, 0, 0, 0);
    background-clip: padding-box;
    background-color: rgba(0, 0, 0, 0.15);
    -webkit-border-radius: 7px;
}
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background-color: transparent; }

body {
    margin: 0;
    overflow-x: hidden;
    overflow-y: overlay;
    scroll-behavior: smooth;

    --modal-bg-color: rgba(23,23,26,.7);
}

body.modal-open{
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

body img {
    width: 100%;
    display: block;
}

.watermark{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 30px 0;
    margin-top: auto;
    z-index: 10;
}

.watermark > a{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #333 !important;
}

.dark .watermark > a{
    color: #fff !important;
}

.watermark > a:hover{
    opacity: .8;
}

.watermark span{
    font-size: 0.70em;
    line-height: 1.625em;
    text-transform: uppercase;
    margin-bottom: 9px;
    letter-spacing: 1px;
}

.watermark b{
    font-size: 1.125em;
    font-weight: 600;
}

img[data-src]{
    transition: opacity .4s;
    opacity: 0;
}

img[src] {
    opacity: 1;
}


.modal-bg{
    position: fixed !important;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    cursor: pointer;
    z-index: 9999;
    transition: background-color .3s;
    backdrop-filter: blur(1.5px);
}

.modal-bg.active { background-color: var(--modal-bg-color);}

.site-popup {
    position: fixed !important;
    width: 100vw;
    max-height: calc(100vh + 1px);
    top: 50%;
    transform: translateY(calc(-50% - 1px));
    z-index: 9999;
    overflow-y: overlay;
    cursor: pointer;
}

.site-popup_content-wrap {
    width: calc(var(--bt--content-width) + 6px);
    height: 100%;
    max-width: 100vw;
    background-color: var(--body--background-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: auto;
}

.site-popup_content-wrap:not(.full-screen) {
    left: 50%;
    transform: translateX(-50%);
}

.blocktypes-wrapper:not(.mobile) .site-popup_content-wrap:not(.full-screen) { border-radius: 12px !important;}

.site-popup_content-wrap.full-screen {
    border-radius: 0 !important;
    left: 50%;
    transform: translateX(-50%);
}

.site-popup > div {
    padding: 20px 24px;
}

.site-popup_header{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-popup_close-btn{
    position: fixed !important;
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    background-color: var(--body--background-color);
    border-radius: 50px;
    border: none;
    outline: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.site-popup_close-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--bt--text-color);
    opacity: .5;
}

.site-popup_header:empty,
.site-popup_footer:empty {
    display: none;
}

.fancybox-container {
    width: 100vw !important;
}

.fancybox-bg, .fancybox-inner, .fancybox-outer, .fancybox-stage {
    position: fixed !important;
}

.fancybox-bg{
    background: var(--modal-bg-color) !important;
    backdrop-filter: blur(1.5px) !important;
}

.fancybox-is-open .fancybox-bg {
    opacity: 1 !important;
}

.fancybox-content{
    overflow: hidden !important;
    border-radius: 8px !important;
    background-color: #fff !important;
}

.fancybox-slide {
    padding: 17px !important;
}

.fancybox-button{
    background-color: transparent !important;
}

.fancybox-button--close{
    padding: 15px !important;
    margin: 8px !important;
}

.fancybox-button--arrow_right{
    width: auto !important;
    padding-right: 52px !important;
}

.fancybox-button--arrow_right svg{
    width: 18px !important;
    height: 32px !important;
}

.fancybox-button--arrow_left{
    width: auto !important;
    padding-left: 52px !important;
}

.fancybox-button--arrow_left svg{
    width: 18px !important;
    height: 32px !important;
}

.mobile .fancybox-button--arrow_right,
.mobile .fancybox-button--arrow_left {
    display: none;
}

.history_container{
    position: fixed !important;
    top: 0;
    left: 0;
    z-index: 3;
    padding: 24px;
    max-width: 250px;
    transition: opacity .15s;
    display: flex;
}

.history_container:hover {
    opacity: .8;
}

.history_arrow {
    margin-right: 10px;
}

.history_arrow svg {
    width: 10px;
    height: 7px;
    transform: rotate(-90deg);
    fill: var(--bt--title-color);
    top: -2.5px;
    opacity: .85;
}

.history_container .history_title {
    color: var(--bt--title-color);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}