

body{
    font-family: "Lato", sans-serif;
    font-weight: 300;
}

.preloader{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-weight: bold;
    display: none;
}

.loader {
    --loader-width: 64px;
    width: var(--loader-width);
    height: var(--loader-width);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid #d7eef5;
    border-right-color: #2196F3;
    animation: s2 1s infinite linear;
    position: relative;
}

@keyframes s2 {to{transform: rotate(1turn)}}

@-webkit-keyframes loader {
    0% {
        width: 0;
    }
    20% {
        width: 10%;
    }
    25% {
        width: 24%;
    }
    43% {
        width: 41%;
    }
    56% {
        width: 50%;
    }
    66% {
        width: 52%;
    }
    71% {
        width: 60%;
    }
    75% {
        width: 76%;
    }
    94% {
        width: 86%;
    }
    100% {
        width: 100%;
    }
}

@keyframes loader {
    0% {
        width: 0;
    }
    20% {
        width: 10%;
    }
    25% {
        width: 24%;
    }
    43% {
        width: 41%;
    }
    56% {
        width: 50%;
    }
    66% {
        width: 52%;
    }
    71% {
        width: 60%;
    }
    75% {
        width: 76%;
    }
    94% {
        width: 86%;
    }
    100% {
        width: 100%;
    }
}
.progress-bar {
    border-radius: 60px;
    overflow: hidden;
    width: 100%;
}
.progress-bar span {
    display: block;
}

.bar {
    background: rgba(0, 0, 0, 0.075);
}

.progress {
    transition: width 0.5s ease-in-out;
    background: #2196F3;
    color: #fff;
    padding: 5px;
    width: 0;
}

.progress-bar {
    max-width: 120px;
    position: relative;
}

body.loading #theViewer {
    display: none!important;
    /*opacity: 0.2;*/
}

body.loading .preloader{
    display: flex;
}

.cover-panel-title{
    margin: 0;
    font-weight: 800;
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    position: relative;
}

.cover-panel-title .as-btn{
    border: 1px solid rgba(0, 0, 0, .12);
    padding: 2px 2em;
    font: inherit;
    position: absolute;
    right: 0;
    transform: translate(120%, 0);
    font-size: 12px;
    border-radius: 10em;
    background: #000;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
}

.quick-toolbar{
    position: fixed;
    bottom: 38px;
    right: 32px;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    z-index: 200;
    transform: translate(-36px,-2px);
    transition: transform .5s ease-in-out;
}

body.loading .quick-toolbar{
    transform: translate(-36px,90px);
}

.quick-toolbar button{
    border: 1px solid #b4b2b2;
    background: #fff;
    color: #989898;
    font-size: 12px;
    padding: 4px 2em;
    white-space: nowrap;
}

.quick-toolbar button:active,
.quick-toolbar button:hover{
    border: 1px solid #666;
    color: #666;
    transform: scale(1.05);
}

.quick-toolbar button:active{
    transform: scale(0.95);
}

#theViewer{
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}
iframe{
    border: 0;
    /*width: calc(100% + 5px)!important;*/
    position: fixed;
    z-index: 2;
    height: 100vh;
    overflow: hidden;
    overflow-y: auto;
    padding: 0;
}
#app{
    visibility: hidden;
    position: absolute;
    z-index: 0;
}
.hud{
    top: 16px;
    left: 16px;
    right: auto;
    max-height: calc(100vh - 16px);
    transform: translate(-150%,0);
    transition: transform .2s ease-in-out;
    font-family: "Lato", sans-serif;
}

.hud h3{
    font-size: 0.8rem;
}

body.designer .hud[data-model="cover"]{
    transform: translate(0,0);
}

body.designer-box .hud[data-model="box"]{
    transform: translate(0,0);
}

.canvasBox .preview-and-controlls {
    flex: 1 1 100%;
    border-right: 1px solid #f0f0f0;
    overflow: auto;
    position: relative;
}

#panel1{
    box-sizing: border-box;
    min-height: calc(100% - 32px);
    background: #fff;
}

.add-text-and-images-wrapper{
    gap: 1em;
    display: flex;
    flex-direction: column;
}


*[hidden]{
    display: none!important;
}

.swal-modal {
    font-family: inherit;
}

.swal-modal progress{
    margin-top: 1em;
}

.gs-toast {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px #0000001a;
    border-radius: 6px;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px;
    align-items: center;
}

.key-btn{
    display: inline-flex;
    border: 1px solid #ad954c66;
    background-color: #fff;
    border-radius: 3px;
    min-width: 24px;
    text-align: center;
    align-content: center;
    justify-content: center;
}

.how-to{
    position: fixed;
    bottom: 0;
    left: 24px;
    background: #fff6d6;
    padding: 1em;
    border-radius: 8px;
    border: 0;
    color: #a58b3e;
    font-size: 12px;
    transform: translate(0, -24px);
    z-index: 10;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transition: transform 0.1s;
    max-width: 30%;
}

.how-to strong{
    display: block;
    margin-bottom: 0.5em;
}

.how-to .close-btn{
    position: absolute;
    top: 4px;
    right: 8px;
    width: 1em;
    height: 1em;
    line-height: 1;
    padding: 0;
    font-size: 16px;
    background: transparent;
    color: #000;
    border: 0;
    box-shadow: none;
    transition: transform 0.1s;

}

.how-to .close-btn svg{
    width: 20px;
    height: 20px;
    vector-effect: non-scaling-stroke;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.how-to .close-btn svg path{
    stroke: #a58b3e;
}

.how-to .close-btn:hover {
    transform: scale(1.2) rotate(90deg);
}

.how-to.hidden{
    transform: translate(-200%, -24px);
}

gs-fonts{
    border-radius: 6px;
    width: 150px;
    max-width: 150px;
    position: relative;
    display: inline-block;
}

gs-fonts::part(select){
    box-sizing: border-box;
    background-color: #f0f0f0;
    font-size: inherit;
    border-radius: 6px;
    width: 100%;
    max-width: 150px;
    padding: 9px 10px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .12);
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-and-controlls{
    overflow: auto;
    scrollbar-gutter: stable both-edges;
}

#editorCanvas{
    transform-origin: 0 0;
    transform: scale(1);
}

.zoom-wrapper{
    position: sticky;
    border-radius: 10em;
    padding: 8px 12px;
    display: inline-flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    z-index: 2000;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    bottom: 16px;
    top: calc(100% - 32px);
}

.zoom-wrapper {

    --thumb-size: 14px;
    --thumb-color: #2196F3;
    --bar-size: 6px;
    --bar-color: #999;

    input[type="range"] {
        -webkit-appearance: none; /* Rimuove lo stile su Chrome/Safari/Edge */
        appearance: none;
        background: transparent; /* Rimuove lo sfondo predefinito */
        cursor: pointer;
        width: 100%;
    }

    input[type="range"]:focus {
        outline: none; /* Rimuove il bordo blu al focus */
    }

    input[type="range"]::-webkit-slider-runnable-track {
        background: var(--bar-color);
        height: var(--bar-size);
        border-radius: var(--bar-size);
        box-shadow: inset 0 3px 2px -1px rgba(0,0,0,0.3);
    }

    /* Firefox */

    input[type="range"]::-moz-range-track {
        background: var(--bar-color);
        height: var(--bar-size);
        border-radius: var(--bar-size);
        box-shadow: inset 0 3px 2px -1px rgba(0,0,0,0.3);
    }

    /* Chrome, Safari, Edge e Opera */

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none; /* Fondamentale per applicare stili personalizzati */
        appearance: none;
        margin-top: calc(-1 * (var(--thumb-size) - var(--bar-size)) /2); /* Centra verticalmente il cursore rispetto alla track */
        background-color: var(--thumb-color);
        height: var(--thumb-size);
        width: var(--thumb-size);
        border-radius: 100%;
        backdrop-filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.2));
    }

    /* Firefox */

    input[type="range"]::-moz-range-thumb {
        border: none; /* Rimuove il bordo predefinito di Firefox */
        background-color: var(--thumb-color);
        height: var(--thumb-size);
        width: var(--thumb-size);
        border-radius: 100%;
        backdrop-filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.2));
    }
}