html, body {
    width: 100%;
    height: 100%;
    position: relative;
    overscroll-behavior-y: contain;
}

@keyframes cr3_rotate_hide {
    0%{
       height: 100%;
       transform: rotateY(0deg);
    }
    50%{
        height: 100%;
        transform: rotateY(90deg);
    }
    100%{
        height: 0%;
        transform: rotateY(90deg);
    }
}
@keyframes cr3_rotate_show {
    0%{
        height: 100%;
       transform: rotateY(270deg);
    }
    50%{
        transform: rotateY(270deg);
    }
    100%{
        transform: rotateY(360deg);
    }
}

#cr3_windows {
    position:relative;
    width:100%;
    height:100%;
    overflow:hidden;
}

.background {
    position: absolute; 
    box-shadow: inset 0 0 0 1000px rgba(0,0,0,.2);
    height: 100%;
    width: 100%;
}

#cr3tool_container {
    height: 100%;
    position: relative;
    overscroll-behavior-y: contain;
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin:1rem;
}

#CR3_container {
    position: relative;
    height:100%;
    width:100%;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
}

#CR3_obj {
    position: absolute;
    display:block;
    object-fit: contain;
    height:95%;
    width:95%;
}

.cr3_side {
    position: absolute; 
    display:block;
    height:100%;
    width:100%;
}

.cr3_layer {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: 100%;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

#cr3_layer_1 {
    width: 100%;
    height: 100%;
}


/* -------------------------------------------------*/
/*                    CR3 TOOLBAR                   */
/* -------------------------------------------------*/

.cr3_tool_menu {
    position: absolute;
    z-index: 20;
    width: 100%;
}

.cr3_toolbar{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background-color: hsl(0,0%,100%);
    border-radius: 2rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
    padding: 0.3rem;
    margin: 0;
    transition: 0.8s;
    vertical-align: middle;
    align-items: center;
    background-image: linear-gradient(to top, #D8D9DB 0%, #fff 80%, #FDFDFD 100%)
}

.cr3_toolbar_ver {
    flex-direction: column;
    width:2.5rem;
}
.cr3_toolbar_hor {
    height:2.5rem;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-left: 10px;
    padding-right: 10px;
}

.cr3_toolbar_hor > .cr3_tool_ctrl, .cr3_toolbar_hor >.cr3_tool_btn{
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}
.cr3_toolbar_ver > .cr3_tool_ctrl, .cr3_toolbar_ver >.cr3_tool_btn{
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.cr3_toolbar_hor *, .cr3_toolbar_hor *{
    height: 100%;
}
.cr3_toolbar_veer *, .cr3_toolbar_ver *{
    width: 100%;
}

/* -------------------------------------------------*/
/*                     TOOL STYLE                   */
/* -------------------------------------------------*/

.cr3_tool_ctrl, .cr3_tool_btn {
    border-radius: 2rem;
    text-align: center;
}

.cr3_tool_ctrl{
    color: rgb(50, 49, 48);
    box-sizing: border-box;
    border: 0.1rem solid rgb(138, 136, 134);
}

.cr3_tool_ctrl > label > img {
    vertical-align: top;
}

.cr3_tool_ctrl > input {
    display:none;
}

.cr3_tool_ctrl > label {
    cursor: pointer;
    border-radius: 2rem;
    background-color: rgb(255, 255, 255);
    box-sizing: border-box;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.cr3_tool_ctrl > input[type="radio"]:checked ~ label {
    background-color: rgb(155, 224, 253);
    color: rgb(24, 23, 22);
}
.cr3_tool_ctrl > input[type="checkbox"]:checked ~ label {
    background-color: rgb(249, 215, 180)!important;
    color: rgb(24, 23, 22);
}

.cr3_tool_ctrl > label:hover {
    background-color: rgb(249, 215, 180);
    color: rgb(18, 18, 17);
}

.cr3_tool_btn  {
    border:none !important;
}

.cr3_tool_btn > label {
    vertical-align: center;
	box-shadow:inset 0px 1px 0px 0px #bbdaf7;
    background-size: auto 100%;
	background-color:#c4e1ff;
    box-sizing: none !important;
	border-radius:6px;
	border:1px solid #84bbf3;
	display:inline-block;
	color:#ffffff;
	text-decoration:none;
	text-shadow:0px 1px 0px #528ecc;
}

.cr3_tool_btn > label:hover {
	background:linear-gradient(to bottom, #7bb0e4 5%, #79bbff 100%) !important;
	background-color:#378de5 !important;
}


/* -------------------------------------------------*/
/*                 Specific controls                */
/* -------------------------------------------------*/
#language_picker {
    position: absolute; 
    z-index:30;
    bottom: 23px;
    left: 23px;
    cursor:pointer;
    box-sizing: border-box;
    
    width: 20px;
    text-align: right;
    font-weight: bold;
}


#lang_select_btn {
    bottom: 0px;
    width: 30px;
    height: 21px;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
}

#language_picker ul {
    margin: 0;
    padding: 0;
    display: none;
    background-color: #fff;
    border: 1px solid #f8f8f8;
    position: absolute;
    bottom: 30px;
    left: 0px;
    width: 100px;
    border-radius: 5px;
    box-shadow: 0px 1px 10px rgba(0,0,0,0.2);
}

#language_picker ul li {
    list-style: none;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

#language_picker ul li:hover {
    background-color: #f2f2f2;
}

#language_picker:hover {
    width: 100px;
    height: 70px;
}

#language_picker ul li a:before {
    content: '';
    display: inline-block;
    width: 25px;
    height: 25px;
    vertical-align: middle;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
}

#cr3_sizectrl{
    max-width: 500px;
    min-width: 80px;
    padding-left: 1rem;
    padding-right: 1rem;
    cursor:pointer;
}

input.cr3_tool_ctrldraw[type="radio"]:checked ~ label {
    background-color: rgb(240, 120, 112);
    color: rgb(24, 23, 22);
}
input.cr3_tool_ctrldraw[type="radio"]:disabled ~ label {
    background-color: rgb(126, 126, 126);
    color: rgb(14, 14, 14);
}

/* Logo clicable hacia la web principal. Junto al selector de idioma (abajo izquierda).
   Se puede tapar con el panel de explicacion cuando este se abre. Tamano fijo en
   todos los dispositivos. */
#cr3_home_logo {
    position: fixed;
    bottom: 14px;
    left: 92px;
    z-index: 22;
    display: block;
    line-height: 0;
    padding: 0.3rem 0.7rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0.6rem;
    box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.15s ease;
}

#cr3_home_logo:hover,
#cr3_home_logo:focus-visible {
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.35);
}

#cr3_home_logo .cr3_logo_full {
    display: block;
    height: 28px;
    width: auto;
}

#cr3_home_logo .cr3_logo_icon {
    display: none;
}