/* Custome properties */

:root {
  /* colors */
  --clr-white-text: 255, 255, 255;
  --clr-black-text: 0, 0, 0;
  --clr-meal-border: 210, 210, 210;
  --clr-meal-ingrediences: 139, 139, 139;
  --clr-meal-btn: 60, 60, 60;
  --clr-meal-btn-border: 222, 222, 222;
  --clr-remove-btn: 187, 187, 187;
  --clr-checkout-divider: 57, 51, 51;
  --clr-purchase-btn: 22, 219, 153;
  --clr-input: 117, 117, 117;
  --clr-message-bg: 236, 253, 245;
}

/* Set up the body */

body {
  margin: 0;
  padding: 0;
  font-family: "Smythe", cursive;
  font-size: 1em;
  color: rgba(var(--clr-black-text));
}

/* Typography */

.dinner-title {
  font-size: 2.5em;
  font-weight: 400;
}

.dinner-sub-title {
  font-size: 1.375em;
}

.meal-img {
  font-size: 4.92em;
}

.meal-title,
.checkout-headline,
.checkout-price-text {
  font-size: 1.75em;
}

.meal-price,
.checkout-price,
.pay-btn,
.modal label {
  font-size: 1.25em;
}

.meal-price,
.checkout-price,
.pay-btn {
  font-weight: bold;
}

.meal-btn {
  font-family: "Inter", sans-serif;
  font-size: 2em;
}

.remove-meal-btn,
.meal-count {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 0.75em;
}

.complete-btn,
.pay-btn {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.complete-btn {
  font-size: 1em;
  font-weight: bold;
}

.modal h2 {
  font-size: 1.875em;
  font-weight: bold;
}

.message-text {
  font-size: 2em;
}

/* Layout */

.container {
  margin: 0 auto 2.75em auto;
  text-align: center;
  max-width: 37.5em;
}

header {
  margin: 0;
}

.dinner {
  line-height: 0.6;
  color: rgba(var(--clr-white-text));
  background-image: url(./images/header.jpg);
  display: flex;
  flex-direction: column;
}

.dinner-title,
.dinner-sub-title {
  margin: 0 auto 0 0;
  padding-left: 2.875rem;
}

.dinner-title {
  padding-top: 2.875rem;
  padding-bottom: 1.25rem;
}

.dinner-sub-title {
  padding-bottom: 4rem;
}

button {
  cursor: pointer;
}

.meal,
.checkout {
  max-width: 31.5em;
}

.checkout {
  display: none;
  /*flex when displayed */
  flex-direction: column;
}

.meal {
  height: 5.5em;
  padding-bottom: 3.25em;
  display: flex;
  justify-content: left;
  align-items: center;
  border-bottom: 1px solid rgba(var(--clr-meal-btn-border));
  gap: 3em;
}

.meal-img {
  max-width: 4.375rem;
}

.meal-details {
  display: flex;
  flex-direction: column;
  text-align: left;
  justify-content: center;
}

.meal-title,
.meal-ingrediences,
.meal-price {
  margin: 0 0 0.5rem 0;
}

.meal-ingrediences {
  color: rgba(var(--clr-meal-ingrediences));
}

.meal-buttons {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1em;
}

.checkout-order {
  padding-bottom: 1.5em;
  border-bottom: 1px solid rgba(var(--clr-checkout-divider));
}

.checkout-meal {
  display: flex;
  align-items: center;
  gap: 0.625em;
}

.checkout-meal div {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.375em;
}

.remove-meal-btn,
.meal-count {
  color: rgba(var(--clr-remove-btn));
}

.remove-meal-btn {
  padding: 0;
  border: none;
  background-color: rgba(var(--clr-white-text));
}

.remove-meal-btn:hover,
.remove-meal-btn:focus,
.remove-meal-btn:active {
  color: red;
}

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3.25em;
}

.checkout-price-text,
.checkout-price {
  margin: 0.625em 0 0.5em;
}

.complete-btn {
  padding: 1.125rem;
  line-height: 1.5;
}

.message {
  padding: 1.25em 0;
  width: 100%;
  background-color: rgba(var(--clr-message-bg));
  line-height: 0.5;
}

/* Modal */

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(var(--clr-meal-btn));
  background-color: rgba(var(--clr-meal-btn), 0.4);
}

.modal-content {
  text-align: center;
  width: 32.75em;
  margin: 10% auto;
  background-color: rgba(var(--clr-white-text));
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.modal-content h2 {
  line-height: 1.333;
  padding-top: 1em;
  margin: 0;
}

.modal-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  margin: 1.875em auto;
  width: 90%;
}

/* Modal input */

.modal input {
  padding: 0.875em;
  line-height: 1.55;
  border: 2px solid rgba(var(--clr-input));
}

::placeholder {
  color: rgba(var(--clr-input), 0.7);
}

/* Modal button */

.pay-btn {
  width: 100%;
  margin: 1.5em 0;
  padding: 1em;
  line-height: 1.55;
}

/* Utility classes */

.meal-btn {
  margin: 0 0 0 0;
  border: 1px solid rgba(var(--clr-meal-btn-border));
  border-radius: 50%;
  color: rgba(var(--clr-meal-btn));
  background-color: rgba(var(--clr-white-text));
  width: 3.125rem;
  height: 3.125rem;
}

.meal-btn:focus,
.meal-btn:hover,
.meal-btn:active {
  border: none;
  background-color: rgba(var(--clr-meal-border));
}

.meal-btn:disabled {
  color: rgba(var(--clr-meal-btn), 0.3);
}

.purchase-btn {
  color: rgba(var(--clr-white-text));
  background-color: rgba(var(--clr-purchase-btn));
  border: none;
}

.purchase-btn:focus,
.purchase-btn:hover,
.purchase-btn:active {
  background-color: rgba(var(--clr-purchase-btn), 0.7);
}

.purchase-btn:disabled {
  background-color: rgba(var(--clr-purchase-btn), 0.3);
}

.rounded {
  border-radius: 0.375em;
}
