@import "https://unpkg.com/open-props";

/* RESET /*

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Custom css */

:root {
  font-size: calc(1rem + 0.25vw);
  font-family: var(--font-monospace-code);
  --checkbox-border-color: #8b8c89;
  --checkbox-checked-color: #274c77;
  --checkbox-hover-color: #a3cef1;
  --checkbox-disabled-bg-color: #d9d9d9;
}

html,
body,
div,
header,
nav,
main,
footer {
  max-inline-size: none;
}

/* Layouts */
.with-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-1);
}

.with-sidebar > :first-child {
  flex-grow: 1;
}

.with-sidebar > :last-child {
  flex-basis: 0;
  flex-grow: 999;
  min-inline-size: 50%;
  padding: var(--size-2);
  margin-block-start: 1em;
}

.cluster-end {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-3, 1rem);
  justify-content: flex-end;
  align-items: center;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-3, 1rem);
  justify-content: flex-start;
  align-items: center;
}

.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stack > * {
  margin-block: 0;
} 

.stack > * + * {
  margin-block-start: var(--size-1, 1.5rem);
}

.with-icon {
  display: inline-flex;
  vertical-align: baseline;
  line-height: 1;
}

.with-icon .icon {
  margin-inline-end: var(--size-1)
}

header {
  position: sticky;
  z-index: 3;
  background:  white;
  padding: var(--size-1)
}

:is(a, button) {
  text-align: left;
  background-color: inherit;
}

aside :is(a, button) {
  width: 100%;
}

:is(a:hover, button:hover) {
  background-color: var(--gray-0);
}

:is(a:active, button:active) {
  background-color: var(--gray-0);
}

a {
  padding: var(--size-2) var(--size-1);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

a.selected {
  background-color: var(--gray-3);
  color: var(--red-4);
}

.btn {
  padding: var(--size-2) var(--size-1);
  border: none;
  border-radius: var(--radius-1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px var(--gray-6);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px var(--gray-6);
}

.btn-cancel {
  background-color: var(--red-5)
}

.btn-cancel:hover {
  background-color: var(--red-6)
}

.btn-submit {
  background-color: var(--green-5)
}

ul {
  list-style-type: none;
  padding: 0;
}

.sidebar-icon {
  display: none;
  border: none;
  background: inherit;
  padding: 0;
  overflow-x: auto;

  @media (max-width: 1024px) {
    display: flex;
  }
}

.sidebar {
  width: var(--size-13);
  padding: var(--size-2);
  transform: translateX(0);
  transition: transform 300ms ease-out;
  background: white;

  @media (max-width: 1024px) {
    position: fixed;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 2;

    &.open {
      transform: translateX(0);
    }
  }
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  display: none;

  @media (max-width: 1024px) {
    display: block;
  }
}

#list-items {
  padding: var(--size-1);
}

.box {
    border: 0.15em solid currentColor;
    border-radius: 0.15em;
    color: currentColor;
    display: grid;
    font: inherit;
    font-size: 1.2rem;
    height: 22px;
    padding: 5px;
    place-content: center;
    pointer-events: all;
    width: 22px;
}

.checked::before {
    box-shadow: inset 1em 1em #FFF1E8;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    content: "";
    height: 0.50em;
    width: 0.50em;
}

.pop {
    animation: pop .3s ease;
    pointer-events: none;
}

.bg {
  background-color: #008751;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

