/* Global Reset */
* {
  box-sizing: border-box;
  font-family: "Poetsen One", sans-serif;
  margin: 0;
  padding: 0;
}
/* Body Layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 120vh;
}

/* main section */

.main-section {
  width: 100%;
  height: 120vh;
  min-height: 120vh;
  background-image: url("/images/main.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b79673;
  text-shadow: 0 2px 4px rgba(243, 250, 242, 0.892);
  font-style: initial;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.main-section > h1 {
  width: 80%;
  max-width: 700px;
  padding: 2rem;
  background-color: #f1f1f1;
  border-radius: 0.9rem;
  box-shadow: 0 4px 8px rgba(238, 245, 240, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

/* Main Container */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  text-align: center;
}

/* plans/index.ejs */
.plans-page {
  max-width: 600px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-items: center;
  margin: 0 auto;
  height: 60vh;
  flex:1;
}

.plans-page h1 {
  color: #9ebc8a;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  
}

.plans-list {
  list-style: none;
  padding-left: 0;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.custom-list li::before {
  content: "🥗";
  margin-right: 0.5rem;
  display: inline-block;
}

.plans-list > li {
  margin: 0.8rem auto;
  padding: 1rem;
  background-color: #f2f2f2;
  border-radius: 1rem;
  width: 100%;            
  max-width: 400px;       
  text-align: center;  
  display: flex;              
  justify-content: center;    
  align-items: center;
  gap: 0.5rem;
}

.plans-list a {
  text-decoration: none;
  color: #b79673;
  font-weight: bold;
}

.no-plans {
  color: #888;
  margin-top: 2rem;
}

/* All detailed plans page */
.plan-details-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

footer {
  flex-shrink: 0;
}

.plan-details {
  width: 80%;
  max-width: 700px;
  padding: 2rem;
  margin: 2rem auto;
  background-color: #efeed4;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.plan-details h1,
.plan-details h2,
.plan-details h3 {
  color: #657c6a;
  margin-bottom: 0.5rem;
  font-weight: 200;
}
.plan-details p {
  color: #657c6a;
  margin: 0.25rem 0;
  font-style: oblique;
  text-align: right;
  font-weight: 100;
}


/* after signing -in */
.plan-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  gap:1rem;
}

.plan-actions form {
  all: unset;
  display: inline;
}

.plan-actions button {
  all: unset;
  appearance: none;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #b79673;
  transition: color 0.2s ease;
}

.plan-actions button:hover {
  color: green;
}

.plan-actions button > i {
  font-size: 5vmin;
  background: none !important;
  border: none !important;
  padding: 0;
  margin: 0;
}

/* Weekly Meals List */
.meal-days {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  text-align: left;
  color: #264a2e;
  font-weight: bold;
}

.meal-days li {
  padding: 1rem 1.5rem;
  margin: 1rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Day Colors */
.plan-details .one {
  background-color: #aec6cf;
} /* Monday */
.plan-details .two {
  background-color: #96d79f;
} /* Tuesday */
.plan-details .three {
  background-color: #dbcc7c;
} /* Wednesday */
.plan-details .four {
  background-color: #ffd6a5;
} /* Thursday */
.plan-details .five {
  background-color: #f9afaf;
} /* Friday */
.plan-details .six {
  background-color: #cdb4db;
} /* Saturday */
.plan-details .seven {
  background-color: #939e97;
} /* Sunday */

.plan-details form,
.plan-details a {
  margin-top: 1.5rem;
  display: inline-block;
}

.plan-details h1,
.plan-details h2 {
  margin-top: 0.5rem;
}

.plan-details button {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  margin: 0.5rem;
  transition: color 0.2s ease;
}

.plan-details button:hover {
  color: #3e7d68;
}

.plan-details a {
  text-decoration: none;
  color: #2a7f62;
  font-weight: bold;
  font-size: 1rem;
  margin-top: 1rem;
}
/* auth-forms */
form.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  color: rgb(222, 159, 117);
  font-weight: bold;
  max-width: 340px;
  width: 100%;
  margin-bottom: 28rem;
  margin-top: 1rem;
  flex: 1;
}

.auth-form * {
  font-size: 1rem;
  padding: 0.3rem;
  border-radius: 0.5rem;
  
}

input,
textarea,
select {
  border: 1px solid rgb(222, 159, 117);
  outline-color: #2a7f62;
  color: rgb(222, 159, 117);
  font-weight: bold;
}

.auth-form button[type="submit"] {
  border: 1px solid rgb(222, 159, 117);
  background-color: transparent;
  color: rgb(222, 159, 117);
  font-weight: bold;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 1rem;
  cursor: pointer;
  margin-top: 1rem;
}

.auth-form button[type="submit"]:hover {
  background-color: rgb(216, 194, 167);
 
}

h1 {
  text-align: center;
  color: rgb(222, 159, 117);
  font-weight: bold;
  margin-bottom: 0.1rem;
  padding-top: 4rem;
  padding-bottom: 0.6rem;
  margin-top: 5rem;
}

.error-msg {
  color: rgb(223, 116, 116);
  text-align: center;
  margin-top: 1rem;
  padding: 0.5rem;
}
.meal-form {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-width: 700px;
  margin: 2rem auto;
  padding: 2rem;
  background: #f7e4cc;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  color: rgb(222, 159, 117);
  font-weight: bold;
  margin-top: 0.5rem;
}

.meal-form input,
.meal-form textarea {
  border: 1px solid rgb(222, 159, 117);
  outline-color: #2a7f62;
  color: rgb(222, 159, 117);
  font-weight: bold;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  width: 100%;
  resize: vertical;
}

.meal-form button {
  border: 1px solid rgb(222, 159, 117);
  background-color: transparent;
  color: rgb(222, 159, 117);
  font-weight: bold;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  cursor: pointer;
  align-self: center;
}

.meal-form button:hover {
  background-color: rgb(216, 194, 167);
}

.form-title {
  text-align: center;
  color: rgb(222, 159, 117);
  font-weight: bold;
  margin-top: 1rem;
}


/* user/index.ejs */

.community-page {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem;
  text-align: center;
  flex: 1;
}

.community-page h1 {
  color: #9ebc8a;
  margin-bottom: 1.5rem;
}

.community-user-list {
  list-style: none;
  padding: 0;
 
}

.community-user-list li {
  margin: 1rem 0;
  padding: 0.5rem;
  background-color: #f2f2f2;
  border-radius: 1rem;
}

.community-user-list a {
  text-decoration: none;
  color: #b79673;
  font-weight: 500;
}

.community-user-list a:hover {
  text-decoration: underline;
}
/* user/show.ejs */
.user-plans-page {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  text-align: center;
  flex: 1;
}

.user-plans-page h1 {
  color: #9ebc8a;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.user-plan-list,
.custom-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.user-plan-list li,
.custom-list li {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background-color: #f2f2f2;
  border-radius: 5rem;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Link inside each plan */
.user-plan-list a,
.custom-list a {
  text-decoration: none;
  color: #b79673;
  display: inline-block;
}

.custom-list li::before {
  content: "🥗";
  margin-right: 0.5rem;
  display: inline-block;
  font-size: 1.1rem;
}

.custom-list a:hover,
.user-plan-list a:hover,
.plans-list a:hover,
.plan-details a:hover {
  text-decoration: underline;
}

/* Message when no plans */
.no-user-plans {
  color: #888;
  font-style: italic;
  margin-top: 2rem;
}
/* smaller screen */
@media (max-width: 600px) {
  .main-section > h1,
  .plan-details,
  .user-plans-page,
  .community-page {
    width: 90%;
    padding: 1rem;
    font-size: 1rem;
  }

  .meal-days li {
    font-size: 0.95rem;
    padding: 0.75rem;
  }

  nav,
  footer {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
  }
  .nav-btn {
    font-size: 0.5rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Nav & Footer */
nav,
footer {
  background-color: #a2b9a7;
  display: flex;
  justify-content: space-between;;
  align-items: center;
  padding: 0.4rem;
  font-size: 2vh;
  color: #657c6a;
}

nav a {
  text-decoration: none;
  color: #657c6a;
  background-color: white;
  padding: 1vmin;
  border-radius: 1vmin;

  &:hover {
    color: rgb(127, 174, 163);
    background-color: #d2d0a0;
    color: white;
  }
}

nav span {
  font-size: 2vmin;
  color: #b79673;
}
