html{
  scroll-behavior:smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body{
  margin:0;
}

body, html {
  box-sizing: border-box;
  min-height: 100%;
}


body[data-theme="light"]{
  background-color:rgb(200,201,203);
  min-height: 100%;
}

body[data-theme="dark"]{
  background-color:rgb(30,31,33);
  min-height: 100%;
}

body[data-theme="dark"] input[type="date"], body[data-theme="dark"] input[type="time"]{
  color-scheme:dark;
}

body[data-theme="light"] input[type="date"], body[data-theme="light"] input[type="time"]{
  color-scheme:light;
}

p, a, li, h1, h2, label, button, input, option, select, td, th{
  font-family: 'League Spartan', 'Arial', 'Helvetica', sans-serif;
  color:rgb(255,255,255);
}

option{
  color:black;
}

button {
  cursor:pointer;
  font-size:2ch;
}

i.material-icons-outlined, i.material-icons, 
span.material-icons-outlined, span.material-icons{
  vertical-align: -17%;
  font-size:150%;
  text-shadow: -1px 1px 3px rgb(50,50,50,0.6);
}

h2 :is(span.material-icons-outlined, span.material-icons) {
  font-size: 100%;
}

input,select{
  border-radius:0.4rem;
  outline:none;
  padding:0.25rem;
  border:black 3.5px solid;
  position:relative;
  transition: border 0.2s;
  background-color:rgba(20,20,20,0.2);
  color:white;
}

input:focus, select:focus, input:invalid:focus{
  border:white 3.5px solid;
  transition: border 0.2s;
}

input:invalid{
  border:darkred 3.5px solid;
  transition: border 0.2s;
}

input:has(:invalid,:focus){
  border:white 3.5px solid;
  transition: border 0.2s;
}

.error{
  color:rgb(190,30,0);
  font-weight:bold;
  margin:0;
  text-align: center;
}

#notask {
  display:none;
  text-align:center;
  position:absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%,-50%);
  cursor:default
}

.event-list{
  overflow-x: hidden;
  overflow-y: auto;
  width: fit-content;
  padding-right:0.2rem;
  margin-bottom:0.5rem;
  margin-right:0.25rem;
  cursor:default;
  display:inline-block;
  vertical-align:top;
  width: 50%;
  max-width: 570px;
  scroll-behavior: smooth;
}

.titles {
  display: flex;
}

#upcoming-tasks {
  width: 50%;
  max-width: 570px;
}

.event-container{
  margin-top: 8px;
  margin-left: 16px;
  display: flex;
}

.event-container > div{
  display:inline-block;
}


.date, .task-date{
  vertical-align:top;
  width: 41px;
}

.task-date {
  height: fit-content;
  min-height: 72.4px;
  min-width: 72.4px;
  box-sizing: border-box;
}

.event{
  margin-bottom:0.2rem;
  margin-left:0.5rem;
  overflow-wrap: break-word;
}

.events{
  width: 480px;
}

.event.important{
  border-color:rgb(120,0,0);
}

.event.important ::selection{
  background-color:rgb(120,0,0);
}

.event.completed p {
  text-decoration: line-through;
}

.date, .event,
.task-date {
  background-color: rgb(150,150,150);
  border: rgb(120,120,120) 6.4px solid;
  border-radius: 16px;
  padding: 3.2px 8px;
}

.task-date .task-week-day, .task-date .task-month{
  font-size: 1.8ch;
  text-align: center;
  margin: 0;
  max-height: 14px;
}

.task-date .task-day{
  font-size: 3.5ch;
  margin: 0;
  text-align: center;
  font-weight: 500;
  max-height: 26px;
}

.event .event-title{
  font-weight: bold;
  font-size: 3.1ch;
  margin: 1.6px 4.8px;
}

.event .event-title {
  display: flex;
}

.event .event-description{
  margin: 3.2px 5.6px;
  font-size: 2.5ch;
}

.event .event-additional{
  margin-bottom: 4.8px;
  margin-left: 5.6px;
  font-size: 2.1ch;
}

.eventcheckbox, .eventcheckbox ~ label{
  margin-top: 3.2px;
}

.evn-title p, .event-title span{
  display:inline-flex;
  vertical-align:top;
}

.event-title .late {
  color: #ff8200;
  font-size: 2ch;
}

.event-title p{
  margin-top: 3.2px;
  margin-bottom: 0;
  margin-left: 1.6px;
  white-space: no-wrap;
}

.lists {
  display: flex;
}

.lists .event-button{
  border: 0;
  background-color: rgb(150,150,150);
  border-radius: 9.6px;
  padding: 4.8px;
  transition: background-color 0.2s;
  margin-right: 3.2px;
  user-select: none;
  -webkit-user-select: none;
}

.event-list {
  position: relative;
}

:has(#notask[style="display: block;"]) .event-list:empty::before {
  display: none;
}

.event-list:empty::before {
  color: white;
  font-family: 'League Spartan', Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  top: 5%;
  padding-left: 20px;
}

#event-list:empty::before {
  content: "You don't have any tasks left to complete!";
}

#completed-list:empty::before {
  content: "You haven't completed any tasks yet.";
}

button.event-button:hover, button.event-button:focus-visible{
  border: 0;
  background-color: rgb(105,105,105);
  transition: background-color 0.2s;
}

.event-button .material-icons-outlined {
  font-size: 150%;
  vertical-align: -28%;
}

.popup button, .section-title, .toggle {
  color: white;
  border-radius: 10px;
  font-weight: bold;
  padding-left: 3.2px;
  padding-right: 3.2px;
  margin-top: 4px;
  margin-bottom: 4px;
  text-decoration: none;
  line-height: 1;
  border-width: 5.6px;
  border-style: solid;
}

[data-accent="Red"] :is(.popup button, .section-title, .toggle) {
  background-color: #cd3624;
  border-color: rgb(150,0,0);
}

[data-accent="Orange"] :is(.popup button, .section-title, .toggle) {
  background-color: #ea9a36;
  border-color: rgb(150,100,0);
}

[data-accent="Yellow"] :is(.popup button, .section-title, .toggle) {
  background-color: #c8af37;
  border-color: rgb(140,140,0);
}

[data-accent="Green"] :is(.popup button, .section-title, .toggle) {
  background-color: #42be43;
  border-color: rgb(0,120,0);
}

[data-accent="Blue"] :is(.popup button, .section-title, .toggle) {
  background-color: #639abc;
  border-color: rgb(0,100,200);
}

[data-accent="Violet"] :is(.popup button, .section-title, .toggle) {
  background-color: #9571d5;
  border-color: rgb(80,0,200);
}

.toggle{
  display: none;
  margin-left: 16px;
  font-size: 3ch;
}

#mobile-l, #mobile-r {
  display: none;
}

/*DISPLAY SCALING*/
@media only screen and (max-width:890px){
  .lists {
    display: block;
  }

  .titles, .section-title  {
    display: none;
  }

  .event-list {
    width: 99%;
    max-width: 600px;
  }

  #mobile-l {
    display: block;
  }

  .events {
    width: 510px;
  }

  #toggle-completed {
    display: block;
  }

  .lists:has(.toggle[data-toggled="false"]) :is(#mobile-r, #completed-list){
    display: none;
  }

  .lists:has(.toggle[data-toggled="false"]) :is(#mobile-l, #event-list){
    display: block;
  }

  .lists:has(.toggle[data-toggled="true"]) :is(#mobile-r, #completed-list){
    display: block;
  }

  .lists:has(.toggle[data-toggled="true"]) :is(#mobile-l, #event-list){
    display: none;
  }
}

@media only screen and (max-width:560px){
  .event{
    margin-left: 0;
  }
  .date, .task-date{
    margin-bottom: 0.2rem;
  }
  .eventlist{
    margin-left: 0;
  }
  .event-container {
    display: block;
  }
  .events {
    width: 99%;
  }
}

@media only screen and (min-width:1120px){

}

/*SCROLLBARS*/
body[data-accent] ::-webkit-scrollbar {
    background-color: #282a2b;
    width: 14.4px;
    border-radius: 100vw;
    transition: background-color 0.4s;
}
body[data-accent] ::-webkit-scrollbar-track {
    background-color: #282a2b;
    border-radius: 100vw;
}

body[data-accent] ::-webkit-scrollbar-thumb {
  border-radius: 100vw;
  transition: background-color 0.4s;
  border: 3.2px solid #282a2b;
}

body[data-accent="Red"] ::-webkit-scrollbar-thumb{
    background-color: #b93d2a;
}

body[data-accent="Orange"] ::-webkit-scrollbar-thumb{
    background-color: #ea9a36;
}

body[data-accent="Yellow"] ::-webkit-scrollbar-thumb{
    background-color: #c8af37;
}

body[data-accent="Green"] ::-webkit-scrollbar-thumb{
    background-color: #42be43;
}

body[data-accent="Blue"] ::-webkit-scrollbar-thumb{
    background-color: #639abc;
}

body[data-accent="Violet"] ::-webkit-scrollbar-thumb{
    background-color: #9571d5;
}

.section-title{
  font-size: 3.2ch;
  padding: 4.8px;
  padding-top: 7.2px;
  padding-bottom: 7.2px;
  margin-left: 16px;
  width:fit-content;
  cursor:default;
}

#compright{
  margin-left:1.25rem;
}

/*ANIMATIONS*/
.round{
  text-align:center;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}

.round .done{
  background-color: rgb(0,200,0);
  animation-duration: 0.8s;
  color: rgb(255,255,255);
  font-size: 6ch;
  padding: 48px;
  border-radius: 100%;
  width: fit-content;
}

.round .close{
  background-color:rgb(200,0,0);
  animation-name: circleanimate;
  animation-duration: 0.8s;
  -webkit-animation-name: circleanimate;
  -webkit-animation-duration: 0.8s;
  color: rgb(255,255,255);
  font-size: 6ch;
  padding: 48px;
  border-radius: 100%;
  width: fit-content;
}

@keyframes circleanimate {
  from {border-radius:0; transform: rotate(450deg)}
  to {border-radius:100%; transform: rotate(0deg)}
}

.restoreicon{
  animation-name:restorespin;
  animation-duration:0.35s;
  -webkit-animation-name:restorespin;
  -webkit-animation-duration:0.35s;
}

@keyframes restorespin{
  from {transform: rotate(359deg)}
  to {transform: rotate(0deg)}
}

.completeicon{
  animation-name:completebounce;
  animation-duration:0.650s;
  -webkit-animation-name:completebounce;
  -webkit-animation-duration:0.650s;
}

@keyframes completebounce{
  0%{font-size:150%;vertical-align:-28%}
  50%{font-size:100%;vertical-align:-23%}
  100%{font-size:150%;vertical-align:-28%}
}