html, body {
	height:100%;	
	font-family: sans-serif;
	font-weight: 300;
	font-size: 16px;
	line-height: 1.25em;
    margin: 0;
    background-color: #f7f7f7;
}

main{
    height: 100%;
}
.reset-button {
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
    width: auto;
    overflow: visible;

    background: transparent;

    /* inherit font & color from ancestor */
    color: inherit;
    font: inherit;

    /* Normalize line-height. Cannot be changed from normal in Firefox 4+. */
    line-height: normal;

    /* Corrects font smoothing for webkit */
    -webkit-font-smoothing: inherit;
    -moz-osx-font-smoothing: inherit;

    /* Corrects inability to style clickable input types in iOS */
    -webkit-appearance: none;
}

.reset-button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.reset-button:focus {
    outline: none;
}

.reset-button:focus:not(:focus-visible) {
    outline: none;
}

.reset-button:focus:not(:-moz-focusring) {
    outline: none;
}
#visualizzatore{
    display: grid;
    grid-template-columns: auto 1fr;
   
    position: relative;
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
}
#visualizzatore.loading{
    background-color: grey;
    pointer-events: none;
}
#visualizzatore.loading::after{
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1em;
    line-height: 3em;
    border-radius: 50%;
    font-weight: 600;
    animation: blink 1s infinite;
}
@keyframes blink {
    0% {background-color: darkgrey;}
    50% {background-color: grey;}
    100% {background-color: darkgrey;}
}
#ui{
    max-height: 100%;
    display: grid;
    grid-template-rows: 1fr;
    overflow: hidden;
}
#ui fieldset{
    max-width: 100%;
    overflow: auto;
    max-height: 50vh;
}

#wcomp-3d{
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    max-height:100dvh
}
#wcomp-3d .fullscreen-button{
    position: absolute;
    top: 0;
    left: 0;
    background-color: black;
    color: white;
    padding: 2px 5px;
    border: solid 1px white;
    text-transform: uppercase;
   cursor: pointer;
}
#wcomp-3d .fullscreen-button:hover{
    background-color: gray; 
}
/*#wcomp-3d .fullscreen-button::first-letter{
    font-size: 2em;
    vertical-align: middle;
    display: inline-block;
    margin-right: 5px;    
    font-weight: 700;
}*/
.viewer-canvas{
    display: block;
    position: absolute;  
    /* cercar di capire perché gli mette le dimensioni inline x !important */
    height: 100% !important;
    width: 100% !important;
}
.viewer-image{     
    object-fit: cover; 
    object-position: 50% 50%;
    height: 100%;
    width: 100%;
}
.invisible{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow:hidden;
    width: 0;
    height: 0;
    display: block;
}
@media screen and (orientation: portrait) {
    #visualizzatore {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height:auto;
    }

    #ui {
        grid-template-rows: auto;
        grid-template-columns: 1fr 1fr;
    }
   
    #wcomp-3d {
        height: 60vh;
    }


}

