/* 
  PALETTE >:/ (made with Coolors.co)
*/

:root {
  --color-bg: #162b29;
  --color-surface: #1E3835;
  --color-text: #E0E4CC;
  --color-accent-1: #8C7A5B;
  --color-accent-2: #52635B;
  --color-highlight: #A3B29D;
  --color-subtle: #122422;
}

/* 
  General Styling
*/

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


html {
  font-size: 18px;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1.2em;
  line-height: 1.6;
  overflow-x: hidden;
}

h1 {
  text-align: center;
}


.hidden,
.meal.hidden,
.view.hidden,
#home-view.hidden,
#meals-view.hidden {
  display: none;
}

.view {
  text-align: center;
}

.page-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

#home-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.daily-plan {
  background-color: var(--color-text);
  border-radius: 12px;
  border: 2px solid var(--color-highlight);
  margin-left: auto;
  margin-right: auto;
  max-width: 450px;
  width: 100%;
  height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 12px;
  transition: border-color .4s ease-in-out, transform .6s ease-in-out;
}

.daily-plan:hover {
  transform: scale(101%);
  border-color: var(--color-accent-1);

  .meal-selection-type,
  .meal-selection:not(:last-child) {
    border-color: var(--color-accent-1);
  }
}

.meal-selection {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.meal-selection:not(:last-child) {
  border-bottom: 2px solid var(--color-highlight);
  transition: border-color .4s ease-in-out;
}

.meal-selection-type {
  margin-top: -70px;
  background-color: var(--color-text);
  color: var(--color-subtle);
  width: 130px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 6px;
  border: 2px solid var(--color-highlight);
  transition: border-color .4s ease-in-out;
}

.meal-selection-add {
  border-radius: 50%;
  background-color: var(--color-accent-1);
  border: 2px solid var(--color-bg);
  color: var(--color-bg);
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: transform .3s ease-in-out;
}

.meal-selection-add:hover {
  transform: scale(111%);
  border-color: var(--color-subtle);
  color: var(--color-subtle);
}

.weekly-plan {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: #52635B;
  border-radius: 24px;
  border: 2px solid var(--color-highlight);
}

.weekly-plan .daily-plan {
  max-width: 300px;
  width: 100%;
  height: 300px;
}

.weekly-plan .meal-selection-type {
  margin-top: -40px;
  font-size: 16px;
}

.weekly-plan .meal-selection-add {
  width: 28px;
  height: 28px;
}

.planner-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.planner-cell-day {
  text-align: center;
  width: 100%;
  font-size: 25px;
}

.grocery-list {
  background: var(--color-text);
  color: var(--color-subtle);
  min-height: 500px;
  width: 75%;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
}

.grocery-list-items {
  list-style: none;
  padding: 0;
}

.meals-results {
  background: var(--color-text);
  width: 100%;
  max-width: 1000px;
  height: 750px;
  border-radius: 12px;
  border: 2px solid var(--color-highlight);
  overflow-y: hidden;
}

.scroll-box {
  width: 100%;
  height: 90%;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}

.meal {
  text-align: center;
  display: flex;
  justify-content: space-between;
  width: 50%;
  border: 2px solid var(--color-highlight);
  padding: 6px;
  border-radius: 12px;
  margin: 6px 0;
  align-items: center;
  transition: transform .5s ease-in-out;
  cursor: pointer;
}

.meal:hover {
  transform: scale(105%);
}

.meal span {
  width: 100%;
  color: var(--color-bg);
}

.meal img {
  border: 2px solid var(--color-highlight);
  border-radius: 12px;
}

.meals-filter {
  position: relative;
}

.meals-filter-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background-color: var(--color-highlight);
  border: 2px solid var(--color-accent-2);
  border-radius: 6px;
  height: 300px;
  padding: 10px;
  overflow-y: auto;
}

.meals-filter-panel button {
  cursor: pointer;
  background: none;
  border: none;
  font-size: large;
}

.meals-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.meals-filter-option {
  color: var(--color-bg);
  margin: 6px;
  padding: 3px;
  border-radius: 6px;
  cursor: pointer;
}

.meals-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.meals-search {
  border-radius: 6px;
  background: var(--color-text);
  border: 2px solid var(--color-highlight);
  color: var(--color-bg);
  height: 35px;
}

.meals-close {
  color: var(--color-bg);
  background: var(--color-text);
  border: 2px solid var(--color-highlight);
  border-radius: 16px;
  cursor: pointer;
}

.meals-filter-toggle {
  color: var(--color-bg);
  background: var(--color-text);
  border: 2px solid var(--color-highlight);
  border-radius: 16px;
}

.selected-meal-display button {
  cursor: pointer;
  background: none;
  border: none;
  font-size: large;
  color: rgb(117, 6, 6);
}


#meals-view {
  background: var(--color-bg);
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* 
  HAMBURGER MENU STYLING >:|
*/

label .menu {
  position: fixed;
  right: -100px;
  top: -100px;
  z-index: 2;
  width: 200px;
  height: 200px;
  background: var(--color-text);
  border-radius: 50%;
  -webkit-transition: .75s ease-in-out;
  transition: .75 ease-in-out;
  box-shadow: 0 0 0 0 var(--color-text), 0 0 0 0 var(--color-text);
  cursor: pointer;
}

label .hamburger {
  position: absolute;
  top: 135px;
  left: 50px;
  width: 30px;
  height: 2px;
  background: var(--color-accent-1);
  display: block;
  -webkit-transform-origin: center;
  transform-origin: center;
  -webkit-transition: .5s ease-in-out;
  transition: .5s ease-in-out;
}

label .hamburger:after,
label .hamburger:before {
  -webkit-transition: .5s ease-in-out;
  transition: .5 ease-in-out;
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-accent-1);
}

label .hamburger:before {
  top: -10px;
}

label .hamburger::after {
  bottom: -10px;
}

label input {
  display: none;
}

label input:checked + .menu {
  box-shadow: 0 0 0 100vw var(--color-text), 0 0 0 100vh var(--color-text);
  border-radius: 0;
}

label input:checked + .menu .hamburger {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

label input:checked + .menu .hamburger:after {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
  bottom: 0;
}

label input:checked + .menu .hamburger::before {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
  top: 0;
}

label input:checked + .menu + ul {
  opacity: 1;
  visibility: visible;
}

label ul {
  font-size: 2.5em;
  z-index: 3;
  position: fixed;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  opacity: 0;
  -webkit-transition: .25s .25s ease-in-out;
  transition: .25s .25s ease-in-out;
  visibility: hidden;
  list-style: none;
}

label a {
  margin-bottom: 1em;
  display: block;
  color: var(--color-bg);
  text-decoration: none;
}

/*
  RESPONSIVE
*/

@media screen and (max-width: 768px) {
  html {
    font-size: 16px;
  }

  h1 {
    margin: 6px;
    text-align: left;
  }
  
  .weekly-plan {
    grid-template-columns: 1fr;
    padding: 16px 0;
  }

  .meal {
    width: 90%;
  }

  .meals-results {
    width: 95%;
    height: 90vh;
  }

  .meals-filter-panel {
    width: 90vw;
  }
}
