:root{
  --bg-color: rgb(242, 243, 244);
  --tx-color: rgb(47, 79, 79);  /* darkslategrey */
  --tx-color-2: rgba(47, 79, 79, .2);
  --tx-color-2-full: rgb(213, 220, 220);
  --tx-color-3: rgba(47, 79, 79, .3);
  --tx-color-4: rgba(47, 79, 79, .4);
  --tx-color-4-full: rgb(172, 185, 185);
  --tx-color-5: rgba(47, 79, 79, .5);
  --now-color: rgb(64, 115, 243);
  --now-color-5: rgba(64, 115, 243, .5);
  --selected-border: rgba(139, 0, 139, .5);
  --selected-background: rgba(139, 0, 139, .25);
  --pending-border: rgb(255, 166, 58);
  --pending-background: rgba(255, 193, 58, .8);
  --confirmed-border: rgb(23, 113, 0);
  --confirmed-background: rgba(23, 113, 0, .8);
  --cancelled-border: rgb(133, 67, 67);
  --cancelled-background: rgba(133, 67, 67, .5);
  --selected-time: rgba(139, 0, 139, .8);
  --button-bg: rgb(211, 211, 211); /* lightgrey */
  --button-bg-5: rgba(211, 211, 211, .5);
  --itemWidth: 0px;
  --itemHeight: 0px;
  --vw: 100vw;
  --vh: 100vh;
}
*{
  font-family: 'Nunito', sans-serif;
  
  box-sizing: border-box;
  user-select: none; 
}
body{
  color: var(--tx-color);
  background-color: var(--bg-color);
}
button:active{
  /* outline: 5.5px solid rgba(50,205,50,.9); */
  background-color: rgba(50,205,50,.2);
}

.formContainer{
  /* width: var(--vw);
  width: -webkit-fill-available;
  position: absolute;
  top: 0; */
  z-index: 20;
  background-color: rgba(0, 0, 0, 0);
  padding: 15px;
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100dvh; /* important on mobile */

  transform: translateY(calc(100% - 170px));
  /* transition: transform 0.3s ease-out; */
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.formContainer.expanded{
  transform: translateY(0);
}

.topOfForm{
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}

button.iconBtn{
  border: none;
  color: var(--tx-color);
  background-color: var(--bg-color);
  font-size: 1em;
}

.handle{
  font-size: 2em;
  text-align: center;
  opacity: .6;
  flex: 1;
}

.handle > .fa-minus{
  display: block;
}
.handle > .fa-angle-down{
  display: none;
}
.formContainer.expanded > .handle > .fa-minus{
  display: none;
}
.formContainer.expanded > .handle > .fa-angle-down{
  display: block;
}

.selectedTime{
  text-align: center;
  color: var(--selected-time);
}

form{
  border: 2px solid var(--tx-color);
  border-radius: 10px;
  /* width: calc(var(--vw) * 90 / 100); */
  height: fit-content;
  padding: 0 10px 10px 10px;
  /* margin: auto; useless if position absolute */
  /* position: absolute;
  top: 15px; */
  background-color: var(--bg-color);
  /* z-index: 20;
  left: calc(var(--vw) * 5 / 100); */
  /* overflow-y: auto;
  -webkit-overflow-scrolling: touch; iOS */
}
form input, form select, form textarea{
  background-color: var(--bg-color);
  color: var(--tx-color);
}
form .wide{
  width: -webkit-fill-available;
}
ul{
  list-style-type: none;
  display: flex;
  flex-flow: column nowrap;
  gap: .5em;
  padding-inline-start: 20px;
  padding-inline-end: 20px;
}
h3 + ul{
  margin-block-start: 0;
}
form h2{
  text-align: center;
}
form h3{
  margin-bottom: 0;
}
form h6{
  margin: 0;
}
form h4{
  margin: 0;
}
form p{
  line-height: 1.2em;
  margin-bottom: .2em;
}
form label{
  display: inline-block;
  margin-right: 8px;
}
button.textBtn{
  display: flex;
  margin-top: 1em;
  color: var(--tx-color);
  width: fit-content;
  text-align: center;
}
.submitBtn{
  border-top: 2px solid var(--tx-color);
  border-left: 2px solid var(--tx-color);
  border-right: 4px solid var(--tx-color);
  border-bottom: 4px solid var(--tx-color);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 1em;
  font-weight: 600;
  background-color: var(--button-bg);
}
.resetBtn{
  border-top: 1px solid var(--tx-color);
  border-left: 1px solid var(--tx-color);
  border-right: 2px solid var(--tx-color);
  border-bottom: 2px solid var(--tx-color);
  border-radius: 3px;
  padding: 3px 7px;
  font-size: .7em;
  font-weight: 500;
  background-color: var(--button-bg-5);
}
.myRadio{
  padding: 0;
  margin-right: 5px;
  display: inline-block;
  height: 15px;
  width: 15px;
  border-radius: 25px;
  border: 1px solid var(--tx-color);
}
input.myRadio{
  display: none;
}
input.myRadio:checked + label span.myRadio{
  height: 15px;
  width: 15px;
  outline: 2px solid var(--bg-color);
  outline-offset: -3px;
  border: 2px solid var(--tx-color);
  background-color: var(--tx-color);
}

.weeklyContainer{
  display: grid;
  align-content: center;
  justify-content: center;
  border: 1px solid var(--tx-color-5);
  border-radius: 2px;
  max-height: 92vh;
}
.weeklyItem{
  border: 0.5px solid var(--tx-color-3);
  border-radius: 2px;
  z-index: 1;
  font-size: 12px;
  text-align: center;
  line-height: calc(92vh / 22);
  overflow: hidden;
}
.weeklyDay{
  font-size:14px; 
  font-weight:600; 
  line-height: calc(((92vh / 22) * 1.5) / 2); 
  border-radius:2px 2px 0 0; 
  border-bottom:1px solid var(--tx-color-5);
}
.weeklyDateSpan{
  line-height: 22px;
}
.weeklyTitle{
  grid-column: 1 / 9;
  font-size: 14px; 
  font-weight: 600; 
  border-radius: 0; 
  border: .5px solid var(--tx-color-5);
}
.weeklyBtn{
  padding: 0 5px;
  background-color: var(--bg-color);
  border: none;
  
  line-height: calc(92vh / 22);
  font-size: 20px;
  z-index: 10;
}
.sleepArea{
  z-index: 1;
  background-color: var(--tx-color-2);
}
.todayArea{
  border: 2px solid var(--now-color-5);
  border-radius: 3px;
  z-index: 6;
}
.nowArea{
  /* border-top: 3px solid rgba(64, 115, 243, 0.5); */
  background-color: var(--now-color-5);
  z-index: 6;
}
.todayDayArea span.weeklyDaySpan{
  color: var(--now-color);
}
.todayDayArea span.weeklyDateSpan{
  display: inline-block;
  height: 22px;
  width: 22px;
  background-color: var(--now-color-5);
  border-radius: 50px;
}
.weeklyEvent{
  border: 1px solid var(--tx-color);
  border-radius: 8px;
  z-index: 3;
  text-align: center;
  font-size: 12px;
  line-height: 12px;
  overflow: hidden;
}
.weeklyTutto{
  overflow: visible;
}
.weeklyTutto > div{
  margin: 3px 0;
}
.weeklyBuffer{
  border: 0.5px solid var(--tx-color);
  border-radius: 5px;
  z-index: 3;
  /* background-color: rgba(47, 79, 79, .4); */
  /* background-color: rgb(172,185,185); */
  background-color: var(--tx-color-4-full);
}
.weeklyMeal{
  border: 0.5px solid var(--tx-color);
  border-radius: 5px;
  z-index: 4;
  /* background-color: rgba(47, 79, 79, .2); */
  /* background-color: rgb(213,220,220); */
  background-color: var(--tx-color-2-full);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 400;
  font-size: .8em;
}
.unknownArea{
  border: 0.5px solid var(--tx-color);
  border-radius: 5px;
  z-index: 5;
  background-color: var(--tx-color-4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 900;
}
.weeklyAfterDateSpan{
  color: var(--tx-color-3);
}
.pastEvent{
  opacity: .4;
}


.selected{
  border-color: var(--selected-border);
  border-style: dashed;
  border-width: 0 2px;
  border-radius: 0;
  /* border-left-width: 2px;
  border-right-width: 2px; */
  background-color: var(--selected-background);
}
.pending{
  border: 2px solid var(--pending-border);
  border-radius: 5px;
  background-color: var(--pending-background);
  z-index: 3;
}
.confirmed{
  border: 2px solid var(--confirmed-border);
  border-radius: 5px;
  background-color: var(--confirmed-background);
  z-index: 3;
}
.cancelled{
  border: 2px dotted var(--cancelled-border);
  border-radius: 5px;
  background-color: var(--cancelled-background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.topIsTouching{
  border-top-width: 2px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.bottomIsTouching{
  border-bottom-width: 2px;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}
.unavailable{
  pointer-events: none;
}

.legend{
  display: flex;
  flex-flow: column nowrap;
  gap: 1em;
  padding: 1em 0;
}
.legend p, .legend h6{
  margin: 0;
}
.lineLegend{
  display: flex;
  flex-flow: row nowrap;
  gap: .8em;
}
.textLegend{
  flex: 1;
}
.itemLegend{
  width: var(--itemWidth);
  height: var(--itemHeight);
}

#messageBox{
  position: fixed;
  top: 15px;
  z-index: 25;
  width: 100%;
  display: flex;
  justify-content: center;
}

.message{
  border: 2px solid var(--tx-color);
  border-radius: 10px;
  height: fit-content;
  padding: 20px 30px 10px;
  background-color: var(--bg-color);
  text-align: center;
  position: relative;
}

.topRightCorner{
  position: absolute;
  top: 10px;
  right: 10px;
}

/* .waitingScreen{
  background-color: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
} */


.invisible{
  opacity: 0;
  visibility: hidden;
}

.displayNone{
  display: none!important;
}