/* Some defaults */
:root {
  --settingsColor: #2d4455;
  --tblPts: rgb(0, 109, 109);
  --tblH5plus: chocolate;
  --tblHead: #243849;
}

html {
    background-color: Canvas;
    color: CanvasText;
    color-scheme: dark;
    font-family: sans-serif;
}

p{
    margin: 0;
}

body{
    margin:0;
}

/* Icons at top of screen */

#bar{
    display: flex;
    justify-content: space-between;
    font-size: 2rem;
    position: absolute;
    width: 100%;
}

#bar div {
    margin: 1.5rem;
}

#bar-right{
    display: flex;
}

#bar i{
    margin: .5rem;
    cursor: pointer;
}

#tableIcon{
    &:hover {
        color: silver;
    }
}

#settingsIcon{
    &:hover {
        color: silver
    }
}

#heartIcon{
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    &:hover {
        color: rgb(204, 69, 69)
    }
}

#content{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100dvh;
    width: auto;
}

/* sizes are too small and I don't wanna fix it */
#score, #hints, #keyboard {
    scale: 1.2;
    margin-top: 2.5rem;
}

#hints {
    margin-top: 0;
}

.dialogs{
    background-color: transparent;
    text-align: center;
    font-weight: 700;
    border: 0;
    scale: 1;
    opacity: 1;
    transition: all 300ms;
    z-index: 1;

    @starting-style{
        opacity: 0;
        scale: .8;
    }
}

.dialogContent{
    /* box-shadow: .5rem .5rem black; */
    background-color: var(--settingsColor);
    position: relative;
    padding: 1rem;
    border-radius: .5rem;
}

#tableContent{
    height: 80vh;
    max-height: 35.5rem;
    width: 21rem;
    scale: .9;
}

#tableDiv{
    height: 80vh;
    max-height: 35.5rem;
    overflow: auto;
    overflow-x: hidden;
}

td {
    text-align: right;
    padding: 2px;
    font-weight: 400;
}

#supportContent{
    height: 18rem;
    width: 14rem;
}

#settingsContent{
    margin-top: 4rem;
    height: 26rem;
    width: 18rem;
}

.dialogX{
    margin: .7rem;
    font-size: 1.7rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 2rem;
    position: absolute;
    right: -1.5rem;
    top: -1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: .2rem .2rem black;
    z-index: 4;
}

#settingsHelp {
    position: absolute;
    font-size: 1.5rem;
    top: .5rem;
    left: .5rem;
    z-index: 4;

    &:hover{
        color: darkgray;
    }
}

#settingsHelpOverlay {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 26rem;
    border-radius: .5rem;
    font-size: .7rem;
    align-items: left;
    background-color: #000000ef;
    position: absolute;
    top:0;
    left: 0;
    padding: 1rem;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    /* text-align: left; */
    transition: all 300ms;
}

#settingsHelpOverlay h3{
    margin: .1rem;
    margin-top: .5rem;
}

#settingsHelpOverlay p{
    margin-top: .2rem;
}

#filtersTxt {
    margin-top: 1.5rem;
}


.donate{
    margin: 1rem;
    margin-top: 2rem;
    background-color: white;
    border-radius: 2rem;
    height: 4rem;
    display: flex;
    justify-content: center;

    &:hover{
        background-color: gold;
    }
}

.dialogHeader{
    margin: 0;
    font-size: large;
}

.dialogContainer{
    margin: .5rem;
    display: flex;
    flex-direction: column;
}

.dialogs button{
    font-weight: 700;
    padding: .4rem;
    border:0;
    background-color: rgb(53, 98, 117);
    &:hover {
        background-color: rgb(96, 150, 173);
    }
}

#support {
    scale: 1;
    @starting-style{
        opacity: 0;
        scale: .8;
    }
}

button {
    font-family: sans-serif;
}

#hints{
    display: flex;
    align-items: center;
    flex-direction: column;
}

#hints-cont{
    display: flex;
    align-items: flex-end;
}

#hints-cont h2{
    margin: 0;
}


#hanBox{
    border: 2px solid ButtonBorder;
    border-radius: 1rem;
    height: 2.5rem;
    width: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

#fuBox{
    border: 2px solid ButtonBorder;
    border-radius: 1rem;
    height: 2rem;
    width: 3rem;
    margin-left: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

#dealrow{
    display: flex;
    margin-top: .8rem;
    border-radius: 1rem;
    color: GrayText;
}

#tsumorow{
    display: flex;
    margin: .5rem;
    border-radius: 1rem;
    color: GrayText;
}

.greyed {
    color: GrayText;
    background-color: Canvas;
}

.dealLit {
    color: white;
    background-color: chocolate;
}

.tsumoLit {
    color: white;
    background-color: teal;
}

.lit{
    border: 2px solid gainsboro;
}

.flagBox{
    border: 2px solid ButtonBorder;
    border-radius: 1rem;
    height: 2rem;
    width: 6rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}


#dealFlag, #tsumoFlag {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left-width: 1px;
}

#nonFlag, #ronFlag {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 1px;
}

#score{
    display: flex;
    font-size: 1rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

.scoreBtns {
    margin-right: .3rem;
}

#box1{
    border: 2px solid buttonborder;
    border-radius: 1rem;
    height: 2.5rem;
    width: 6.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#box2{
    border: 2px solid buttonborder;
    border-radius: 1rem;
    height: 2rem;
    width: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
}

#keyboard-cont {
  display: flex;
  align-items: center;
  font-size: 0;
}

.keyboard-button {
  font-size: 1rem;
  font-weight: 700;
  padding: .5rem;
  margin: .2rem;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
}

#zeroBtn{
    width:max;
}

#keyboard{
    display: flex;
    flex-direction: column;
    align-items: center;
}

#enterBtn {
    width: auto;
    height: auto;
    padding: 2rem .5rem;
    margin-left: .6rem;
} 

#zeroBtn{
    width: 5.4rem;
    height: auto;
}

#closePopup{
    border-radius: .5rem;
}

#incorrectPopup{
    background-color:rgb(110, 11, 11);
    width: 15rem;
    height: 6.4rem;
    border-radius: .5rem;
    scale: 1.2;
}

/* Focus-visible prevents weird highlight
when opening the dialogs */

a:focus-visible{
    outline: none;
}
.dialogX:focus-visible {
    outline: none;
}
input:focus-visible{
    outline: none;
}

#table:focus-visible{
    outline: none;
}

/* SETTINGS TOGGLES */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  margin-right: .5rem;
}
.toggle input {
  display: none;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1b1b1b;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: #FFF;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: rgb(103, 198, 241);
}
input:checked + .slider:before {
  transform: translateX(16px);
}
.settingPanel{
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
}
.settingPanel p{
    margin: 0;
    font-size: .85rem;
}
/* End of toggles */

dialog h2 {
    margin: .5rem;
    margin-top: 0;
}

/* For sliders */

.range_container {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
    } 


#hanRange {
    margin-top: 1rem;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 20px;
  height: 25px;
  border-radius: 10%;
  background-color: white;
  cursor: pointer;
}

input[type=range]::-moz-range-thumb {
  pointer-events: all;
  width: 20px;
  height: 25px;
  border-radius: 10%;
  cursor: pointer;  
  border: 0;
  outline: 0;
}

input[type="number"] {
  color: white;
  width: 2.5rem;
  height: 1.5rem;
  font-size: .8rem;
  font-weight: 700;
  border: none;
  border-radius: .2rem;
  background-color: var(--settingsColor);
  width: 2.8rem;
}

input[type="range"] {
  -webkit-appearance: none; 
  appearance: none;
  height: 2px;
  border-radius: .5rem;
  width: 80%;
  position: absolute;
  left: 1.5rem;
  top: .3rem;
  background-color: #C6C6C6;
  pointer-events: none;
}

#minHanSlider, #minFuSlider {
  height: 0;
  margin-top: 3px;
  z-index: 1;
}

.minMaxCont{
    display: flex;
    justify-content: space-between;
}

.range_container{
    margin-bottom: 1.3rem;
    margin-top: .6rem;
}

#switches{
    display: flex;
    justify-content: space-between;
}

.dimmed{
    filter: brightness(.5);
}

.ranges, .settingPanel{
    transition: filter 300ms;
}

/* For dealer only / ron only toggles */

.tripleSwitch {
  position: relative;
  height: 2rem;
  width: 18rem;
  margin-bottom: 1.5rem;
  background: #F2F2F2;
  background: #D7D7D7;
  border-radius: 2rem;
}

.switch-label {
  font-weight: bold;
  position: relative;
  z-index: 2;
  float: left;
  width: 6rem;
  line-height: 2rem;
  font-size: .75rem;
  color: #676a6c;
  text-align: center;
  cursor: pointer;
}

.switch-input {
  display: none;
}

.switch-input:checked + .switch-label {
  color: #FFF;
  transition: 0.15s ease-out;
  transition-property: color, text-shadow;
}

.switch-input:checked + .switch-label-N ~ .switch-selector {
  transform: translateX(0%);
  background-color: #f8ac59;
}
.switch-input:checked + .switch-label-BD ~ .switch-selector {
  transform: translateX(100%);
  background-color: #f8ac59;
}
.switch-input:checked + .switch-label-D ~ .switch-selector {
  transform: translateX(200%);
  background-color: #f8ac59;
}

.switch-input:checked + .switch-label-R ~ .switch-selector {
  transform: translateX(0%);
  background-color: #1AB394;
}
.switch-input:checked + .switch-label-BR ~ .switch-selector {
  transform: translateX(100%);
  background-color: #1AB394
}
.switch-input:checked + .switch-label-T ~ .switch-selector {
  transform: translateX(200%);
  background-color: #1AB394;
}

.switch-selector {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    display: block;
    width: 6rem;
    height: 2rem;
    border-radius: 2rem;
    background-color: #1ab394;
    transition: all 0.3s;
}

#trueRand {
    visibility: hidden;
}

#score h6{
    font-size: .8rem;
    margin:0;
    text-align: center;
    height: .8rem;
}

table, td, th{
    border-color: rgba(81, 138, 148, 0.664);
}

.tblHead {
    background-color: var(--tblHead);
}

#tblHeadTsumo {
    background-color: hsl(from var(--tblHead) h s calc(l * 1.3));
}

.hfrow:nth-child(odd){
    background-color: hsl(from var(--tblPts) h s calc(l * 1));
}
.hfrow:nth-child(odd) .tptd{
    background-color: hsl(from var(--tblPts) h s calc(l * 1.15));
}
.hfrow:nth-child(even){
    background-color: hsl(from var(--tblPts) h s calc(l * .75));
}
.hfrow:nth-child(even) .tptd{
    background-color: hsl(from var(--tblPts) h s calc(l * .9));
}


#manganRow{
    background-color: hsl(from var(--tblH5plus) h s calc(l * 1));
}
#manganRow .tptd{
    background-color: hsl(from var(--tblH5plus) h s calc(l * 1.1));
}

#hanemanRow{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .8));
}
#hanemanRow .tptd{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .9));
}

#baimanRow{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .6));
}
#baimanRow .tptd{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .7));
}

#sanbaimanRow{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .4));
}
#sanbaimanRow .tptd{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .5));
}

#yakumanRow{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .2));
}
#yakumanRow .tptd{
    background-color: hsl(from var(--tblH5plus) h s calc(l * .3));
}

