@font-face {
  font-family: 'Switzer';
  src: url('Switzer-Variable.woff2') format('woff2');
  font-weight: 100 900;
}

body {
  font-family: 'Switzer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

main {
  height: 100vh;

  --z_onboarding: 100;
  --z_controls: 50;
  --z_switch: 1;
  --primary-100: hsla(180deg, 30%, 95%, 100%);
  --primary-200: hsla(180deg, 50%, 90%, 100%);
  --primary-300: hsla(173deg, 36%, 64%, 100%);
  --primary-400: hsla(178deg, 31%, 50%, 100%);
  --primary-500: hsla(178deg, 38%, 40%, 100%);
  --primary-600: hsla(180deg, 40%, 30%, 100%);
  --primary-700: hsla(180deg, 37%, 25%, 100%);
  --primary-800: hsla(180deg, 20%, 30%, 100%);
  --primary-900: hsla(180deg, 33%, 22%, 100%);
  --primary-950: hsla(183deg, 40%, 10%, 100%);

  --destructive-100: hsla(10deg, 20%, 95%, 100%);
  --destructive-200: hsla(10deg, 30%, 90%, 100%);
  --destructive-300: hsla(10deg, 30%, 80%, 100%);
  --destructive-500: hsla(10deg, 30%, 40%, 100%);
  --destructive-800: hsla(10deg, 35%, 20%, 100%);

  --base-white: hsla(0deg, 0%, 98%, 100%);
  --base-white-80: hsla(0deg, 0%, 98%, 80%);
  --base-50: hsla(190deg, 2%, 97%, 100%);
  --base-100: hsla(190deg, 2%, 98%, 100%);
  --base-200: hsla(190deg, 2%, 92%, 100%);
  --base-300: hsla(190deg, 2%, 87%, 100%);
  --base-400: hsla(190deg, 2%, 73%, 100%);
  --base-500: hsla(190deg, 2%, 60%, 100%);
  --base-600: hsla(190deg, 2%, 40%, 100%);
  --base-700: hsla(190deg, 2%, 35%, 100%);
  --base-800: hsla(190deg, 2%, 30%, 100%);
  --base-900: hsla(190deg, 5%, 20%, 100%);
}

.app {
  display: flex;
  flex-direction: row;
  height: 100%;
}


.section-head {
  font-size: .8rem;
  text-transform: uppercase;
  /* font-weight: normal; */
  font-weight: 600;
  color: var(--base-900);
  /* border-top: 1px solid hsla(0deg, 0%, 68.5%, 100%); */
  border-top: 1px solid var(--base-400);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-top: 0.25rem;
  letter-spacing: 0.25px;
}

.section-head--flush {
  margin-top: 0;
}

.canvas__wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  /* box-shadow: 1px 1px 1px black; */
}

#canvas__main {
  flex-grow: 1;
  /* width: 100%; */
  height: 100%;
  cursor: none;
}

.test-div {
  background-color: blue;
  flex-grow: 1;
  height: 100%;
}


.start-stop {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.switch__wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* justify-content: space-between; */
}

.switch {
  --switch-width: 2.5rem;
  --switch-height: 1rem;
  --switch-padding: .15rem;
  --switch-toggle-size: calc(var(--switch-height) - ( 2 * var(--switch-padding)));
  appearance: none;
  background-color: hsla(180deg, 10%, 98%, 100%);
  border: 1px solid hsla(180deg, 10%, 20%, 100%);
  position: relative;
  width: var(--switch-width); 
  height: var(--switch-height);
  border-radius: var(--switch-width);
  vertical-align: middle;
  /* margin: auto; */

  /* -webkit-apperance: none; */
  /* -moz-apperance: none; */
  /* apperance: none; */
}

.switch::before {
  --switch-transition-time: 200ms;
  content: "" ;
  position: absolute;
  top: 50%;
  left: 0%;
  width: var(--switch-toggle-size);
  height: var(--switch-toggle-size);
  background-color: hsla(180deg, 10%, 30%, 100%);
  border-radius: 50%;
  transform: translate(var(--switch-padding), -50%);
  transition: left var(--switch-transition-time) ease-out, transform var(--switch-transition-time) ease-in-out;
}

.switch:checked {
  background-color: hsla(180deg, 50%, 90%, 100%);
  border: 1px solid hsl(180deg, 20%, 30%, 100%);
}

.switch:checked::before {
  /* transform: translate(200%, -50%); */

  right: 0%;
  left: 100%;
  background-color: hsla(180deg, 40%, 30%, 100%);
  transform: translate(calc(-100% - var(--switch-padding)), -50%);

}

.cursor {
  --cursorX: 45vw;
  --cursorY: 45vh;
  --brush-c1: hsla(0deg, 73%, 45%, 100%); 
  --brush-c2: hsla(36deg, 99%, 45%, 100%); 
  --brush-c3: hsla(59deg, 99%, 45%, 100%); 
  --brush-c4: hsla(107deg, 99%, 45%, 100%); 
  --brush-c5: hsla(196deg, 99%, 45%, 100%); 
  position: absolute;
  pointer-events: none;
  transform: translate(
    calc(var(--cursorX) - 50%), 
    calc(var(--cursorY) - 50%)
  );
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 2.5rem;
  /* width: 2rem; */
  /* height: 2rem; */
  /* background-image: url('./BrushCursor.svg'); */
  /* background-size: 2rem; */
  /* background-repeat: no-repeat; */
  /* background:  */
    /* radial-gradient( */
    /* 50% 50% at 50% 50%,  */
    /* #FBE23E 12.98%,  */
    /* rgba(125, 125, 125, 0.8) 12.98%,  */
    /* rgba(80, 80, 80, .9) 12.25%; */
    /* rgba(252, 234, 119, 0.707182) 53.37%,  */
    /* rgba(190, 190, 190, 0.707182) 53.37%,  */
    /* rgba(255, 255, 255, 0) 100%); */
}

.cursor svg {
  width: 100%;
  height: 100%;
}

.offscreen {
  transform: translate(0, -10px);
  opacity: 0%;
  transition: transform 300ms ease-out, opacity 200ms ease; 
}

/* .hideable { */
/*   transition: transform 4000ms ease-out, */
/*               opacity 4000ms ease-in ; */
/* } */

.controls {
  flex-direction: column;
  min-width: 308px;
  max-width: max-content; 
  padding: 1rem;
  /* background-color: hsla(20deg, 5%, 97%, 100%); */
  background-color: var(--base-50);
  /* border-right: 3px solid hsla(12deg, 40%, 95%, 100%); */
  /* border-right: 3px solid hsla(12deg, 10%, 95%, 100%); */
  border-right: 3px solid var(--base-200);
  /* box-shadow: inset 2px 1px 20px 1px hsla(10deg, 5%, 5%, 8%); */
}

.controls__title {
  display: none;
}

.shapes__options {
  --shape-color: hsla(160deg, 0%, 38%, 100%);
  --off-bg: hsla(0deg, 0%, 98%, 100%);
  --off-bg--hover: hsla(0deg, 0%, 86%, 100%);
  --off-bg--active: hsla(0deg, 0%, 75%, 100%);
  --off-stroke: hsla(0deg, 0%, 63%, 100%);
  --off-stroke--hover: hsla(0deg, 0%, 51%, 100%);
  --off-stroke--active: hsla(0deg, 0%, 37%, 100%);
  --off-shape: hsla(0deg, 0%, 38%, 100%);
  --off-shape--hover: hsla(0deg, 0%, 27%, 100%);
  --off-shape--active: hsla(0deg, 0%, 16%, 100%);
  --on-bg: hsla(131deg, 49%, 65%, 100%);
  --on-bg--hover: hsla(131deg, 51%, 47%, 100%);
  --on-bg--active: hsla(131deg, 58%, 28%, 100%);
  --on-stroke: hsla(134deg, 39%, 11%, 100%);
  --on-shape: hsla(132deg, 65%, 10%, 100%);
  --on-shape--hover: hsla(132deg, 66%, 10%, 100%);
  --on-shape--active: hsla(132deg, 70%, 6%, 100%);
  --stroke-weight: 1px;
  margin: 1rem auto;
  display:flex;
  transition: transform 120ms ease-out,
              opacity 100ms ease-in ;
  gap: .25rem;
}

.shapes__options label {
  background-color: var(--off-bg);
  border: 1px solid var(--off-stroke);
  padding: .55rem;
  margin-left: -1px;
  --shape-color: hsla(160deg, 0%, 38%, 100%)
  /* border-left: 0; */
  /* border-radius: 50%; */
}

.shapes__options label:first-of-type {
  /* border-left: 1px solid var(--off-stroke); */
}

.shapes__options input:checked label:first-of-type {
  /* border-left: 1px solid var(--off-stroke); */
}

.shapes__options input:checked + label {
  border: 1px solid var(--on-stroke);
  border-color: var(--on-stroke);
  /* outline-offset: -2px; */
  box-shadow: inset 1px 1px 0px 1px var(--on-stroke), inset -1px -1px 0px 1px var(--on-stroke);
  background-color: var(--on-bg);
  z-index: var(--z_switch);
  /* margin-left: -2px; */
  --shape-color: var(--on-shape);
}

.shapes__options input:checked label:first-of-type {
  /* border-left: 1px solid var(--on-stroke); */
}

.shapes__options label:hover {
  --shape-color: var(--off-shape--hover);
  background-color: var(--off-bg--hover);
  outline-color: var(--off-stroke--hover);
  cursor: pointer;
}

.shapes__options label:active{
  background-color: var(--off-bg--active);
  --shape-color: var(--off-shape--active);
  /* outline: 2px solid hsla(0deg, 0%, 30%, 100%); */
  /* outline-offset: -1px; */
  transform: scale(98%);
}

.shapes__options input:checked + label:hover {
  background-color: var(--on-bg--hover);
  --shape-color: var(--on-shape--hover);
}

.shapes__options input:checked + label:active {
  background-color: var(--on-bg--active);
  --shape-color: var(--on-shape--active);
  /* box-shadow: 1px 1px 3px 3px hsla(5.7, 90%, 50%, 0%); */
}


/* .brush-color__auto-toggle:has(input:checked) + .brush-color__selector { */
/*   display:none; */
/* } */

input[type="color"] {
  /* --color-input-size: 2.25rem; */
  --color-input-size: 2.75rem;
  height: var(--color-input-size);
  width: 100%;
  background-color: transparent;
  padding: 0;
  border: 1px solid hsla(0deg, 0%, 20%, 100%);
  /* border-radius: 50%; */
  border-radius: .25rem;
  margin-top: 0.5rem
}

input[type="color"]::-moz-color-swatch {  
  border: 0;  
  /* border-radius: 50%; */
}

input[type="color"]::-webkit-color-swatch-wrapper { 
  padding: 0;
}

input[type="color"]::-webkit-color-swatch { 
  border: 0;  
  /* border-radius: 50%; */
}

select {
  apperance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--primary-900);
  border-radius: 0.25rem;
  padding: 0.5rem;
  padding-right: 2rem;
  background-color: var(--base-200);
  background-image: url("data:image/svg+xml;utf8,<svg fill='transparent' stroke='hsla(180deg, 20%, 30%, 100%)' stroke-width='2px' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M 5 9 L 12.5 17 L 19 9 '/></svg>");
  background-repeat: no-repeat;
  background-position: 98% center;
}

select:hover {
  bacgkround-color: var(--primary-300);
  border-color: var(--primary-900);
}

.a-button {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  border: 1px solid var(--base-900);
  cursor: pointer;
}

.a-button:active {
  transform: scale(98%);
}

.a-button--primary {
  background-color: var(--primary-100);
  color: var(--primary-800);
  border: 1px solid var(--primary-800);
}

.a-button--primary:hover {
  background-color: var(--primary-200);
  color: var(--primary-900);
}

.a-button--primary:active {
  background-color: var(--primary-300);
}

.a-button--destructive {
  background-color: var(--destructive-100);
  color: var(--destructive-500);
  border-color: var(--destructive-500);
}

.a-button--destructive:hover {
  background-color: var(--destructive-200);
}

.a-button--destructive:active {
  background-color: var(--destructive-300);
  color: var(--destructive-800);
}

.a-button--excited {
  font-size: 1.1rem;
  background-color: var(--primary-800);
  color: var(--primary-100);
  border: none;
  padding: 0.5rem 1rem;
  min-width: 120px
}

.a-button--excited:hover {
  background-color: var(--primary-900);
  color: var(--primary-200);
}

.a-button--excited:active {
  background-color: var(--primary-950);
}

.a-button--text {
  border: none;
  background-color: transparent;
  color: var(--primary-600);
  padding: 0.5rem 0.5rem;
}

.a-button--text:hover {
  background-color: var(--base-200);
  color: var(--primary-800);
}

.a-button--text:active {
  bacgkround-color: var(--base-300);
  color: var(--primary-900);
}


/* .shapes__options input, */
.custom-checkbox,
.sr-only {
  position: absolute;
  left: -100vw;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.save-button {
  position: absolute;
  bottom: 1.5rem;
  left: .5rem;
  font-size: 1rem;
}

.onboarding__wrapper {
  width: 100vw;
  height: 100vh;
  position: absolute;
  background-color: hsla(0deg, 0%, 98%, 80%);
  z-index: var(--z_onboarding);
  display: flex;
}

.onboarding__main {
  --modal-size: 620px;
  padding: 1.5rem 1.75rem 1.75rem;
  opacity: 100;
  background-color: hsla(180deg, 30%, 95%, 100%);
  border-radius: 4px;
  border: 1px solid var(--primary-700);
  filter: blur(0px);
  max-width: var(--modal-size);
  align-self: center;
  margin: 0rem auto 3rem;

  @media screen and (max-width: 678px) {
    width: 100%;
    margin-left: 2rem;
    margin-right: 2rem;
  }
}

.onboarding__main h1,
.onboarding__main p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--base-900);
}

.onboarding__main h1 {
  line-height: 1.25;
}

.onboarding__main button {
  margin-top: 0.5rem;
}

@media screen and (max-width: 678px) {
  .controls {
    position: absolute;
    bottom: 0;
    width: 100vw;
    max-width: 100%;
    border-right: none;
    border-top: 2px solid var(--primary-800);
    height: min-content;
    z-index: var(--z_controls);
    padding-top: 0;
    padding-bottom: 0;
  }

  .controls__title {
    display: unset; 
  }

  h2.controls__title {
    font-size: 1rem;
    font-weight: bold;
  }

  .controls-toggle {
    display: flex;
    justify-content: space-between;
    background-color: var(--primary-200);
    color: var(--primary-900);
    border: none;
    cursor: pointer;
    width: calc(100% + 2rem);
    padding: 1rem;
    margin-left: -1rem;
  }


  .toggle__icon {
    transition: transform 250ms ease-out;
  }

  .controls:has(.controls-toggle[aria-expanded="false"]) .controls__main {
    display: none;
  }

  .controls:has(.controls-toggle[aria-expanded="true"]) .controls__main {
    display: block;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .controls:has(.controls-toggle[aria-expanded="true"]) .toggle__icon {
    transform: rotate(180deg);
  }

  .save-button {
    position: relative;
    bottom: unset;
    left: unset;
    margin-top: 1rem;
    padding-left: 0;
  }
}


/* Utils */

.fade-out {
  transform-origin: center center;
  opacity: 0;
  filter: blur(5px);
  /* transition: transform 400ms ease, opacity 400ms ease, filter 400ms ease; */
  transition: filter 400ms ease-in, opacity 400ms ease-in;
  max-width: var(--modal-size);
}

.emoji {
  padding-right: 0.25rem;
}

.shrink {
  transform: scale(80%);
  transition: transform 400ms ease-in;
}

.hidden {
  display: none;
}

