/*
----------------------------------------
Simulation Box
----------------------------------------
*/
.simbox {
    display: block;
    position: fixed;
}
#Sim2Dbox {
    border-radius: 10px;
}

/*
----------------------------------------
Simulation Controls
----------------------------------------
*/
.controls {
    display: flex;
    flex-direction: row;
    position: fixed;
    gap: 10px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;

    background-color: var(--background-color);
    padding: 20px;
    border-radius: 0px 0px 15px 15px;
    box-shadow: inset 5px -5px 10px #cccccc, inset -5px 5px 10px #ffffff;
}

#playButton {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 20px solid var(--primary-color);
}
#playButton:hover {
    cursor: pointer;
    border-left: 20px solid var(--primary-color-hover);
}
#resetButton {
    cursor: pointer;
    width: 60px;
    height: 30px;
    border-radius: 10px;
    line-height: 30px;
    margin-right: 10px;
    text-align: center;
    font-size: 20px;
    color: aliceblue;
    background-color: var(--primary-color);
}
#resetButton:hover {
    background-color: var(--primary-color-hover);
}

/*
----------------------------------------
Settings
----------------------------------------
*/

.settings {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    padding: 20px;
    top: 50%;
    left: 0;
    transform: translate(-92%, -50%);
    z-index: 99;
    border-radius: 0px 20px 20px 0px;
    background-color: #cccccc;
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.6);
    min-width: 300px;
    transition: all 0.2s;
}
.settings > div {
    opacity: 0;
}
.settings:hover {
    display: flex;
    transform: translate(0%, -50%);
    background-color: var(--background-color);
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.2);
}
.settings:hover > div {
    opacity: 1;
}
.settings > h1 {
    margin-top: 10px;
    font-size: 30px;
    font-weight: 800;
}
.settings > h2 {
    font-size: 24px;
    font-weight: 500;
}

/*
----------------------------------------
Options
----------------------------------------
*/
.toggle,
.option {
    display: grid;
    column-gap: 5px;
    grid-template-columns: 2fr 3fr;
    width: 400px;
    align-items: center;
}
.toggle > h3,
.option > h3 {
    font-size: large;
    font-weight: 500;
    margin: 0;
}
.toggle > p,
.option > p {
    font-size: medium;
    font-weight: 300;
    color: dimgray;
    grid-column: span 2;
}

.option > div {
    position: relative;
    display: grid;
    align-items: center;
    --thumb-height: 30px;
    --thumb-width: 12px;
    height: 40px;
}

/*
Slider formatting
*/
.option > div > input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: flex;
    position: absolute;
    width: 100%;
    height: 15px;
    background-color: none;
    outline: none;
    border-radius: 20px;
    box-shadow: inset 3px -3px 8px #cccccc, inset -3px 3px 8px #ffffff;
}
.option > div > input::-webkit-slider-thumb {
    height: var(--thumb-height);
    width: var(--thumb-width);

    -webkit-appearance: none;
            appearance: none;
    background-color: var(--primary-color);
    border-radius: 20px;
    border: none;
    transition: 0.1s ease-in-out;
    cursor: pointer;
}
.option > div > input:active::-webkit-slider-thumb {
    background-color: var(--primary-color-hover);
}
.option > div > input:hover::-webkit-slider-thumb {
    background-color: var(--primary-color-hover);
}
.option > div > span {
    position: relative;
    display: block;
    transform: scale(0,0) translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    line-height: 60px;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    font-size: 1.2em;
    font-weight: bolder;
    opacity: 0;
    top: -40px;
    z-index: -1;
    transition: 0.15s top ease-in-out, 0.15s opacity ease-in-out 0.05s, 0.15s scale ease-in-out;
}
.option > div > input:active + span,
.option > div > input:hover + span {
    opacity: 1;
    background: var(--primary-color-hover);
    top: -50px;
    transform: scale(1,1) translateX(-50%);
    z-index: 90;
}

/*
Checkbox formatting
*/
.chkbox {
    display: inline-block;
}
.chkbox > label {
    display: inline-block;
    height: 24px;
    width: 60px;
    position: relative;
}
.chkbox > label > input[type="checkbox"] {
    display: none;
}
.chkbox > label > div {
    background-color: #fff;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 20px;
    box-shadow: inset 4px -4px 10px #cccccc, inset -4px 4px 10px #ffffff;
}
.chkbox > label > div::before {
    background-color: var(--primary-color);
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    border-radius: 50%;
}
.chkbox > label > input[type="checkbox"]:checked + div {
    background-color: var(--primary-color-translucent);
    box-shadow: none;
}
.chkbox > label > input[type="checkbox"]:checked + div::before {
    background-color: var(--primary-color-hover);
    transform: translateX(36px);
}