* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --title: 800 1.5rem/2;
  --label: 600 1rem/1.25;
  --paragraph: 500 1rem/1.25;
  --link: 500 .875rem/1;

  --bg-primary: #F4F5FB;
  --bg-secondary: #FFFFFF;

  --color-brand: #CA3884;
  --color-brand-hover: #A52C6B;
  --color-danger: #C93847;

  --content-primary: #080B12;
  --content-secondary: #374151;
  --content-tertiary: #9CA3AF;
  --always-white: #FFFFFF;

  --border-primary: #D1D5DB;
  --border-hover: #B9C2D0;

}

body {
  background: var(--bg-primary);
  font-family: "Inter", sans-serif;
}

.container {
  max-width: 40rem;
  margin-inline: auto;
}

.top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .44rem;
  margin-top: 1rem;
}

.items {
  display: inline-flex;
  gap: 1rem;


  input {
    border-radius: .75rem;
    height: 2.75rem;
    width: 28.18rem;
    padding-left: 1.125rem;
    border: solid 1px var(--border-primary);
    outline: none;
  }

  input:hover {
    border: solid 1px var(--border-hover);
  }

  input:focus {
    border: solid 1px var(--color-brand);
  }

  button {
    font: var(--label);
    background-color: var(--color-brand);
    color: var(--bg-secondary);
    border-radius: .75rem;
    border: none;
    width: 10rem;
  }

  button:hover {
    background-color: var(--color-brand-hover);
  }

}

.link button {

  background: none;
  border: none;

}

.link {
  cursor: pointer;
  text-decoration: underline;
  margin-top: 3.88rem;
  color: var(--color-brand);
}

header {
  margin-top: 1rem;
}

h1 {
  font-family: 'sora', 'sanserif' var(--title);
}

.mg-top {
  margin-top: 2.75rem;
}

ul {
  margin-top: 2.5rem;

}

.item {
  list-style: none;

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: .75rem;
  padding-right: 1.5rem;
  border: solid 1px;
  margin-bottom: .75rem;
  border-radius: .75rem;

  width: 39.18rem;
  height: 3.06rem;


  border-color: var(--border-primary);
  font: var(--paragraph);
  background-color: var(--bg-secondary);
  color: var(--content-secondary);


  position: relative;

  [type="checkbox"] {
    all: unset;
    position: absolute;
    inset: 2;
    cursor: pointer;
  }

  .checkbox-img {
    flex: 0 0 1rem;
    height: 1rem;
    background-image: url(assets/state=Default.svg);
    margin-right: .75rem;

  }

  &:hover,
  :focus-within {
    .checkbox-img {
      background-image: url(assets/state=hover.svg);
    }
  }

  &:has(:checked) {
    .checkbox-img {
      background-image: url(assets/state=selected.svg);
    }
  }

  .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;

  }
}

p {
  flex: 1;
}

.delete {
  background: none;
  border: none;
  cursor: pointer;

  img {
    width: 1rem;

  }
}


.alert {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;

  border: solid 1px;
  border-radius: .75rem;

  background: var(--color-danger);
  color: var(--always-white);

  margin-top: 2rem;
  width: 39.18rem;
  height: 2.75rem;
  padding: .75rem;


  button {
    background:
      none;
    border: none;
    cursor: pointer;
  }

  span {
    flex: 1;
  }
}

@media (width < 41em) {
  .container {
    max-width: 20rem;
    margin-inline: auto;
  }

  .top {
    display: none;
  }

  .items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

    input {

      height: 2.75rem;
      width: 20.37rem;
      padding-left: 1.125rem;
    }

    button {
      width: 20.37rem;
      height: 2.75rem;
      padding-left: 1.125rem;
    }
  }

  .item {

  height: 2.75rem;
  width: 20.37rem;
}

.alert {
  
  width: 20.37rem;
  height: 2.75rem;
}
}


