@keyframes win-open{
    from{
        opacity: 0;
        transform: scale(0.92);
    }
}

@keyframes win-close{
    to{
        opacity: 0;
        transform: scale(0.92);
    }
}

@keyframes win-max{
    from{
        transform: scale(0.92);
    }
}

@keyframes win-min{
    from{
        transform: scale(1.08);
    }
}

.winbox {
    position: fixed;
    left: 0;
    top: 0;
    background: #fff;
    box-shadow: 2px 2px 16px 4px #0005;

    contain: layout size;
    text-align: left;
    touch-action: none;

    outline: solid 1px var(--accent-color);
}

.winbox.min{
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.winbox.res{
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}
/*
.winbox.res .wb-body{
    opacity: 0;
}
*/
.winbox.open{
    animation: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1) win-open;
    transform-origin: center center !important;
    pointer-events: none;
}

.winbox.close{
    animation: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1) win-close;
    transform-origin: center center !important;
    pointer-events: none;
}

.winbox.maxim{
    animation: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1) win-max;
    transform-origin: center center !important;
    pointer-events: none;
}

.winbox.minim{
    animation: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1) win-min;
    transform-origin: center center !important;
    pointer-events: none;
}

.winbox.color{
    background: var(--accent-color);
}

.winbox.dark-window{
    background: #000;
}

.winbox.acrylic{
    background: #fff8;
    backdrop-filter: blur(8px);
}

.winbox.dark-window.acrylic{
    background: #111c;
    backdrop-filter: blur(8px);
}

.winbox.dark-window .wb-body{
    background: #111;
    color: #fff;
}

.winbox.acrylic .wb-body, .winbox.opaque .wb-body{
    background: none;
}

.winbox:not(.focus) {
    box-shadow: 2px 2px 16px 4px #0003;
    outline: solid 1px #7f7f7fcc;
    background: #fff;
    backdrop-filter: none;
}

.winbox.dark:not(.focus) {
    background: #202020;
}

.winbox.dark .wb-control .icon{
    filter: invert(1);
}

.winbox.dark .wb-header{
    color: #fff;
}

.winbox:not(.focus) .wb-title, .winbox:not(.focus) .wb-icon, .winbox:not(.focus) .wb-control > *{
    opacity: 0.5;
}

.winbox.max{
    outline: none;
}

.winbox.min{
    opacity: 0;
    scale: 0.25;
}

.winbox.no-max.no-min .wb-header{
    height: 24px;
    line-height: 24px;
    padding-left: 4px;
}

.winbox.no-max.no-min .wb-body{
    top: 24px;
}

.winbox:not(.static-nonclient-area).max .wb-header{
    height: 24px;
    line-height: 24px;
    padding-left: 4px;
}

.winbox:not(.static-nonclient-area).max .wb-body{
    top: 24px;
}

.winbox.inset-client-area .wb-body{
    top: 0;
}

.wb-header {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 30px;
    line-height: 30px;
    color: #000;
    overflow: hidden;
    padding-left: 8px;
    box-sizing: border-box;
    z-index: 1;
}

.wb-body {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
    will-change: contents;
    background: #f0f0f0;
    /* when no border is set there is some thin line visible */
    /* always hide top border visually */
    margin-top: 0 !important;
    contain: strict;
    z-index: 0;
}

.winbox.transparent-body .wb-body{
    background: transparent;
}

/*
body > .wb-body{
  position: relative;
  display: inline-block;
  visibility: hidden;
  contain: none;
}
*/
.wb-drag {
    height: 100%;
}

.winbox.caption-1btn-region .wb-drag{
    width: calc(100% - (138px + (46px * 1)));
}

.winbox.caption-2btn-region .wb-drag{
    width: calc(100% - (138px + (46px * 2)));
}

.winbox.caption-expand .wb-header{
    pointer-events: none;
}

.winbox.caption-expand .wb-drag{
    pointer-events: all;
}

.winbox.caption-expand .wb-control{
    pointer-events: all;
}

.wb-title {
    font-family: "Segoe UI", "SUI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 8.75pt;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-icon {
    display: none;
    width: 16px;
    height: 100%;
    margin: 0px 4px 0px 0px;
    float: left;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: center;
    text-align: center;
    font-family: "SMDL2", "Segoe MDL2 Assets";
    font-size: 16px;
}

.icon-always-opaque .wb-icon{
    opacity: 1 !important;
}

.wb-n {
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 10px;
    cursor: n-resize;
    z-index: 2;
}

.wb-e {
    position: absolute;
    top: 0;
    right: -5px;
    bottom: 0;
    width: 10px;
    cursor: w-resize;
    z-index: 2;
}

.wb-s {
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 10px;
    cursor: n-resize;
    z-index: 2;
}

.wb-w {
    position: absolute;
    top: 0;
    left: -5px;
    bottom: 0;
    width: 10px;
    cursor: w-resize;
    z-index: 2;
}

.wb-nw {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 15px;
    height: 15px;
    cursor: nw-resize;
    z-index: 2;
}

.wb-ne {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    cursor: ne-resize;
    z-index: 2;
}

.wb-sw {
    position: absolute;
    bottom: -5px;
    left: -5px;
    width: 15px;
    height: 15px;
    cursor: ne-resize;
    z-index: 2;
}

.wb-se {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    cursor: nw-resize;
    z-index: 2;
}

.wb-control {
    display: grid;
    grid-template-columns: repeat(3, 46px);
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    z-index: 4;
}

.wb-control>* {
    display: inline-block;
    width: 46px;
    height: 100%;
    max-width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s linear;
    transition-property: background;
}

.wb-control>*:hover {
    transition: 0.05s linear;
    opacity: 1 !important;
}

.wb-control>*:active {
    transition: 0s linear;
    opacity: 1 !important;
}

.winbox.dark .wb-control>*:hover {
    background: #fff2;
}

.winbox.dark .wb-control>*:active {
    background: #fff4;
}

.winbox:not(.focus) .wb-control>*:hover, .wb-control>*:hover{
    background: #0002;
}

.winbox:not(.focus) .wb-control>*:active, .wb-control>*:active{
    background: #0004;
}

@media (-webkit-device-pixel-ratio: 1.5),
(device-pixel-ratio: 1.5),
(-webkit-device-pixel-ratio: 2),
(device-pixel-ratio: 2),
(-webkit-device-pixel-ratio: 3),
(device-pixel-ratio: 3) {
    .wb-control * .icon {
        width: 8px;
        height: 8px;
        image-rendering: pixelated;
    }
}

.winbox.no-max.no-min .wb-control{
    grid-template-columns: repeat(1, 32px);
}

.wb-min {}

.wb-max {}

.wb-close {}

.wb-close:hover {
    background: #E81123 !important;
}

.wb-close:active {
    background: #F1707A !important;
}

.wb-close:active .icon, .wb-close:hover .icon{
    filter: invert(1);
}

.wb-res, .winbox.max .wb-max {
    display: none;
}

.winbox.max .wb-res{
    display: flex;
}

/*
.winbox:not(.max) .wb-max {
  background-image: url(@restore);
  background-size: 20px auto;
  background-position: center bottom 5px;
}
*/
/*
.winbox:fullscreen{
  transition: none !important;
}
.winbox:fullscreen .wb-full{
  background-image: url(@minimize);
}
.winbox:fullscreen > div,
.winbox:fullscreen .wb-title,
*/
.winbox.modal .wb-body~div,
.winbox.modal .wb-drag,
.winbox.min .wb-body~div,
.winbox.max .wb-body~div {
    pointer-events: none;
}

.winbox.max .wb-drag {
    cursor: default;
}

.winbox.min .wb-drag {
    cursor: default;
}

.winbox.hide {
    display: none;
}

.winbox.max {
    box-shadow: none;
}

.winbox.max .wb-body {
    margin: 0 !important;
}

.winbox iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0;
}

body.wb-lock .winbox {
    will-change: left, top, width, height;
    transition: none;
}

body.wb-lock iframe {
    pointer-events: none;
}

.winbox.modal:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
}

.winbox.modal:after {
    content: "";
    position: absolute;
    top: -50vh;
    left: -50vw;
    right: -50vw;
    bottom: -50vh;
    background: #0d1117;
    animation: wb-fade-in 0.2s ease-out forwards;
    z-index: -1;
}

.winbox.modal .wb-min,
.winbox.modal .wb-max,
.winbox.modal .wb-full {
    display: none;
}

@keyframes wb-fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 0.85;
    }
}

.no-animation {
    transition: none;
}

.no-shadow {
    box-shadow: none;
}

.no-header .wb-header {
    display: none;
}

.no-header .wb-body {
    top: 0;
}

.no-min .wb-min {
    display: none;
}

.no-max .wb-max {
    display: none;
}

.no-full .wb-full {
    display: none;
}

.no-close .wb-close {
    display: none;
}

.no-resize .wb-body~div {
    display: none;
}

.no-move:not(.min) .wb-title {
    pointer-events: none;
}

.wb-body .wb-hide {
    display: none;
}

.wb-show {
    display: none;
}

.wb-body .wb-show {
    display: revert;
}

.close-ok .wb-close .icon{
    display: none;
}

.close-ok .wb-control{
    display: block;
}

.close-ok .wb-header{
    position: unset;
}

.close-ok .wb-close{
    background: #e1e1e1;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 2px #0078d7;
    width: 75px;
    height: 24px;
    transition: 0.4s;
    opacity: 1 !important;
    display: block;
    position: absolute;
    max-width: none;
    bottom: 8px;
    right: 8px;
}

.winbox.close-ok:not(.focus) .wb-close{
    box-shadow: inset 0 0 0 1px #adadad;
    transition: 0s;
}

.close-ok .wb-close:hover{
    background: #e5f1fb !important;
    box-shadow: inset 0 0 0 1px #0078d7;
}

.close-ok .wb-close:active{
    background: #cce4f7 !important;
    box-shadow: inset 0 0 0 1px #005499;
    transition: 0.3s;
}

.close-ok .wb-close::before{
    content: "OK";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    font-size: 8.75pt;
    text-align: center;
}