/* =========================
   LAYOUT
   ========================= */

.canvas-zoom-controls {
    position: fixed;
    right: 12px;
    bottom: 90px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.zoom-control-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background: #fff;
    /* border: 2px solid #d8d8d8; */
    /* border-radius: 14px; */
    border-radius: 8px;
    /* box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10); */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.zoom-control-btn {
    appearance: none;
    border: 0;
    background: #fff;
    color: #222;
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.zoom-control-btn:focus {
    outline: none;
}

.zoom-step-btn {
    width: 52px;
    height: 52px;
    line-height: 1;
    flex: 0 0 auto;
}

.zoom-reset-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    /* border: 2px solid #d8d8d8; */
    border-radius: 10px;
    background: #fff;
    /* box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10); */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* .zoom-step-btn+.zoom-track-wrap,
.zoom-track-wrap+.zoom-step-btn {
    border-top: 1px solid #ececec;
} */

/* =========================
   SLIDER
   ========================= */

.zoom-track-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 210px;
}

.zoom-scale-labels {
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 16px;
    pointer-events: none;
}

.zoom-scale-labels span {
    position: absolute;
    right: 0;
    font-size: 10px;
    line-height: 1;
    color: #eeeeee;
    /* color: #fff; */
    font-weight: 500;
    transform: translateY(50%);
    transition: color 0.15s ease, transform 0.15s ease;
}

.zoom-scale-labels span:nth-child(1) {
    bottom: 100%;
}

.zoom-scale-labels span:nth-child(2) {
    bottom: 83.3333%;
}

.zoom-scale-labels span:nth-child(3) {
    bottom: 66.6666%;
}

.zoom-scale-labels span:nth-child(4) {
    bottom: 50%;
}

.zoom-scale-labels span:nth-child(5) {
    bottom: 33.3333%;
}

.zoom-scale-labels span:nth-child(6) {
    bottom: 16.6666%;
}

.zoom-scale-labels span:nth-child(7) {
    bottom: 0%;
}

.zoom-scale-labels span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(100% + 4px);
    width: 14px;
    height: 1px;
    background: #d0d0d0;
    transform: translateY(-50%);
}

.zoom-scale-labels span.is-active {

    color: #1a73e8;
    font-weight: 700;
}

.zoom-scale-labels span.is-active::after {
    height: 2px;
    background: #1a73e8;
}

.zoom-track {
    position: absolute;
    right: 25px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 999px;
    background: #e3e3e3;
    cursor: pointer;
    touch-action: none;
}

.zoom-track-fill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0;
    border-radius: 999px;
    background: #1a73e8;
    pointer-events: none;
}

.zoom-thumb {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #1a73e8;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, 50%);
    cursor: grab;
    touch-action: none;
}

.zoom-thumb.is-dragging {
    cursor: grabbing;
}

/* =========================
   ICONS
   ========================= */

.zoom-plus,
.zoom-minus,
.zoom-reset-icon {
    position: relative;
}

.zoom-plus::before,
.zoom-plus::after,
.zoom-minus::before,
.zoom-minus::after,
.zoom-reset-icon::before,
.zoom-reset-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
    image-rendering: pixelated;
}

/* PLUS */

.zoom-plus::before {
    width: 16px;
    height: 16px;
    opacity: 1;
    background:
        linear-gradient(#151923, #151923) left center / 4px 4px no-repeat,
        linear-gradient(#151923, #151923) center center / 4px 4px no-repeat,
        linear-gradient(#151923, #151923) right center / 4px 4px no-repeat,
        linear-gradient(#151923, #151923) center top / 4px 4px no-repeat,
        linear-gradient(#151923, #151923) center bottom / 4px 4px no-repeat;
}

.zoom-plus::after {
    width: 24px;
    height: 24px;
    opacity: 0;
    background:
        linear-gradient(#00adef, #00adef) left center / 6px 6px no-repeat,
        linear-gradient(#00adef, #00adef) center center / 6px 6px no-repeat,
        linear-gradient(#00adef, #00adef) right center / 6px 6px no-repeat,
        linear-gradient(#00adef, #00adef) center top / 6px 6px no-repeat,
        linear-gradient(#00adef, #00adef) center bottom / 6px 6px no-repeat;
}

.zoom-plus:hover::before {
    background:
        linear-gradient(#00adef, #00adef) left center / 4px 4px no-repeat,
        linear-gradient(#00adef, #00adef) center center / 4px 4px no-repeat,
        linear-gradient(#00adef, #00adef) right center / 4px 4px no-repeat,
        linear-gradient(#00adef, #00adef) center top / 4px 4px no-repeat,
        linear-gradient(#00adef, #00adef) center bottom / 4px 4px no-repeat;
}

.zoom-plus:active::before {
    opacity: 0;
}

.zoom-plus:active::after {
    opacity: 1;
}

/* MIN */

.zoom-minus::before {
    width: 16px;
    height: 4px;
    opacity: 1;
    background:
        linear-gradient(#151923, #151923) left center / 4px 4px no-repeat,
        linear-gradient(#151923, #151923) center center / 4px 4px no-repeat,
        linear-gradient(#151923, #151923) right center / 4px 4px no-repeat;
}

.zoom-minus::after {
    width: 10px;
    height: 2px;
    opacity: 0;
    background:
        linear-gradient(#00adef, #00adef) left center / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) center center / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) right center / 2px 2px no-repeat;
}

.zoom-minus:hover::before {
    background:
        linear-gradient(#00adef, #00adef) left center / 4px 4px no-repeat,
        linear-gradient(#00adef, #00adef) center center / 4px 4px no-repeat,
        linear-gradient(#00adef, #00adef) right center / 4px 4px no-repeat;
}

.zoom-minus:active::before {
    opacity: 0;
}

.zoom-minus:active::after {
    opacity: 1;
}

/* RESET */

.zoom-reset-icon {
    position: relative;
}

.zoom-reset-icon::before,
.zoom-reset-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
    image-rendering: pixelated;
}

.zoom-reset-icon::before {
    width: 22px;
    height: 22px;
    opacity: 1;
    background:
        linear-gradient(#151923, #151923) left top / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) 5px top / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) left 5px / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) right top / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) calc(100% - 5px) top / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) right 5px / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) left bottom / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) 5px bottom / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) left calc(100% - 5px) / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) right bottom / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) calc(100% - 5px) bottom / 3px 3px no-repeat,
        linear-gradient(#151923, #151923) right calc(100% - 5px) / 3px 3px no-repeat;
}

.zoom-reset-icon:hover::before {
    background:
        linear-gradient(#00adef, #00adef) left top / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) 5px top / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) left 5px / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) right top / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) calc(100% - 5px) top / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) right 5px / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) left bottom / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) 5px bottom / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) left calc(100% - 5px) / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) right bottom / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) calc(100% - 5px) bottom / 3px 3px no-repeat,
        linear-gradient(#00adef, #00adef) right calc(100% - 5px) / 3px 3px no-repeat;
}

.zoom-reset-icon::after {
    width: 14px;
    height: 14px;
    opacity: 0;
    background:
        linear-gradient(#00adef, #00adef) left top / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) 4px top / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) left 4px / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) right top / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) calc(100% - 4px) top / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) right 4px / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) left bottom / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) 4px bottom / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) left calc(100% - 4px) / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) right bottom / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) calc(100% - 4px) bottom / 2px 2px no-repeat,
        linear-gradient(#00adef, #00adef) right calc(100% - 4px) / 2px 2px no-repeat;
}

.zoom-reset-icon:active::before {
    opacity: 0;
}

.zoom-reset-icon:active::after {
    opacity: 1;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
    .zoom-track-wrap {
        display: none;
    }

    /* .canvas-zoom-controls {
        right: 12px;
        bottom: 78px;
        gap: 8px;
    }

    .zoom-reset-btn {
        height: 38px;
        min-width: 64px;
    }

    .zoom-control-panel {
        border-radius: 16px;
    }

    .zoom-step-btn {
        width: 56px;
        height: 56px;
    }

    .zoom-track-wrap {
        width: 92px;
        height: 228px;
        display: none;
    }

    .zoom-scale-labels {
        left: 8px;
        top: 12px;
        bottom: 12px;
        width: 32px;
    }

    .zoom-scale-labels span {
        font-size: 12px;
    }

    .zoom-scale-labels span::after {
        width: 12px;
    }

    .zoom-track {
        top: 12px;
        bottom: 12px;
        width: 10px;
    }

    .zoom-thumb {
        width: 24px;
        height: 24px;
    } */
}

@media (max-width: 480px) {
    /* .canvas-zoom-controls {
        right: 10px;
        bottom: 70px;
    }

    .zoom-track-wrap {
        width: 96px;
        height: 236px;
    }

    .zoom-scale-labels {
        width: 34px;
    }

    .zoom-scale-labels span {
        font-size: 13px;
    }

    .zoom-scale-labels span::after {
        width: 12px;
    }

    .zoom-track {
        width: 10px;
    }

    .zoom-thumb {
        width: 26px;
        height: 26px;
    } */
}