/* ============================================================
 * ============================================================
 *
 *   ACF MENU SHORTCODES  —  styles for [acf_food_menu] and
 *   [acf_drinks_menu]
 *   Pairs with acf-shortcodes.php.
 *
 *   Fonts (Comfortaa / Manrope) are loaded by the @import
 *   in style.css.
 *
 * ============================================================
 * ============================================================ */

/* Shared tokens — change colours / fonts here */
.food-wrapper,
.drinks-wrapper,
.allergen-modal {
  --acf-menu-accent: #64A09B;
  --acf-menu-text: #1A445A;
  --acf-menu-muted: #737272;
  --acf-menu-card-bg: #ffffff;
  --acf-menu-card-shadow: 0 0px 5px rgba(0, 0, 0, 0.05), 0 0px 10px rgba(0, 0, 0, 0.05);
  --acf-menu-radius: 16px;
  --acf-menu-heading-font: "Comfortaa", sans-serif;
  --acf-menu-body-font: "Manrope", sans-serif;
}

/* Icons — single-colour SVGs recoloured via mask, so they follow `color` */
.acf-menu-icon {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  background-color: var(--acf-menu-accent);
  -webkit-mask: var(--acf-menu-icon) center / contain no-repeat;
  mask: var(--acf-menu-icon) center / contain no-repeat;
}

/* ============================================================
 *   FOOD MENU — cards grid
 * ============================================================ */

.food-section {
  margin-bottom: 60px;
}

.food-section h2 {
  margin: 0 0 20px;
  text-align: left;
  font-family: var(--acf-menu-heading-font);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--acf-menu-accent);
}

.food-section__image {
  display: block;
  margin: 0 auto 30px;
  border-radius: var(--acf-menu-radius);
}

.food-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-start;
}

.food-card {
  display: flex;
  flex-direction: column;
  width: calc((100% - 60px) / 3);
  background-color: var(--acf-menu-card-bg);
  border-radius: var(--acf-menu-radius);
  box-shadow: var(--acf-menu-card-shadow);
  overflow: hidden;
}

.food-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.food-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  text-align: left;
}

h3.food-card__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-family: var(--acf-menu-heading-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--acf-menu-text);
}

.food-card__allergens {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.food-card__description {
  margin: 0;
  padding: 0;
  font-family: var(--acf-menu-body-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.5px;
  color: var(--acf-menu-muted);
}

.food-card__spicy-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  white-space: nowrap;
}

.food-card__spicy-inline .acf-menu-icon {
  width: 16px;
  height: 16px;
}

p.food-card__price {
  margin: auto 0 0; /* pins price to the card bottom so rows line up */
  padding-top: 5px;
  font-family: var(--acf-menu-body-font);
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: 1px;
  color: var(--acf-menu-accent);
}

/* Wide screens — 4 columns max */
@media only screen and (min-width: 1600px) {
  .food-card {
    width: calc((100% - 90px) / 4);
  }
}

/* ==========================================================================
   DISABLED — 5 / 6 column wide-screen breakpoints (max is 4 on Sea Salt),
   kept in case we bring them back later
   @media only screen and (min-width: 1900px) {
     .food-card { width: calc((100% - 120px) / 5); }
   }
   @media only screen and (min-width: 2200px) {
     .food-card { width: calc((100% - 150px) / 6); }
   }
   ========================================================================== */

@media only screen and (max-width: 980px) {
  .food-card {
    width: calc((100% - 30px) / 2);
  }

  .food-section h2 {
    font-size: 32px;
  }
}

@media only screen and (max-width: 500px) {
  .food-row {
    gap: 20px;
  }

  .food-card {
    width: 100%;
  }

  .food-section h2 {
    font-size: 26px;
  }
}

/* ============================================================
 *   DRINKS MENU — price list
 * ============================================================ */

.drinks-section {
  width: 100%;
  margin: 0 0 60px;
  /* ==========================================================================
     DISABLED — capped, centred list width, kept in case we bring it back later
     width: 90%;
     max-width: 900px;
     margin: 0 auto 60px;
     ========================================================================== */
}

.section-title-row {
  padding-bottom: 20px;
  text-align: left;
}

.drinks-section h2 {
  margin: 0 0 10px;
  font-family: var(--acf-menu-heading-font);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--acf-menu-accent);
}

.section-title-row p {
  margin: 0;
  font-family: var(--acf-menu-body-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--acf-menu-muted);
}

.drinks-row {
  margin-bottom: 40px;
}

.card_wrapper {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.drinks-card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
}

h3.drinks-card__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-family: var(--acf-menu-heading-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--acf-menu-text);
}

.drinks-card__alcohol-icon {
  width: 20px;
  height: 20px;
}

.price_list_separator {
  flex: 1 1;
  margin: 0 8px;
  border-bottom: 2px dotted var(--acf-menu-accent);
}

.drinks-card__price {
  margin: 0;
  font-family: var(--acf-menu-body-font);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  color: var(--acf-menu-accent);
}

.drinks-card__description {
  margin: 4px 0 0;
  font-family: var(--acf-menu-body-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.5px;
  color: var(--acf-menu-muted);
}

@media only screen and (max-width: 500px) {
  h3.drinks-card__title {
    font-size: 16px;
  }

  .drinks-card__price {
    font-size: 17px;
  }

  .drinks-section h2 {
    font-size: 26px;
  }
}

/* ============================================================
 *   CURRENCY SYMBOL — shared
 *   Manrope has no ฿ glyph, so it falls back to another font
 *   and inherits the price's 600 weight — force regular.
 * ============================================================ */

.acf-menu-currency {
  font-weight: 400;
}

/* ============================================================
 *   VAT NOTICE — shared
 * ============================================================ */

.vat-notice {
  margin: 25px 0 0;
  text-align: left;
  font-family: var(--acf-menu-body-font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--acf-menu-muted);
}

/* ==========================================================================
   DISABLED — desktop right alignment, kept in case we bring it back later
   @media only screen and (min-width: 981px) {
     .vat-notice { text-align: right; }
   }
   ========================================================================== */

/* ============================================================
 *   ALLERGEN POPUP — OFF by default
 *   Enable per shortcode: [acf_food_menu slug="..." allergen_popup="yes"]
 * ============================================================ */

button.food-card__allergens--popup {
  padding: 3px;
  margin: -3px;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button.food-card__allergens--popup .acf-menu-icon {
  transition: transform 0.2s;
}

button.food-card__allergens--popup:hover .acf-menu-icon,
button.food-card__allergens--popup:focus-visible .acf-menu-icon {
  transform: scale(1.1);
}

.allergen-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999 !important;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.allergen-modal.is-open {
  display: block;
}

.allergen-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000000 !important;
  width: 90%;
  max-width: 600px;
  padding: 30px;
  background-color: #ffffff;
  border-radius: var(--acf-menu-radius);
}

.allergen-modal-content h3 {
  margin: 0 0 20px;
  text-align: center;
  font-family: var(--acf-menu-heading-font);
  font-size: 30px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--acf-menu-text);
}

.allergen-modal-close {
  float: right;
  padding: 0;
  background: none;
  border: none;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #aaaaaa;
  cursor: pointer;
  transition: color 0.3s;
}

.allergen-modal-close:hover,
.allergen-modal-close:focus-visible {
  color: var(--acf-menu-accent);
}

.allergen-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.allergen-legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 10px 10px;
  text-align: center;
  border: 1px solid #e0e0e0;
  border-radius: var(--acf-menu-radius);
}

.allergen-legend-item .acf-menu-icon {
  width: 32px;
  height: 32px;
}

.allergen-legend-label {
  font-family: var(--acf-menu-body-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--acf-menu-text);
}

.allergen-modal-open #cws-menu-submenu {
  display: none !important;
}

@media only screen and (max-width: 768px) {
  .allergen-modal-content {
    width: 95%;
    padding: 20px;
  }

  .allergen-legend-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }
}

/* ============================================================
 *   END ACF MENU SHORTCODES STYLES
 * ============================================================ */
