@charset "utf8";

/* 
Styles for the order page
*/

@import url(../base.css);

/* HEADER */

#banner {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("../resources/meals.jpg") center center / cover no-repeat;
  height: 25rem;
  position: relative;
  margin-bottom: 2rem;
}

.title {
  top: 5rem;
  position: relative;
  font-size: 3rem;
  padding-top: 3rem;
}

.subtitle {
  font-size: 2rem;
  padding-top: 1rem;
}

/* MENU SECTION */

#orderContainer {
  margin: 3rem auto;
}

/* ORDER FORM */

#orderContainer > header {
  width: 100%;
  margin-bottom: 2rem;
}

.orderTitle {
  font-family: RobotoBold;
  text-align: center;
  font-size: 2rem;
  font-variant: small-caps;
  line-height: 1.8rem;
  margin: 1rem 0;
}

#orderForm {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  justify-items: center;
}

/* CARDS */

.card {
  display: flex;
  flex-flow: column nowrap;
  justify-content: space-between;
  border: 1px solid var(--red);
  background-color: var(--light-orange);
  box-shadow: 2px 2px 10px 2px #00000042;
  border-radius: 3px;
  padding: 1rem;
  max-width: 450px;
}

.imgContainer {
  width: 100%;
  height: clamp(200px, 45vw, 415px);
  overflow: hidden;
  position: relative;
}

.foodImg {
  border-radius: 5px;
  width: 100%;
  height: 100%;
  background-size: cover;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateY(-50%) translateX(-50%);
}

.item-text {
  padding: 1.5rem 0;
}

.item-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.15rem;
  line-height: 1.5;
}

.item-desc {
  width: 100%;
  line-height: 1.05;
}

.item-price-qty {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-family: RobotoBold;
  font-size: 1.15rem;
  /* font-style: italic; */
  font-weight: 500;
}

.qty-container {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
}

.qtyControl {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 100%;
  border: none;
  background-color: var(--mid-gray);
  color: var(--white);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 0.45;
  margin: 0 0.25em;
}

.qtyNum {
  padding: 0.5rem;
  width: 18px;
  text-align: center;
}

@media screen and (min-width: 800px) {
  #orderForm {
    grid-template-columns: 1fr 1fr;
  }

  .item-desc {
    line-height: 1.75;
  }

  .imgContainer {
    height: clamp(200px, 25vw, 415px);
  }
}

/* CART */

#yourOrderContainer {
  position: sticky;
  top: 6rem;
  padding: 1rem 2rem;
  border-radius: 5px;
  box-shadow: var(--light-gray) 0 0 15px;
}

@media screen and (min-width: 600px) {
  #yourOrderContainer {
    margin-left: 3rem;
  }
}

#yourOrder {
  display: flex;
  flex-flow: column nowrap;
  line-height: 1.5rem;
  font-size: 0.85rem;
  margin: 1rem;
}

.yourOrderIntro {
  text-align: center;
}

.yourHeading,
.yourRow,
.subtotalRow {
  display: flex;
  flex-flow: row;
}

.yourHeading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  color: var(--dark-gray);
  border-bottom: 1px solid var(--gray);
  padding-bottom: 0.5rem;
}

.itemCol {
  width: 80%;
}

.qtyCol {
  text-align: center;
  width: 20%;
}

.yourRow {
  font-size: 1rem;
  line-height: 1.35rem;
  text-align: start;
  margin: 0.5rem 0;
}

.yourRow > .itemCol {
  letter-spacing: -0.05rem;
}

.subtotalRow {
  text-transform: uppercase;
  font-weight: 800;
  border-top: 1px solid var(--gray);
  padding-top: 0.5rem;
}

.place-order-btn {
  width: 100%;
}

.place-order-btn:hover {
  cursor: pointer;
}

/* CART BUTTON */

.cart-btn-wrapper {
  position: fixed;
  bottom: 1rem;
  right: 2rem;
  height: 64px;
  width: 64px;
  font-size: 3rem;
  text-align: center;
  line-height: 64px;
  color: var(--white);
  background-color: var(--red);
  border-radius: 50%;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.7));
  cursor: pointer;
  z-index: 9;
  transition: all 250ms ease-out;
}

@media screen and (min-width: 1368px) {
  .cart-btn-wrapper {
    bottom: 4vw;
    right: 6vw;
  }
}

.total-qty {
  position: absolute;
  top: -25%;
  right: -25%;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  line-height: 32px;
  background-color: var(--red);
  color: var(--white);
  border-radius: 50%;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.cart-btn {
  width: 70%;
  height: 70%;
  top: 15%;
  margin: 0 auto;
  /* box-shadow: 0 0 3px rgba(255, 255, 255, 0.95); */
}

.cart {
  position: fixed;
  z-index: 8;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(100vw - 64px, 400px);
  background-color: var(--white);
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.7);
  transform: translateX(105%);
  transition: all 250ms ease-out;
}

.cart-open.cart-btn-wrapper {
  right: MIN(100vw - 96px, 368px);
  z-index: 21;
}

.cart-open.cart {
  transform: translateX(0);
  z-index: 20;
}

.cart-title {
  text-align: center;
  font-size: 2rem;
  font-family: RobotoBold;
  margin: 1em;
}

/* MODAL */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000d0;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-body {
  width: clamp(450px, 50%, 600px);
  height: auto;
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  line-height: 1.8;
}

.modal-btn {
  display: block;
  margin: 2rem auto 0 auto;
  padding: 1em 2em;
  border-radius: 5px;
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 1em;
  font-weight: bolder;
  cursor: pointer;
}

.modal-btn:hover {
  color: var(--white);
  background-color: var(--red);
}
