/* Widen the main content area for menu pages */
.content-wrapper {
  max-width: 65rem;
}

/* Add blur effect to menu page headers */
header {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ==========================================================================
   Menu Item Card (.sushi-card)
   ========================================================================== */
.item-card,
.options-container {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  height: 100%;
  width: 100%;
}

.item-card {
  background-blend-mode: overlay;
  background-color: #f4eddc;
  background-image: url("/static/wave.jpg");
  background-repeat: repeat;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: 30rem;
  padding: 0.9375rem;
  position: relative;
}

.item-card::before {
  background-color: rgba(244, 237, 220, 0.736);
  border-radius: 1rem;
  bottom: 0;
  content: '';
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

.api-items-container {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
}

.api-items-container>h1 {
  grid-column: 1 / -1;
  scroll-margin-top: 160px;
}

.card-body {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1.8fr 1.7fr;
  position: relative;
  width: 100%;
  z-index: 2;
}

.item-details-box {
  display: flex;
  flex-direction: column;
}

.item-variations-box {
  display: flex;
  flex-direction: column;
}

.item-card--simple .item-variations-box {
  display: block;
}

.item-card--simple .item-details-box {
  width: 20rem;
}

.item-card--simple .prices-wrapper {
  margin-left: 0;
}

.item-image-box {
  margin-bottom: 0.5rem;
  width: 100%;
}

.item-image-box img {
  border-radius: 1rem;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.item-title,
.description,
.ingredients,
.variation-type {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.item-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.description {
  margin-bottom: 0.3125rem;
}

.lunch-image img {
  border-radius: 1rem;
  height: auto;
  width: 100%;
}

.menu-banner {
  aspect-ratio: 8 / 2;
  display: block;
  margin-bottom: 1.5rem;
  object-fit: cover;
  object-position: center center;
  width: 100%;
}

.banner-with-text {
  align-items: center;
  display: flex;
  justify-content: center;
  position: relative;
}

.banner-with-text .menu-banner {
  filter: brightness(0.7);
}

.banner-with-text h1 {
  color: white;
  font-size: clamp(1.8rem, 1rem + 2.5vw, 3.5rem);
  margin: 0;
  position: absolute;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.variation-type {
  flex: 1;
  min-width: 0;
}

.variation-price {
  text-align: left;
  white-space: nowrap;
}

.prices-wrapper {
  display: table;
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  margin-bottom: 0.5rem;
}

.anchor-nav {
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  backdrop-filter: blur(8px);
  background-color: rgba(244, 237, 220, 0.821);
  border-radius: 10px;
  border: 0.8px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0.5rem;
  position: sticky;
  top: 80px;
  max-width: 100%;
  box-sizing: border-box;
  z-index: 999;
}

.anchor-nav a {
  border-radius: 0.625rem;
  color: inherit;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.anchor-nav a:hover {
  /* Subtle background on hover to show rounded effect */
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.05);
}

.nav-up-button {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  height: 2.5rem;
  justify-content: center;
  padding: 0;
  transition: transform 0.3s ease, background-color 0.3s ease;
  width: 40px;
}

.nav-up-button img {
  height: 18px;
  opacity: 0.8;
  width: 18px;
}

.nav-up-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.anchor-nav h2 {
  margin: 0;
}

@media (max-width: 1129px) {
  .api-items-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .anchor-nav {
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  .anchor-nav h2 {
    font-size: 0.9rem;
  }

  .anchor-nav a {
    padding: 0.4rem 0.6rem;
    text-align: center;
  }

  /* Increase scroll margin on mobile to account for the sticky header and anchor nav */
  .api-items-container>h1 {
    scroll-margin-top: 190px;
  }
}

@media (max-width: 37.5rem) {
  .api-items-container {
    gap: 0.625rem;
    grid-template-columns: 1fr;
  }

  .card-body {
    display: grid;
    grid-template-areas:
      "image image"
      "details prices";
    grid-template-columns: 1.8fr 1.7fr;
  }

  /* This "unboxes" the image and price wrapper, making them direct grid items. */
  .item-variations-box {
    display: contents;
  }

  .item-details-box {
    grid-area: details;
  }

  .item-image-box {
    grid-area: image;
  }

  .prices-wrapper {
    align-self: end;
    grid-area: prices;
    margin-top: 0;
    margin-right: 0;
  }

  /* On mobile, use align-self to move the price to the top. */
  .prices-wrapper--on-top {
    align-self: start;
  }

  .item-card--simple .card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .item-card--simple .item-details-box {
    width: auto;
    padding-right: 1rem;
  }

  .item-card--simple .item-variations-box {
    display: block;
  }
}

/* ==========================================================================
   Image Preview Modal
   ========================================================================== */
.image-preview-modal {
  display: none;
  /* Hidden by default, changed to 'flex' by JS */
  position: fixed;
  /* Stay in place */
  z-index: 1000;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: hidden;
  /* The image is scaled, so no scroll needed */
  background-color: rgba(0, 0, 0, 0.9);
  /* Black w/ opacity */
  /* For centering the image */
  align-items: center;
  justify-content: center;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

.close-preview {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close-preview:hover,
.close-preview:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}
