/* CSS styles for the buttons in Enigma n^2022.
CSS by Jim Andrews.  */

/* Preventing number input from displaying spin controls -------------------------------------
See https://stackoverflow.com/questions/3790935/can-i-hide-the-html5-number-input-s-spin-box */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

input[type=number] {
    -moz-appearance:textfield; /* Firefox */
}

/* Blue buttons -------------------------------------------------------- */

#controlsContainer {
    /* Contains all the buttons  */
    position: relative;
    display:-ms-grid;
    display:grid;
    -ms-grid-rows: 70px 1fr 1fr 1fr 50px;
    grid-template-rows: 70px 1fr 1fr 1fr 62px 50px;
    width:270px;
    margin: 0 auto;
    z-index: 5;
    opacity:1;
    visibility: visible;
    transition: visibility 1s, opacity 1s;
}
.buttonsContainer {
    /* Contains a single row of buttons  */
    display:flex;
    margin:0;
    padding:0;
}
.buttonContainer {
    /* Contains a single button  */
    position: relative;
    width:110px;
    height:110px;
    box-sizing: border-box;
}
.buttonText {
    /* Button text such as 'simple'  */
    position: absolute;
    width:100%;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%);
    color:white;
    text-shadow: 1px 1px black;
    text-align: center;
    font-size: 0.9em;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    pointer-events: none;
    z-index: 3;
}

.buttonBlue {
    /* A rotating button  */
    position:absolute;
    width:70.7%;
    height:70.7%;
    transform: translateX(20.9%) translateY(20.9%) rotate(45deg);
    opacity:70%;
    transition:transform 0.5s, background-color 1s, opacity 1s, width 0.5s, height 0.5s;
    border: 1px solid black;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 1;
    /* background-color:maroon; */
    background-color: #0d0d80;
}
.buttonBlue:hover {
    transform: translateX(5.7%) translateY(5.7%) rotate(495deg);
    width:90%;
    height:90%;
    opacity:1; 
    z-index: 2;
    background-color: #1b1bb8;
}
.buttonBlue:active {
    transition: background-color 0.1s;
    background-color: #4141f7;
}
.darkCircle {
    /* Contains the dark circles between red buttons  */
    position:relative;
    width:50px;
    height:110px;
    z-index: 5;
}
.darkCircle2 {
    /* The dark circles between red buttons  */
    position:relative;
    top:50%;
    opacity:0.90;
    transform: translate(0, -50%);
    width:100%;
    height:50px;
    box-sizing:border-box;
    border-radius: 50%;
    border: 1px solid black;
    color:white;
    text-align: center;
    line-height: 300%;
    font-size: 0.9em;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold; 
    background-color: rgb(53, 53, 53); 
}
/* Red buttons (same as blue) --------------------------------------------------- */
.buttonRed {
    /* A rotating button  */
    position:absolute;
    width:70.7%;
    height:70.7%;
    transform: translateX(20.9%) translateY(20.9%) rotate(45deg);
    opacity:70%;
    transition:transform 0.5s, background-color 1s, opacity 1s, width 0.5s, height 0.5s;
    border: 1px solid black;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 1;
    background-color:maroon;
    /* background-color: #0d0d80; */
}
.buttonRed:hover {
    transform: translateX(5.7%) translateY(5.7%) rotate(495deg);
    width:90%;
    height:90%;
    opacity:1; 
    z-index: 2;
    background-color: #ff5100;
}
.buttonRed:active {
    transition: background-color 0.1s;
    background-color: #ff0000;
}

/* Purple buttons --------------------------------------------------- */

.buttonsContainer2 {
    /* Contains a single row of blue buttons  */
    display:flex;
    margin:0;
    padding:0;
}
.buttonContainer2 {
    /* Contains a single blue button  */
    position: relative;
    width:54px;
    height:54px;
    box-sizing: border-box;
}
.buttonText2 {
    /* Such as 'share'  */
    position: absolute;
    width:100%;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%);
    color:white;
    text-shadow: 1px 1px black;
    text-align: center;
    font-size: 0.7em;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    pointer-events: none;
    z-index: 3;
}
.button2 {
    position:absolute;
    width:70.7%;
    height:70.7%;
    transform: translateX(20.9%) translateY(20.9%) rotate(45deg);
    opacity:70%;
    transition:transform 0.5s, background-color 1s, opacity 1s, width 0.5s, height 0.5s;
    border: 1px solid black;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 1;
    /* background-color:rgb(0, 30, 128); */
    background-color: #470a66;
}
.button2:hover {
    transform: translateX(5.7%) translateY(5.7%) rotate(495deg);
    width:90%;
    height:90%;
    opacity:1; 
    z-index: 2;
    background-color: #8017b4;
}
.button2:active {
    transition: background-color 0.1s;
    /* background-color: orangered; */
    background-color: #af2ef0;
} 

/* Sliders ------------------------------------------------ */

/* The sliders also use CSS in js/nouislider  */

.volumeContainer {
    /* Contains the volume slider  */
    padding-top:35px;
}

#volumeLabel {
    /* 'volume of meaning' label  */
    position:relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size:0.8em;
    font-weight: bold;
    /* color:maroon; */
    color: #0c296b;
    /* right:5px; */
    /* bottom:20px; */
    left:110px;
    top:-19px;
    pointer-events: none;
}

.pitchContainer {
    /* Contains the 'speed of meaning' slider  */
    padding-top:10px;
}

#pitchLabel {
    /* the 'speed of meaning' label  */
    position:relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size:0.8em;
    font-weight: bold;
    /* color:maroon; */
    color: #0c296b;
    top:-19px;
    left:120px;
    /* bottom:20px; */
    /* top:34px; */
    pointer-events: none;
    z-index: 1;
    text-shadow: 1px 1px rgba(255, 255, 255, 0.5);
}

/* The below is to make the slider tooltips display only on activation. 
See https://refreshless.com/nouislider/examples/#section-hiding-tooltips  */

.noUi-tooltip {
    display: none;
}
.noUi-active .noUi-tooltip {
    display: block;
}

/* .noUi-tooltip:hover {
    display:block;
} */