#fancybox-overlay {
    background-color: #777777;
    opacity: 0.7;
    cursor: pointer;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
}

#fancybox-wrap {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    z-index: 1101;
    outline: none;
    display: block;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 60px);
}

#fancybox-outer {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

#fancybox-content {
    border: 10px solid #ffffff;
}

#fancybox-content button {
    border: unset;
    padding: unset;
    background-color: transparent;
    position: absolute;
    cursor: pointer;
    display: block;
}

#fancybox-img {
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 160px);
}

#fancybox-close {
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: transparent url("img/fancybox.png") -40px 0;
    z-index: 1103;
}

#fancybox-left, #fancybox-right {
    top: 0;
    width: 35%;
    height: 100%;
    z-index: 1102;
    opacity: 0;
    transition: opacity .2s;
}

#fancybox-left {
    left: 0;
}

#fancybox-right {
    right: 0;
}

:is(#fancybox-left,#fancybox-right):is(:hover,:focus-within) {
    opacity: 1;
}

:is(#fancybox-left,#fancybox-right) > .icon {
    position: absolute;
    top: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    background-image: url("img/fancybox.png");
}

#fancybox-left > .icon {
    left: 15px;
    background-position: -40px -30px;
}

#fancybox-right > .icon {
    right: 15px;
    background-position: -40px -60px;
}

#fancybox-title {
    background-color: #ffffff;
    color: #4d4d4d;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    text-align: center;
}
