@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  /** Base colors */
  --clr-dark-a0: #000000;
  --clr-light-a0: #ffffff;
  --clr-light-a10: #bfbfbf;

  /** Theme primary colors */
  --clr-primary-a0: #e41e5a;
  --clr-primary-a10: #eb476a;
  --clr-primary-a20: #f1647b;

  /** Theme surface colors */
  --clr-surface-a0: #121212;
  --clr-surface-a10: #282828;
  --clr-surface-a15: #333333;
  --clr-surface-a20: #3f3f3f;

  /** Success colors */
  --clr-success-a0: #22946e;
  --clr-success-a10: #47d5a6;
  --clr-success-a20: #9ae8ce;

  /** Warning colors */
  --clr-warning-a0: #a87a2a;
  --clr-warning-a10: #d7ac61;
  --clr-warning-a20: #ecd7b2;

  /** Danger colors */
  --clr-danger-a0: #9c2121;
  --clr-danger-a10: #d94a4a;
  --clr-danger-a20: #eb9e9e;

  /** Info colors */
  --clr-info-a0: #21498a;
  --clr-info-a10: #4077d1;
  --clr-info-a20: #92b2e5;
}



.invisible {
  visibility: hidden;
}


html {
  background-color: var(--clr-surface-a10);
  color: #fff;

  font-family: "DM Sans", sans-serif;

}

body {
  margin: 0px;
}

header {
  padding: 1px 1px 1px 20px;
  background-color: var(--clr-success-a0);
  color: white;
}

main {
  padding: 20px 0px 20px 0px;
}



h2 {
  margin-bottom: 1px;
}

/* //////////// buttons //////////// */

.buttons {
  display: flex;
  justify-content: center;
}

button {
  appearance: none;
  background-color: var(--clr-success-a0);
  border: var(--clr-success-a0) 5px solid;
  border-radius: 20px;
  width: 200px;
  height: 50px;
  font-size: 1.3rem;
  color: white;
  font-weight: bold;
  margin: 0px 5px 0px 5px;

  box-shadow: 0px 6px 0px var(--clr-success-a20);

  transition: all 0.1s ease-in-out;
}

button:active {
  box-shadow: 0px 0px 0px var(--clr-success-a20);
  translate: 0px 6px;
}



/* ////////////// todos /////////////// */


.todosContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.todos {
  display: flex;
  flex-direction: column;
  align-items: stretch;

  width: clamp(0px, 90%, 600px);
  padding: 10px;
  border-radius: 10px;
}


.todo {
  margin: 10px 0px 10px 0px;
  padding: 10px;
  font-size: min(7vw, 2.5rem);

  background-color: var(--clr-surface-a20);
  border-radius: 20px;

  display: flex;
  align-items: center;
}

.completedTodos .todo {
  background-color: var(--clr-surface-a15);
  color: var(--clr-light-a10)
}

.todoCheckBox {
  flex: 0 0 2rem;

  margin-right: 1rem;

  height: 2rem;
  width: 2rem;
  border: 3px solid var(--clr-light-a0);
  border-radius: 10px;

  position: relative;
  display: grid;
  place-items: center;
}

.todoInputTag {
  appearance: none;
  outline: none;

  color: inherit;
  font-size: inherit;
  font-family: inherit;

  background-color: hsla(0, 0%, 0%, 0%);
  border: none;

  /* min-width stops it from acting weird by not allowing it to go smaller than min-content  */
  min-width: 0;
  flex: 1 1 100px;
}

/* /////////////// SVG stuff /////////////// */

svg {
  /* this fixes misallignment */
  display: block;
}

.checkBoxTickContainer {
  pointer-events: none;

  position: absolute;
}

.checkBoxTickPath {
  fill: none;
  stroke: var(--clr-success-a0);
  stroke-width: 14px;
  stroke-linecap: round;

  /* this centers the origin for scaling */
  transform-box: fill-box;
  transform-origin: center;

}


/* ///////// animations //////////// */

.tickUpAnimation {
  animation: tickUp 0.4s ease-in-out;
}

@keyframes tickUp {
  0% {
    scale: 0;
  }

  100% {
    scale: 1;
  }
}
