/* @font-face {
    font-family: "gothic_";
    src: url(fonts/centurygothic.ttf);
}

@font-face {
    font-family: "gothic_bold";
    src: url(fonts/centurygothic_bold.ttf);
} */

* {
    margin: 0;
    padding: 0;
}
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
* {
    -webkit-tap-highlight-color: transparent;
}
html,
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    touch-action: none;
}
body {
    background: repeating-linear-gradient(
        45deg,
        #686868,
        #ececec 5px,
        #e2e2e3 5px,
        #e2e2e3 10px
    );
    font-family: "gothic_bold", Helvetica, sans-serif;
    /* height: 99vh; */
}
.master-wrapper {
    position: absolute;
    left: 0px;
    top: 0px;
    height: 100%;
    width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* border: 2px solid purple; */
}

.wrapper3d {
    flex: 1;
    /* min-width: 0; */
    width: 100%;
    /* height: 100%; */
    box-sizing: border-box;

    /* transition: width 0.3s ease; */
    background-color: #f7f5f6;
    position: relative;

    /* border: 2px solid green;
    border-radius: 20px; */
    overflow: hidden;
}

#canvas3d {
    display: block;
    box-sizing: border-box;
    background-color: #f7f5f6;
    /* border: 1px solid red; */
}

.site-loading-screen {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 99.99%;
    background-color: #fbf9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: large;
    color: #4041a2;
    z-index: 777;
}

.config-editor-panel {
    /* flex: 0 0 auto; */
    width: 40%;
    height: auto;

    background-color: #f7f5f6;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 100px;

    /* border: 3px solid red;
    border-radius: 20px; */
}

.editor-inner-wrapper {
    /* background-color: #fafefe; */
    background-color: #ffffff;
    width: 100%;
    /* height: 60%; */
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    /* padding: 20px 0; */
    box-shadow: 0px 1px 18px 1px rgba(0, 0, 0, 0.078);
    box-sizing: border-box;
    gap: 10px;
    position: relative;
    /* border: 1px solid purple; */
}

.editor-inner-inner-wrapper {
    padding: 20px 0;
    background-color: #ffffff;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    box-sizing: border-box;
    gap: 18px;
    position: relative;
    /* border: 1px solid purple; */
}

.editor-canvas-cont {
    /* border: 1px solid green; */
    box-sizing: border-box;
    width: 100%;
    height: 20vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transform: translateX(-1px);
    /* display: none; */
}

.product-btn-cont {
    background-color: #ffffff;
    display: flex;
    flex-direction: row;
    /* border: 1px solid red; */
    width: auto;
    border-radius: 6px;
    /* box-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.078); */
    border: 1px solid rgba(0, 0, 0, 0.137);
}
.product-btn {
    height: 50px;
    aspect-ratio: 1;
    padding: 4px;
    /* border: 1px solid #4041a2; */
    cursor: pointer;

    border-radius: 6px;
}

.product-btn:hover {
    background-color: #00000009;
}

.product-btn-selected {
    border: 2px solid #7879d7 !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    background-color: #ffffff !important;
}
.product-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.function-btn-cont {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    /* border: 1px solid red; */
    box-sizing: border-box;
    color: #7879d7;
}

.function-btn-cont button,
.function-btn-cont label {
    padding: 10px 15px;
    border: none;

    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-wrap: nowrap;
}

.replace-btn {
    display: flex;
    justify-content: center;
    align-items: center;

    background-color: #e7962d;
    color: white;
}
/* .replace-btn:hover {
    background-color: #6868680f;
} */
#add-to-cart-btn {
    background-color: #4041a2;
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

#editor-canvas {
    border: 2px dashed #787ad755;
    border-radius: 4px;

    background-color: transparent;
}

.text-switch-cont,
.text-color-cont {
    /* border: 1px solid red; */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: right;
    flex-direction: row;
}

.text-switch-cont span,
.text-color-cont span {
    color: #7879d7;
    font-size: medium;
    text-wrap: nowrap;
}

#replace-input {
    display: none;
}

.upload-aera {
    user-select: none;
    width: 90%;
    /* position: absolute; */
    height: 68%;
    min-height: 170px;
    background-color: rgb(255, 255, 255);
    box-sizing: border-box;
    border: 2px dashed #7879d7;
    border-radius: 16px;
    color: #7879d7;
    font-size: 1em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
}

.upload-aera i {
    font-size: 3em;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.outside-size-label-cont {
    position: absolute;
    left: 0;
    top: 5%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: end;
    /* position: absolute;
    left: 0;
    top: 0; */
    height: 20px;
    box-sizing: border-box;
    /* border: 1px solid green; */
}
.outside-size-label {
    border: none;
    background-color: white;
    border-radius: 20px;
    padding: 4px 8px;
}
.price-tag-cont {
    /* border: 1px solid red; */
    display: flex;
    justify-content: center;
}

.triangle-left {
    width: 0;
    height: 0;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-right: 12px solid #e7962d;
}

#price-value {
    background-color: #e7962d;
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 8px;
    padding-left: 6px;
    padding-top: 3px;
    padding-bottom: 3px;
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/*..................*/

.zoom-input-cont {
    width: 100%;
    max-width: 280px;
    /* border: 1px solid red; */

    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 40px;

    position: relative;
}

.zoom-input-cont::before {
    --step: 43px;

    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: calc(var(--step) * 6 + 2px);
    height: 100px;
    z-index: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);

    /* background-image:
        linear-gradient(to right, #c8c8c84c 2px, transparent 2px),
        linear-gradient(to right, #c8c8c84c 1px, transparent 1px);

    background-size:
        var(--step) 36px,
        calc(var(--step) / 6) 26px; */

    background-position: left center;
    background-repeat: repeat-x;

    padding-right: 2px;
    background-clip: content-box;
}

/* hide native visuals but keep functionality */
.zoom-input {
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    position: relative;
    z-index: 2;
    cursor: pointer;

    -webkit-appearance: none;

    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}
.zoom-input:focus {
    outline: none;
}

.zoom-input::-webkit-slider-runnable-track {
    height: 12px;
    border-radius: 99px;
    background:
        linear-gradient(to top, #4041a2, #9899db) 0 0 / var(--percent) 100%
            no-repeat,
        linear-gradient(to top, #c8d4da, #939fa4) 100% 0 /
            calc(100% - var(--percent)) 100% no-repeat;
}
/* Firefox track (full track) */
.zoom-input::-moz-range-track {
    height: 12px;
    border-radius: 99px;
    background: linear-gradient(to top, #c8d4da, #939fa4);
}

/* Firefox filled part (left of thumb) */
.zoom-input::-moz-range-progress {
    height: 12px;
    border-radius: 99px;
    background: linear-gradient(to top, #4041a2, #9899db);
}

.zoom-input::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: transparent;

    -webkit-appearance: none;
    box-shadow: none;
    border: none;
}

.thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #ffffff;
    background: linear-gradient(137deg, #ffffff 0%, #ffffff 65%, #c3cfdc 100%);
    border: 1px solid #00000009;
    box-shadow: 3px 2px 5px 2px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zoom-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;

    /* BIG hit area */
    width: 44px;
    height: 44px;

    /* keep it invisible */
    background: transparent;
    border: none;
    box-shadow: none;

    /* visually center your custom thumb */
    margin-top: -16px; /* depends on track height */
}

.thumb-inner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4041a2;
    background: linear-gradient(to top, #4041a2, #9899db);
    box-shadow: inset 4px 4px 4px #0000004e;
}

.positioning-hint {
    color: #4041a2;
    transform: translateY(7px);
    margin-top: -6px;
    user-select: none;
}
.positioning-hint-tap {
    color: #4041a2;
    transform: translateY(-7px);
    margin-bottom: -17px;
    /* border: 1px solid red; */
    font-size: 1em;
    user-select: none;
}

@media only screen and (max-width: 700px) {
    .master-wrapper {
        flex-direction: column;
    }
    /* .wrapper3d {
        height: 60%;
        width: 100% !important;
        border: 1px solid red;
    } */
    .config-editor-panel {
        padding-right: 0px;
        width: 100%;
        height: auto;
        max-height: 60%;
    }
    .editor-inner-wrapper {
        height: 100%;
        border-radius: 10px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    /* .product-btn-cont {
        width: 100%;
    } */

    .product-btn {
        width: 40px;
        height: 40px;
    }
    /* #add-to-cart-btn {
        width: 50px;
    } */
    .function-btn-cont button,
    .function-btn-cont label {
        width: 100%;
    }

    .bottom-part-short {
        height: 40% !important;
    }
    .bottom-part-tall {
        height: 60% !important;
    }
}

@media only screen and (max-height: 700px) {
    .editor-inner-inner-wrapper {
        gap: 8px;
        padding-top: 8px;
    }
    .positioning-hint,
    .positioning-hint-tap {
        font-size: 0.8em;
    }
    .replace-btn {
        padding: 10px 0px;
    }
    .function-btn-cont {
        height: 30px;
        width: 85%;
    }
    .positioning-hint {
        transform: translateY(3px);
    }
    .zoom-input-cont {
        height: 30px;
    }
    .product-btn {
        width: 50px;
        height: 30px;
    }
}

.icon360 {
    position: absolute;
    left: 5%;
    bottom: 5%;
    width: 40px;
    aspect-ratio: 1;
    background-image: url("../images/swipe.gif");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    user-select: none;
    pointer-events: none;
    /* animation settings */
    animation: pulseAnim 0.8s ease-in-out 3; /* 5 pulses in 3s */
    animation-fill-mode: forwards; /* keeps the final state */
}

.icon360 span {
    position: absolute;
    bottom: 11px;
    right: -140px;
    transform: translateX(-50%);
    font-size: 14px;
    color: #2e2e2e;
    white-space: nowrap;
}

@keyframes pulseAnim {
    0%,
    100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.2;
    } /* fade out in the middle of each pulse */
}

/*  custom switch */
.switch {
    --secondary-container: #7879d7;
    --primary: #ffffff;
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 3.1em;
    height: 1.6em;
}

.switch input {
    display: none;
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #eae8e9;
    transition: 0.2s color;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.114);
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.2em;
    width: 1.2em;
    border-radius: 20px;
    left: 0.2em;
    bottom: 0.19em;
    background-color: #aeaaae;
    transition: 0.4s transform;
}

input:checked + .slider::before {
    background-color: var(--primary);
}

input:checked + .slider {
    background-color: var(--secondary-container);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--secondary-container);
}

input:checked + .slider:before {
    transform: translateX(1.5em);
}

/* custom color picker */

.color-circle {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    /* border: 1px solid rgba(53, 53, 53, 0.432); */
    border: 1px solid #7879d7;
    aspect-ratio: 1;
}

/* Chrome / Edge / Safari */
.color-circle::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-circle::-webkit-color-swatch {
    border-radius: 50%;
    border: none;
}

/* Firefox */
.color-circle::-moz-color-swatch {
    border-radius: 50%;
    border: none;
}
canvas {
    touch-action: none;
}

.hidden {
    visibility: hidden;
    position: absolute;
    user-select: none;
    pointer-events: none;
}