:root {
  --bg-color: #f3bbcc;
  --primary-color: #111;
  --primary-color: rgb(163, 18, 47);
  --green-color: rgb(73, 204, 73);
  --color-purple: rgb(176, 61, 243);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: rgb(190, 228, 228);
  color: var(--primary-color);
}
li {
  list-style: none;
}
.container {
  max-width: 850px;
  margin: auto;
  padding: 0 1rem;
}
/* Heading */
.grocery-heading {
  text-align: center;
  font-size: calc(2rem + 3vw);
  color: rgb(163, 18, 47);
  margin: 2rem auto;
}
.grocery-input-area {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-bottom: 4rem;
}
.input {
  display: flex;
}
input {
  background-color: #fff;
  padding: 0.9rem;
  outline: none;
  border: 1px solid var(--primary-color);
  font-size: 1.1rem;
  color: var(--color-purple);
  /* width: 25rem; */
}
.buy-btn {
  padding: 0.7rem;
  background-color: var(--primary-color);
  outline: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}
.buy-btn:hover {
  background-color: #fff;
  color: var(--primary-color);
}

/* Select */
select {
  -moz-appearance: none;
  -ms-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  border: none;
}

.filter {
  padding: 0.7rem;
  margin-left: 0.2rem;
  position: relative;
  overflow: hidden;
}
.filter-groceries {
  cursor: pointer;
  color: var(--primary-color);
  width: 9rem;
  padding: 1rem;
  transition: all 0.3s ease;
}
.filter::after {
  content: '\25BC';
  position: absolute;
  right: 2px;
  bottom: 12px;
  padding: 0.85rem;
  cursor: pointer;
  pointer-events: none;
}
.filter:hover::after {
  background-color: var(--primary-color);
  color: #fff;
}
/* List body */
.grocery-container {
  margin: auto;
  max-width: 80vw;
}
.grocery-list {
  padding-left: 0px;
  margin-left: 0;
}
.grocery {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem;
  border-bottom: 1.5px solid rgb(221, 207, 207);
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: #fff;
  margin: auto;
  margin-top: 1rem;
  box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  font-size: calc(1rem + 1vw);
}
.grocery .fa-check-circle {
  color: var(--green-color);
}
.grocery .text {
  flex: 1;
  margin-left: 0.4rem;
  color: var(--color-purple);
  margin-right: 0.3rem;
}
.text-border {
  border: 1px solid var(--color-purple);
  padding: 0.3rem;
}
.line-through {
  text-decoration: line-through;
  opacity: 0.5;
}
.fall {
  transform: translateY(8rem) rotateZ(20deg);
  opacity: 0;
}

[contentEditable] {
  padding: 0.3rem;
}
[contentEditable]:focus,
[contentEditable]:hover [contentEditable]:active {
  border: 1px solid var(--color-purple);
  outline: ipx solid var(--color-purple);
}
.co {
  color: rgb(212, 207, 207);
  cursor: pointer;
}
.trash-btn,
.edit-btn {
  cursor: pointer;
  color: var(--primary-color);
  padding: 0.7rem;
  background: var(--primary-color);
  border: none;
  outline: none;
  color: #fff;
  transition: all 0.3s ease;
}
.edit-btn{
  background-color: var(--green-color);
  margin-right: 0.2rem;
}
.edit-btn:hover, .edit-btn:hover {
  background-color: #fff;
  color: var(--green-color);
}
.edit{
  display: none;
}
.edit.active{
  display: flex;
}
.edit-check{
  display: none;
}
.edit-check.active{
  display: flex;
}
.trash-btn:hover {
  background-color: #fff;
  color: var(--primary-color);
}

/* Clear */
.clear {
  text-align: center;
  margin: 1rem;
}
.clear-txt {
  font-size: calc(1rem + 1vw);
  cursor: pointer;
}
.clear-txt:hover {
  text-shadow: 0 3px 6px rgba(100, 0, 255, 0.5);
}

/* MEDIA QUERIES */
/* Bigger phones */
@media (min-width: 500px) {
  .grocery-input-area {
    flex-direction: row;
  }
}
/* Tablets */
@media (min-width: 670px) {
  .container {
    padding: 0 6rem;
  }
  input {
    width: 17rem;
  }
  .grocery-container {
    max-width: 30rem;
  }
}

@media (min-width: 820px) {
  .container {
    padding: 0 6rem;
  }
  input {
    width: 22rem;
  }
  .grocery-container {
    max-width: 36rem;
  }
}
/* Laptops  & PCs */
@media (min-width: 960px) {
  .container {
    padding: 0 5rem;
  }
  input {
    width: 26rem;
  }
  .filter-groceries {
    width: 10rem;
  }
  .grocery-container {
    max-width: 40rem;
  }
  ;
}
