/* ============================================================
   fg-theme.css — food-grocery-new visual refresh.
   Design tokens ported from amenify-food-grocery css/styles.css
   (fg.amenify.ai) so both FG surfaces share one visual language.

   Loaded LAST (after tailwind + bootstrap + the template's inline
   style block) so it wins the cascade. Rollback = remove the single
   <link> in food_grocery_delivery_new.html.

   Contract: this file restyles EXISTING ids/classes only. No JS
   selectors were added or renamed — .restaurant-wrapper /
   .restaurant-card / .cuisine-tag / .menu-card / .add-btn /
   .quantity-controls / all modal ids are untouched hooks.
   ============================================================ */

:root {
  /* Brand = Amenify blue (already used across the app, e.g. #0069ff).
     Overridden per-tenant by the template when PRIMARY_COLOR /
     sso_api_partner.primary_color is set (see inline :root block).
     NOTE: this is Amenify's existing palette — NOT fg.amenify.ai's orange.
     We match fg's layout/UX, not its colors. */
  --brand: #0069ff;
  --brand-hover: #0057d6;
  --brand-dark: #0047b3;
  --brand-soft: #eaf2ff;
  --brand-tint: #d6e6ff;

  --success: #0a8a4a;
  --success-soft: #e7f6ed;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;

  --ink: #0b0e11;
  --ink-2: #2a2f36;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e4e6ea;
  --line-2: #f2f3f5;
  --bg: #fafafa;
  --card: #ffffff;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(10, 14, 17, 0.04);
  --shadow-sm: 0 1px 3px rgba(10, 14, 17, 0.06), 0 1px 2px rgba(10, 14, 17, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(10, 14, 17, 0.06), 0 2px 4px -2px rgba(10, 14, 17, 0.04);
  --shadow-lg: 0 12px 24px -6px rgba(10, 14, 17, 0.10), 0 4px 10px -4px rgba(10, 14, 17, 0.05);
  --shadow-xl: 0 24px 48px -12px rgba(10, 14, 17, 0.18);
  --ring: 0 0 0 3px rgba(0, 105, 255, 0.20);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 180ms;

  /* Type scale (ported from fg.amenify.ai). These were referenced
     throughout the theme but never defined, so every font-size:var(--text-*)
     silently inherited. Defining them here activates the intended scale. */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 34px;
}

/* ---------- base ---------- */
body {
  background-color: var(--bg) !important;
  color: var(--ink) !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif !important;
  font-feature-settings: "cv11", "ss01", "ss03", "cv02";
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.rest-rating, .menu-price, .cart-line-price, #restaurant-count,
#summary-section, #final-total, .item-count {
  font-variant-numeric: tabular-nums;
}

/* ---------- header (#top-bar markup rebuilt in template) ---------- */
/* NOTE: keep hidden on mobile — the resident-app webview provides its
   own chrome there, same behavior as the old gradient bar. */
#top-bar {
  background: var(--card) !important;
  height: auto !important;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  /* #2 — sit ABOVE the browse dialogs (menu / cart / checkout, ~1055) so the cart
     icon is reachable from anywhere. The focused item sheet (#fgItemModal, 20000)
     and Maddie (21050) still cover it. */
  z-index: 3000;
}
/* Offset the full-screen / drawer dialogs so their own content + controls clear
   the pinned global header. */
#menuModal .modal-content,
#summaryModal .modal-content,
#cartModal .modal-content,
#trackModal .modal-content { padding-top: 62px; }
.fg-header {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}
.fg-header .fg-logo { flex: none; }
.fg-header .fg-logo img { height: 26px; display: block; }
/* location pill */
.fg-locpill {
  flex: none; max-width: 220px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--line-2); border-radius: 999px; padding: 9px 14px;
  color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background var(--dur) var(--ease);
}
.fg-locpill:hover { background: var(--line); color: var(--ink); }
.fg-locpill-pin { color: var(--brand); font-size: 14px; }
.fg-locpill-text { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-locpill-caret { color: var(--muted-2); font-size: 11px; }
/* header search */
.fg-search-wrap {
  flex: 1 1 auto; min-width: 0; position: relative;
  display: flex; align-items: center;
  background: var(--line-2); border-radius: 999px; padding: 0 14px; height: 44px;
}
.fg-search-wrap:focus-within { background: var(--card); box-shadow: inset 0 0 0 2px var(--brand-tint); }
.fg-search-ic { color: var(--muted-2); font-size: 15px; flex: none; }
.fg-search-wrap .search-input {
  flex: 1 1 auto; min-width: 0; border: 0 !important; background: transparent !important;
  box-shadow: none !important; outline: none !important; padding: 0 8px !important; height: 100%;
  font-size: 15px; color: var(--ink);
}
.fg-search-clear { display: none; border: 0; background: transparent; color: var(--muted-2);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; flex: none; }
.fg-search-wrap.has-text .fg-search-clear { display: block; }
/* round icon buttons (heart / help / track) */
.fg-icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line-2); border: 0; color: var(--ink-2); font-size: 16px;
  text-decoration: none; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.fg-icon-btn:hover { background: var(--line); color: var(--ink); }
.fg-icon-btn.is-active { background: var(--brand-soft); color: var(--brand); }
.fg-icon-btn.is-active i { font-weight: 900; }

/* ---------- address chip ---------- */
.address-container { margin-bottom: 4px !important; }
#address-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--line-2);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2) !important;
  text-decoration: none !important;
  transition: background var(--dur) var(--ease);
}
#address-link:hover { background: var(--line); }
#address-link .fa-map-marker-alt { color: var(--brand); }

/* ---------- search + filter row ---------- */
.search-input,
input#search.form-control {
  background: var(--card);
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  padding: 11px 20px !important;
  font-size: 14.5px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.search-input:focus { border-color: var(--brand) !important; box-shadow: var(--ring) !important; outline: none; }

.dashed-border {
  border: 0 !important;
  background: var(--line-2);
  border-radius: 999px;
  padding: 3px !important;
  display: inline-flex;
}
.filter-btn {
  border: 0 !important;
  background: transparent !important;
  border-radius: 999px !important;
  padding: 7px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
  transition: all var(--dur) var(--ease);
}
.filter-btn.active {
  background: var(--card) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-sm);
}
#restaurant-count {
  align-self: center;
  font-size: 13px;
  color: var(--muted) !important;
  margin-bottom: 0 !important;
}

/* ---------- cuisine chips ---------- */
.cuisine-filter-wrapper { margin-bottom: 18px; }
.cuisine-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.cuisine-scroll::-webkit-scrollbar { display: none; }
.cuisine-tag {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  box-shadow: none;
}
.cuisine-tag:hover { border-color: var(--muted-2); }
.cuisine-tag.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
}

/* #10 — menu category tabs styled EXACTLY like the home cuisine chips:
   pill shape, highlighted when active, 'All' active by default. Overrides
   the template's plain-text .category-tab rule (fg-theme loads last). */
#category-tabs { gap: 8px; padding-bottom: 6px; }
#category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex: 0 0 auto; white-space: nowrap;
  border: 1px solid var(--line) !important; background: var(--card) !important;
  border-radius: 999px !important; padding: 7px 16px !important;
  font-size: 13px !important; font-weight: 600 !important; color: var(--ink-2) !important;
  max-height: none !important; margin-right: 0 !important;
  cursor: pointer; transition: all var(--dur) var(--ease);
}
.category-tab:hover { border-color: var(--muted-2) !important; }
.category-tab.active-tab {
  background: var(--brand-soft) !important; border-color: var(--brand) !important; color: var(--brand-dark) !important;
}

/* ---------- restaurant grid (image-forward tiles, fg.amenify.ai style) ---------- */
/* Override Bootstrap's .row on .restaurant-list — we want a real CSS grid. */
.restaurant-list.row,
.restaurant-list {
  display: grid !important;
  /* minmax(0,1fr), NOT 1fr: a bare 1fr is minmax(auto,1fr), whose `auto` floor is the
     largest card's min-content. A long, non-wrapping restaurant name (.fgc-name is
     white-space:nowrap) then forces the track — and the whole card — WIDER than
     #main-content, so cards render wider than the sections above (the reported bug).
     minmax(0,...) floors the track at 0 so it never exceeds the container; the
     min-width:0 chain below lets the name ellipsize instead of pushing width. */
  grid-template-columns: minmax(0, 1fr);   /* one restaurant per row */
  gap: 14px;
  margin: 0 !important;
}
.restaurant-wrapper { width: auto !important; padding: 0 !important; max-width: none !important; flex: none !important; min-width: 0 !important; }
/* Let the card + its flex rows shrink so overflow ellipsizes instead of expanding the
   grid track (min-width:auto is the flex/grid default that caused the blow-out). */
.fgc, .fgc-body, .fgc-namerow, .fgc-name, .fgc-meta, .fgc-addr, .fgc-tags { min-width: 0; }

.fgc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  height: 100%;
}
.fgc:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.fgc-img {
  position: relative;
  aspect-ratio: 16 / 6;   /* shorter banner for full-width cards */
  display: grid;
  place-items: center;
  overflow: hidden;
}
.fgc-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.fgc-emoji { font-size: 40px; filter: saturate(1.1); z-index: 0; }
.fgc-ribbon {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px;
}
.fgc-badge-closed {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(11,14,17,.8); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.fgc-fav {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 30px; height: 30px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--muted);
  display: grid; place-items: center; font-size: 15px;
  box-shadow: var(--shadow-sm); line-height: 1;
}
.fgc-fav { border: 0; cursor: pointer; padding: 0; transition: transform .12s var(--ease), color .12s var(--ease); }
.fgc-fav:hover { color: var(--brand); transform: scale(1.08); }
.fgc-fav.is-fav { color: var(--danger); }
.fgc.is-closed .fgc-photo, .fgc.is-closed .fgc-emoji { filter: grayscale(1); opacity: .65; }
.fgc-body { padding: 12px 14px 14px; }
.fgc-namerow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fgc-name {
  font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fgc-rating {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.fgc-rating .star { color: #f59e0b; }
.fgc-meta { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.fgc-meta .dot, .fgc-hero-facts .dot { color: var(--muted-2); padding: 0 5px; }
/* line icons (map pin, bag) sit before the address / item line */
.fgc-ic { flex: none; color: var(--muted-2); margin-top: 1px; }
/* item / cuisine line — bag icon + "·"-joined text (fg card), not chips */
.fgc-tags { margin-top: 6px; display: flex; align-items: flex-start; gap: 6px;
  font-size: 12.5px; color: var(--muted); }
.fgc-tags-txt { overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical; }

/* ---------- menu modal → restaurant "page" with hero banner ---------- */
#menuModal .modal-dialog { max-width: 100%; }  /* full-screen menu dialog */
/* Hide the old plain restaurant header row (logo box + name/rating/address);
   the injected .fgm-hero replaces it. */
#menuModal .modal-body > .d-flex.align-items-center.mb-3 { display: none !important; }
.fgm-hero {
  position: relative;
  margin: -1.5rem -1.5rem 16px;   /* bleed to modal-body edges */
  height: 180px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
@media (max-width: 575px) { .fgm-hero { border-radius: var(--r-xl) var(--r-xl) 0 0; } }
.fgm-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.fgm-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,14,17,.05) 30%, rgba(11,14,17,.72));
}
.fgm-hero-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 32px; height: 32px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink);
  display: grid; place-items: center; font-size: 14px; box-shadow: var(--shadow-sm);
}
.fgm-hero-content {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; gap: 14px;
  padding: 18px 20px; color: #fff; width: 100%;
}
/* ---- Collapse-on-scroll: hero shrinks to a slim bar (name + close) once the menu
        list (#menu-sections) is scrolled, and #menu-sections grows into the reclaimed
        space so more items are visible. Toggled by #menuModal .modal-content gaining
        .fgm-scrolled (JS on the #menu-sections scroll). ---- */
.fgm-hero { transition: height .28s var(--ease); will-change: height; }
#menuModal .modal-content.fgm-scrolled .fgm-hero { height: 56px; }
/* reclaim the ~124px the hero gave up (base is calc(100vh - 270px) in the template) */
#menuModal .modal-content.fgm-scrolled #menu-sections { max-height: calc(100vh - 146px); }
#menuModal .modal-content.fgm-scrolled .fgm-hero .fgm-hero-content {
  align-items: center; height: 100%; padding-top: 0; padding-bottom: 0;
  padding-right: 52px;                 /* clear the close (X) button */
  flex-direction: row; justify-content: flex-start; gap: 10px;
}
#menuModal .modal-content.fgm-scrolled .fgm-hero .fgm-store-badge,
#menuModal .modal-content.fgm-scrolled .fgm-hero .fgm-gh-tagline,
#menuModal .modal-content.fgm-scrolled .fgm-hero .fgm-gh-pills,
#menuModal .modal-content.fgm-scrolled .fgm-hero .fgm-hero-facts,
#menuModal .modal-content.fgm-scrolled .fgm-hero .fgm-hero-addr { display: none; }
#menuModal .modal-content.fgm-scrolled .fgm-hero .fgm-hero-name {
  font-size: 16px; line-height: 1.1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 44px);
}
.fgm-hero-emoji {
  flex: none; width: 54px; height: 54px; border-radius: var(--r-md);
  background: var(--card); display: grid; place-items: center; font-size: 26px;
  box-shadow: var(--shadow-lg);
}
.fgm-hero-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.fgm-hero-facts { font-size: 13px; font-weight: 600; margin-top: 4px; opacity: .95; }
.fgm-hero-addr { font-size: 12.5px; opacity: .8; margin-top: 2px; }

/* menu item rows (virtual scroller slots) — thumbnail + floating add */
.menu-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  min-height: 132px;
  max-height: 138px;
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease);
}
.menu-card:hover { box-shadow: var(--shadow-md); }
.menu-card .fw-semibold { font-size: 14.5px; letter-spacing: -0.01em; }
.menu-card .text-muted.small {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.menu-item-img {
  border-radius: var(--r-sm) !important; border: 1px solid var(--line-2);
  width: 88px !important; height: 88px !important; object-fit: cover;
}

/* ---------- offer banner ---------- */
.offer-banner:not(:empty) {
  background: var(--brand-soft);
  border: 1px solid var(--brand-tint);
  color: var(--brand-dark);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---------- modals (menu / cart / summary / contact / address / track) ---------- */
.modal-content {
  border: 0 !important;
  border-radius: var(--r-xl) var(--r-xl) 0 0 !important;
  box-shadow: var(--shadow-xl) !important;
  background: var(--card) !important;
}
@media (min-width: 576px) {
  .modal-content { border-radius: var(--r-xl) !important; }
}
.modal-body h5, .modal-body h6 { font-weight: 700; letter-spacing: -0.01em; }
#restaurant-logo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
}
#menu-search.form-control {
  background: var(--line-2);
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  padding: 9px 18px;
}
#menu-search.form-control:focus { background: var(--card); border-color: var(--brand) !important; box-shadow: var(--ring); }

/* category tabs inside menu modal (children rendered by app.js) */
#category-tabs { gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
#category-tabs::-webkit-scrollbar { display: none; }
#category-tabs > * {
  flex: 0 0 auto;
  white-space: nowrap;
  border-radius: 999px !important;
  border: 0 !important;
  background: transparent;
  padding: 7px 15px !important;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
#category-tabs > .active, #category-tabs > .btn-primary {
  background: var(--brand-soft) !important;
  color: var(--brand-dark) !important;
}


.add-btn {
  position: absolute;
  right: -6px !important;
  bottom: -6px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  background: var(--brand) !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  box-shadow: var(--shadow-md) !important;
  font-size: 19px !important;
  font-weight: 700;
  line-height: 1;
  transition: all var(--dur) var(--ease);
}
.add-btn:hover { background: var(--brand-hover) !important; }
.quantity-controls {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  box-shadow: var(--shadow-md);
}
.quantity-controls .btn-minus, .quantity-controls .btn-plus {
  width: 26px !important;
  height: 26px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: var(--line-2) !important;
  color: var(--ink) !important;
  font-weight: 700;
  line-height: 1;
  margin-top: 0 !important;
}
.quantity-controls .btn-plus { background: var(--brand) !important; color: #fff !important; }
.quantity-controls .item-count { font-weight: 700; font-size: 13px; }

/* cart lines (renderCart) */
.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 2px;
  border: 0 !important;
  border-bottom: 1px solid var(--line-2) !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}
.cart-line .cart-line-name { font-weight: 600; font-size: 14px; }
.cart-line .cart-line-price { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cart-line img { border-radius: var(--r-sm) !important; border: 1px solid var(--line-2); }

/* summary block */
#summary-section {
  border-radius: var(--r-md) !important;
  font-size: 14px;
}
#summary-section hr { border-color: var(--line); opacity: 1; }
#credits-applicable { color: var(--success); font-weight: 700; }

/* ---------- buttons ---------- */
.btn-primary,
#checkout-btn, #show-summary, #place-order-btn, #save-contact-info,
#save-address-btn, #ok {
  background: var(--brand) !important;
  border: 0 !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: var(--r-sm) !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  box-shadow: none !important;
  transition: background var(--dur) var(--ease);
}
.btn-primary:hover,
#checkout-btn:hover, #show-summary:hover, #place-order-btn:hover { background: var(--brand-hover) !important; }
.btn-outline-primary { color: var(--brand) !important; border-color: var(--brand) !important; border-radius: 999px !important; }
.btn-outline-primary:hover { background: var(--brand-soft) !important; }
.btn-link { color: var(--brand) !important; font-weight: 600; text-decoration: none !important; }
.btn-outline-secondary { border-color: var(--line) !important; color: var(--ink-2) !important; border-radius: 999px !important; }

/* generic form controls */
.form-control { border-radius: var(--r-sm) !important; border-color: var(--line) !important; }
.form-control:focus { border-color: var(--brand) !important; box-shadow: var(--ring) !important; }
.form-label { font-weight: 600; font-size: 13px; }

/* time-restriction card + empty state */
#time-restriction-message .bg-white,
.restaurant-list .col-12.text-center .fa-store { border-radius: var(--r-lg); }

/* tracking modal */
#trackModal .modal-content { background: var(--bg) !important; }
#trackModal .card { border-radius: var(--r-md) !important; }
/* Track order is a bottom-pinned sheet — cap its height and scroll the body so tall
   orders (long item lists / notes) don't overflow off the top of the screen with no
   way to scroll (the header + OK button were becoming unreachable). */
#trackModal .modal-content { max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
#trackModal .modal-content > .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 0; }
#tracking_status_badge.bg-warning { background: var(--warn-soft) !important; color: var(--warn) !important; }

/* sweetalert */
.swal-modal { border-radius: var(--r-lg); font-family: inherit; }
.swal-button {
  background-color: var(--brand) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--r-sm) !important;
  font-weight: 700;
}
.swal-button:hover { background-color: var(--brand-hover) !important; }
.swal-button--cancel {
  background-color: var(--card) !important;
  color: var(--brand) !important;
  border: 1px solid var(--line) !important;
}
.swal-title { font-weight: 700; letter-spacing: -0.01em; }
.swal-icon--info { border-color: var(--brand); }
.swal-icon--info::after, .swal-icon--info::before { background-color: var(--brand); }

/* ============================================================
   Menu item card — photo LEFT, info, round add button (fg style)
   Overrides the earlier .menu-card block; higher specificity + later.
   ============================================================ */
.menu-card.fgm-item {
  display: flex !important;
  gap: 14px;
  align-items: stretch;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 116px;
  max-height: 132px;
}
.menu-card.fgm-item .menu-item-img {
  order: -1;                 /* photo first (left) */
  width: 96px !important;
  height: 96px !important;
  min-width: 96px;
  object-fit: cover;
  border-radius: var(--r-sm) !important;
  border: 1px solid var(--line-2);
  align-self: center;
}
.menu-card.fgm-item .mc-info { flex: 1; min-width: 0; padding: 2px 0; }
.menu-card.fgm-item .mc-info .fw-semibold { font-size: 15px; letter-spacing: -0.01em; }
.menu-card.fgm-item .menu-price { display: flex; align-items: center; gap: 8px; }
.mc-customize { font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; }
.menu-card.fgm-item .mc-add {
  align-self: center; flex: none;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--brand); color: #fff; border: 0;
  font-size: 20px; font-weight: 700; line-height: 1;
  box-shadow: var(--shadow-sm); transition: background var(--dur) var(--ease);
}
.menu-card.fgm-item .mc-add:hover { background: var(--brand-hover); }

/* ============================================================
   Customization dialog (#fgItemModal)
   ============================================================ */
/* Item / add-to-cart dialog sits ABOVE the Maddie FAB (z 21050) so the concierge
   bubble never overlaps the "Add to cart" footer. (Belt-and-suspenders alongside the
   JS that hides the FAB while a dialog is open — body.fg-dialog-open below.) */
#fgItemModal { position: fixed; inset: 0; z-index: 21100; display: none; }
#fgItemModal.open { display: block; }
#fgItemModal .fgim-scrim { position: absolute; inset: 0; background: rgba(11,14,17,.5); }
#fgItemModal .fgim-sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(560px, 100%); max-height: 92vh; background: var(--card);
  border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; overflow: hidden;
  /* #5: no open animation — the dialog appears instantly. */
}
@media (min-width: 576px) {
  #fgItemModal .fgim-sheet { bottom: auto; top: 50%; transform: translate(-50%,-50%); border-radius: var(--r-xl); }
}
.fgim-hero { position: relative; height: 170px; background-size: cover; background-position: center; background-color: var(--line-2); flex: none; }
.fgim-x {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink); font-size: 20px; line-height: 1;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.fgim-body { padding: 18px 20px 8px; overflow-y: auto; }
.fgim-name { margin: 0; font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; }
.fgim-desc { color: var(--muted); font-size: var(--text-base); margin-top: 4px; }
.fgim-base { color: var(--brand); font-weight: 700; font-size: var(--text-md); margin-top: 10px; }
.fgim-callout {
  background: var(--warn-soft); color: #7a5b13; border-radius: var(--r-md);
  padding: 12px 14px; font-size: 13px; line-height: 1.5; margin: 14px 0 4px;
}
.fgim-group { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-top: 16px; }
.fgim-gh { font-weight: 700; font-size: var(--text-md); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fgim-badge { font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 3px 9px; }
.fgim-opt {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-sm);
  padding: 12px 14px; margin-top: 8px; font-size: var(--text-base); transition: all var(--dur) var(--ease);
}
.fgim-opt:hover { border-color: var(--muted-2); }
.fgim-opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.fgim-mark { flex: none; width: 20px; height: 20px; border: 2px solid var(--muted-2); display: grid; place-items: center; }
.fgim-mark.rad { border-radius: 999px; }
.fgim-mark.chk { border-radius: 6px; }
.fgim-opt.sel .fgim-mark { border-color: var(--brand); }
.fgim-opt.sel .fgim-mark.rad::after { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--brand); }
.fgim-opt.sel .fgim-mark.chk { background: var(--brand); }
.fgim-opt.sel .fgim-mark.chk::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }
.fgim-opt-l { flex: 1; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.fgim-inc-badge { font-size: 10px; font-weight: 700; color: var(--muted); background: var(--line-2); border-radius: 999px; padding: 2px 7px; }
.fgim-delta { font-weight: 700; color: var(--ink); }
.fgim-free, .fgim-inc { color: var(--muted); font-weight: 600; font-size: 13px; }
.fgim-notes-wrap { margin: 18px 0 6px; }
.fgim-notes-l { font-weight: 700; font-size: var(--text-base); } .fgim-notes-l span { color: var(--muted); font-weight: 500; }
.fgim-notes { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin-top: 6px; outline: none; resize: vertical; min-height: 64px; font: inherit; }
.fgim-notes:focus { border-color: var(--brand); box-shadow: var(--ring); }
.fgim-count { text-align: right; color: var(--muted-2); font-size: 12px; margin-top: 4px; }
.fgim-foot { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 14px; align-items: center; background: var(--card); }
.fgim-qty { display: flex; align-items: center; gap: 14px; background: var(--line-2); border-radius: 999px; padding: 7px 12px; flex: none; }
.fgim-qty button { width: 28px; height: 28px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); font-weight: 700; font-size: 16px; line-height: 1; border: 0; }
.fgim-q-n { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 14px; text-align: center; }
.fgim-add { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--brand); color: #fff; border: 0; border-radius: var(--r-sm); padding: 14px 18px; font-weight: 700; font-size: var(--text-base); transition: background var(--dur) var(--ease); }
.fgim-add:hover { background: var(--brand-hover); }
.fgim-add:disabled { background: var(--muted-2); cursor: not-allowed; }
.fgim-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(10px); z-index: 21200; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); opacity: 0; transition: all .25s var(--ease); pointer-events: none; }
.fgim-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* per-item special instructions shown on its own line in the cart */
.cart-line-note { margin-top: 4px; font-size: 12px; color: var(--muted); font-style: italic; max-width: 210px; }
.cart-line-note i { color: var(--brand); margin-right: 4px; font-style: normal; }

/* ============================================================
   HOME extras (hero, recently viewed, circular chips, pills,
   sections, sort) + RESTAURANT breadcrumb/info-bar + CART drawer.
   Ported from fg.amenify.ai structure; Amenify blue tokens.
   ============================================================ */

/* ---- Hero ---- */
.fg-hero { margin: 6px 0 16px; border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(120deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: var(--shadow-md); }
.fg-hero-inner { display: flex; align-items: center; gap: 20px; padding: 26px 28px; }
.fg-hero-emoji { font-size: 60px; flex: none; filter: saturate(1.1); }
.fg-hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; opacity: .85; }
.fg-hero-title { font-size: var(--text-3xl); font-weight: 800; letter-spacing: -0.03em; margin-top: 2px; }
.fg-hero-sub { font-size: var(--text-md); opacity: .92; margin-top: 6px; max-width: 640px; }
.fg-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fg-hero-pill { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); color: #fff;
  border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 600; }

/* ---- Hero CAROUSEL (ported from fg.amenify.ai, Amenify blue) ---- */
.fg-hero--carousel { position: relative; background: var(--brand-dark); }
.fg-hero-track { position: relative; }
.fg-hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .5s ease; color: #fff; }
.fg-hero-slide.active { position: relative; opacity: 1; visibility: visible; }
/* per-slide gradients — distinct hues that still live in the blue family:
   bright brand-blue / deep indigo-night / cyan-teal. Clear contrast between
   slides, none of them off-theme. */
.fg-hs-food    { background: linear-gradient(135deg, #0047b3 0%, #3b82f6 100%); }  /* brand blue */
.fg-hs-maddie  { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%); }  /* violet */
.fg-hs-grocery { background: linear-gradient(135deg, #0f766e 0%, #10b981 100%); }  /* emerald-teal */
.fg-hero-cta { margin-top: 16px; }
.fg-hero-btn { background: #fff; color: var(--brand-dark); border: 0; border-radius: 999px;
  padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease; }
.fg-hero-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.fg-hero-btn span { margin-left: 4px; }
/* Arrows removed — dots + swipe only. Reserve bottom room so the dots sit in a
   clear band below the slide content (space above the dots). */
.fg-hero--carousel .fg-hero-inner { padding-bottom: 46px; }
.fg-hero-dots { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: center; gap: 8px; }
.fg-hero-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: rgba(255,255,255,.4); transition: width .2s ease, background .2s ease; }
.fg-hero-dot.active { width: 22px; border-radius: 999px; background: #fff; }

/* ---- Controls (segmented) ---- */
.fg-controls .dashed-border { }
.seg-view .filter-btn.active, .seg-fulfil .filter-btn.active { background: var(--card) !important; color: var(--brand) !important; box-shadow: var(--shadow-sm); }

/* ---- Recently viewed ---- */
.fg-recent { margin: 6px 0 16px; }
.fg-recent-head { font-weight: 700; font-size: var(--text-md); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fg-recent-head i { color: var(--muted); }
.fg-recent-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.fg-recent-row::-webkit-scrollbar { display: none; }
.fg-recent-card { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px 10px 10px; cursor: pointer;
  min-width: 210px; transition: box-shadow var(--dur) var(--ease); }
.fg-recent-card:hover { box-shadow: var(--shadow-md); }
.fg-recent-thumb { position: relative; width: 44px; height: 44px; border-radius: var(--r-sm); overflow: hidden;
  flex: none; display: grid; place-items: center; background: var(--line-2); }
.fg-recent-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fg-recent-emoji { font-size: 22px; }
.fg-recent-name { font-weight: 700; font-size: var(--text-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.fg-recent-cuisine { color: var(--muted); font-size: var(--text-sm); }

/* ---- Circular cuisine chips ---- */
.cuisine-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px !important; }
.cuisine-thumb { width: 30px; height: 30px; border-radius: 999px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 16px; flex: none; }
.cuisine-tag.active .cuisine-thumb { background: #fff; }
.cuisine-label { line-height: 1; }

/* ---- Quick filter pills ---- */
.fg-filterpills { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.fg-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: all var(--dur) var(--ease); }
.fg-pill i { color: var(--muted); font-size: 12px; }
.fg-pill:hover { border-color: var(--muted-2); }
.fg-pill.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.fg-pill.active i { color: var(--brand); }

/* ---- Sections ---- */
.fg-section { margin: 8px 0 22px; }
.fg-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.fg-section-title { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.fg-section-sub { color: var(--muted); font-size: var(--text-sm); }
.fg-all-head { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 6px; }
.fg-hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 18px;
  overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.fg-hscroll::-webkit-scrollbar { display: none; }
.fg-hscroll .restaurant-wrapper { width: auto !important; }

/* ---- Sort ---- */
.fg-sort { display: inline-flex; align-items: center; gap: 8px; }
.fg-sort-label { color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.fg-sort-select { border: 1px solid var(--line); border-radius: 999px; padding: 7px 30px 7px 14px; font-size: 13px;
  font-weight: 600; background: var(--card); cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.fg-sort-select:focus { border-color: var(--brand); box-shadow: var(--ring); outline: none; }

/* ---- Card address line ---- */
.fgc-addr { font-size: 12.5px; color: var(--muted-2); margin-top: 5px; display: flex; align-items: flex-start; gap: 6px; }
.fgc-addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fgc-rating { background: var(--line-2); border-radius: 999px; padding: 2px 8px; }
.fgc-rev { color: var(--muted); font-weight: 500; }

/* ---- Map view (Leaflet) ---- */
.fg-map { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  margin-bottom: 20px; background: var(--card); position: relative; }
.fg-map-canvas { width: 100%; height: 460px; z-index: 0; }
.fg-map-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); padding: 40px; text-align: center; }
.fg-map-note { padding: 10px 14px; font-size: var(--text-sm); color: var(--ink-2); font-weight: 600;
  border-top: 1px solid var(--line); background: var(--brand-soft); }
.fg-map-note i { color: var(--brand); margin-right: 6px; }
/* Leaflet popup — Amenify blue CTA */
.fg-map-pop { min-width: 150px; }
.fg-map-pop-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.fg-map-pop-rating { font-size: 12px; color: var(--brand-dark); margin: 2px 0 8px; font-weight: 600; }
.fg-map-pop-closed { font-size: 12px; color: var(--muted); margin-top: 6px; }
.fg-map-pop-btn { background: var(--brand); color: #fff; border: 0; border-radius: 8px;
  padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; width: 100%; }
.fg-map-pop-btn:hover { background: var(--brand-dark); }
@media (max-width: 768px) { .fg-map-canvas { height: 360px; } }

/* ---- Restaurant page: breadcrumb + info bar ---- */
.fgm-crumbs { font-size: var(--text-sm); color: var(--muted); margin: 2px 0 12px; }
.fgm-crumbs a { color: var(--muted); } .fgm-crumbs a:hover { color: var(--ink); }
.fgm-crumb-sep { padding: 0 6px; color: var(--muted-2); }
.fgm-infobar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin: 0 0 16px; font-size: var(--text-sm); }
.fgm-info-bit { color: var(--ink-2); font-weight: 600; }
.fgm-info-bit i { color: var(--brand); }
.fgm-info-dot { color: var(--muted-2); padding: 0 4px; }
.fgm-info-tag { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 12px; }

/* ---- Checkout (summaryModal) → fg-style FULL-SCREEN page ---- */
#summaryModal .modal-dialog,
#summaryModal .modal-dialog.modal-dialog-centered.modal-bottom {
  position: fixed !important; inset: 0 !important;
  margin: 0 !important; max-width: 100% !important; width: 100% !important;
  height: 100% !important; min-height: 100% !important; display: block !important; }
#summaryModal .modal-content {
  height: 100% !important; min-height: 100% !important; border: 0 !important; border-radius: 0 !important; }
/* content sits in a centered, comfortable column so it isn't stretched edge-to-edge */
.fgco { position: relative; height: 100%; overflow-y: auto; background: var(--bg);
  padding: 22px 20px 40px !important; }
/* one centered column — the whole checkout aligns as a single block */
.fgco-inner { max-width: 640px; margin: 0 auto; }
.fgco-close { position: absolute; top: 18px; right: 22px; z-index: 5; }
.fgco-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.fgco-back { border: 0; background: var(--line-2); width: 34px; height: 34px; border-radius: 50%;
  font-size: 18px; color: var(--ink); cursor: pointer; line-height: 1; }
.fgco-back:hover { background: var(--brand-soft); color: var(--brand); }
.fgco-title { margin: 0; font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; }
/* action cards (deliver / notes / payment) */
.fgco-card { display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 12px; }
.fgco-card-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; font-size: 15px; }
.fgco-card-main { flex: 1; min-width: 0; }
.fgco-card-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fgco-card-value { font-size: var(--text-md); font-weight: 700; color: var(--ink); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fgco-card-sub { font-size: var(--text-sm); color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fgco-card-action { flex: none; border: 1px solid var(--brand); background: transparent; color: var(--brand);
  border-radius: 999px; padding: 6px 15px; font-size: 13px; font-weight: 700; cursor: pointer; }
.fgco-card-action:hover { background: var(--brand-soft); }
/* order summary — pure-white card, generous padding, hairline dividers so it breathes */
.fgco-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 28px 20px; margin: 10px 0 18px; box-shadow: var(--shadow-xs); }
.fgco-sum-title { font-size: var(--text-lg); font-weight: 800; margin-bottom: 6px; text-transform: capitalize; }
#summary-section { background: transparent; }
/* "See items" link on the Subtotal row → reopens the cart */
.fgco-viewitems { border: 0; background: transparent; color: var(--brand); font-weight: 700;
  font-size: 12.5px; cursor: pointer; padding: 0 0 0 6px; text-decoration: underline; }
.fgco-viewitems:hover { color: var(--brand-dark); }
/* Deliver-to card address may wrap to two lines (don't ellipsis a full address) */
.fgco-deliverto .fgco-card-value { white-space: normal; }
.fgco-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: var(--text-base); color: var(--muted); padding: 13px 0; border-top: 1px solid var(--line-2); }
.fgco-row:first-of-type { border-top: 0; }
.fgco-row span:last-child { font-weight: 700; color: var(--ink); }
/* pre-tip total reads as a subtotal divider */
.fgco-row:nth-last-child(3) { border-top: 1px solid var(--line); margin-top: 2px; }
.fgco-total { display: flex; justify-content: space-between; align-items: center;
  font-size: var(--text-lg); font-weight: 800; color: var(--ink); padding: 6px 2px 14px; }
.fgco-place-btn { width: 100%; border: 0; border-radius: 999px; background: var(--brand); color: #fff;
  padding: 15px; font-size: var(--text-md); font-weight: 800; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background .15s var(--ease), transform .12s var(--ease); }
.fgco-place-btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
@media (max-width: 480px) {
  #summaryModal .modal-dialog { max-width: 100% !important; }
  #summaryModal .modal-content { border-radius: 0 !important; }
}

/* ---- Cart → right slide-in drawer ---- */
/* Override Bootstrap .modal-dialog-centered / .modal-bottom on the cart. */
#cartModal .modal-dialog,
#cartModal .modal-dialog.modal-dialog-centered.modal-bottom {
  position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important;
  left: auto !important; margin: 0 !important; max-width: 440px !important; width: 100% !important;
  height: 100% !important; min-height: 100% !important; display: block !important; }
#cartModal .modal-content {
  height: 100% !important; min-height: 100% !important; border: 0 !important;
  border-radius: var(--r-xl) 0 0 var(--r-xl) !important; display: flex !important; flex-direction: column !important; }
#cartModal .modal-content > .modal-body { overflow-y: auto; flex: 1; }
#cartModal.fade .modal-dialog { transform: translateX(40px); transition: transform .25s var(--ease); }
#cartModal.show .modal-dialog { transform: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .fg-hero-title { font-size: var(--text-2xl); }
}
@media (max-width: 768px) {
  .fg-hero-inner { padding: 20px; gap: 14px; }
  .fg-hero-emoji { font-size: 44px; }
  .fg-hero-sub { font-size: var(--text-base); }
  .fg-section-title { font-size: var(--text-xl); }
  .fg-hscroll { grid-auto-columns: minmax(240px, 78%); }
  .fgm-hero { height: 150px; }
  .fgm-hero-name { font-size: var(--text-xl); }
}
@media (max-width: 480px) {
  #main-content.container { padding-left: 14px; padding-right: 14px; }
  .fgc-body { padding: 12px 14px 14px; }
  .fgc-name { font-size: 15px; }
  .fgc-rating { font-size: 12px; }
  /* address + item line stay visible now that cards are full-width, 1-per-row */
  .fg-hero-emoji { display: none; }
  .fg-hero-title { font-size: var(--text-xl); }
  .fg-hero-sub { display: none; }
  .fg-hero-pill { font-size: 12px; padding: 4px 10px; }
  .fg-hero-dots { bottom: 10px; }
  .fg-controls { gap: 8px; }
  .fg-section-head { flex-direction: row; align-items: center; }
  .fg-section-sub { display: none; }
  .fg-hscroll { grid-auto-columns: minmax(220px, 85%); }
  .menu-card.fgm-item { min-height: 104px; max-height: 124px; }
  .menu-card.fgm-item .menu-item-img { width: 78px !important; height: 78px !important; min-width: 78px; }
  #cartModal .modal-dialog { max-width: 100% !important; }
  #cartModal .modal-content { border-radius: 0 !important; }
  .fgim-sheet { width: 100% !important; }
}

/* ============================================================
   Round 2 fixes (#7 #8 #10 #11)
   ============================================================ */

/* #8 — Cart button in header */
.fg-cart-btn { flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; border: 0;
  font-size: 16px; cursor: pointer; transition: background var(--dur) var(--ease); }
.fg-cart-btn:hover { background: var(--ink-2); }
.fg-cart-count { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px;
  text-align: center; border: 2px solid var(--card); }

/* ---------- header responsive: always keep location+search+heart+cart ---------- */
@media (max-width: 768px) {
  .fg-header { gap: 8px; padding: 9px 12px; }
  .fg-header .fg-logo, .fg-hide-narrow { display: none !important; }
  .fg-locpill { max-width: 130px; padding: 9px 12px; }
  .fg-locpill-text { max-width: 74px; }
  .fg-locpill-caret { display: none; }
}
@media (max-width: 480px) {
  .fg-locpill { max-width: 44px; padding: 0; width: 44px; height: 44px; border-radius: 50%; justify-content: center; }
  .fg-locpill-text, .fg-locpill-caret { display: none; }        /* collapse to a pin-only chip on phones */
  .fg-locpill-pin { font-size: 16px; }
  .fg-search-wrap { height: 42px; }
}

/* #10 — one consistent content width for the whole home page */
#top-bar .fg-header,
#main-content.container,
.address-container { max-width: var(--maxw, 1240px) !important; margin-left: auto !important; margin-right: auto !important; }
#main-content.container { width: 100%; padding-left: 20px; padding-right: 20px; }
.address-container { padding-left: 20px; padding-right: 20px; }
/* address pill: left-align to match everything else (was centered) */
.center-container.address-container { justify-content: flex-start; height: auto; }

/* one restaurant per row (full-width fg-style cards) */
.restaurant-list.row, .restaurant-list {
  grid-template-columns: minmax(0, 1fr);
}
/* Hardening for the "cards wider than the sections above" report: the list shares
   #main-content's content box like every other section, so it must never pick up
   Bootstrap's .row negative side-margins (which would push cards ~24px past the
   header/controls on each side). Pin margins to 0 and clamp to the column width so a
   stale/partial CSS load can't reintroduce the overflow. */
#main-content .restaurant-list.row,
#main-content .restaurant-list {
  margin-left: 0 !important; margin-right: 0 !important;
  width: auto !important; max-width: 100% !important;
}

/* #7 — Top rated near you: full-width, highlighted, visually separate from All */
#fg-toprated.fg-section {
  background: var(--brand-soft);
  border: 1px solid var(--brand-tint);
  border-radius: var(--r-xl);
  padding: 20px 22px 22px;
  margin: 10px 0 26px;
}
#fg-toprated .fg-section-title { color: var(--brand-dark); }
#fg-toprated .fg-hscroll { grid-auto-columns: minmax(300px, 1fr); }
#fg-toprated .fgc { border-color: var(--brand-tint); }
.fg-all-head { border-top: 0; padding-top: 4px; }

/* #11 — Menu dialog full-screen + kill the duplicate (template) close button */
#menuModal .modal-dialog {
  max-width: 100% !important; width: 100% !important; margin: 0 !important;
  height: 100% !important; min-height: 100% !important; }
#menuModal .modal-content {
  height: 100vh !important; border-radius: 0 !important; border: 0 !important; }
#menuModal .modal-body { max-height: 100vh; overflow-y: auto; }
/* the template's .btn-close is the 2nd X — the .fgm-hero-close is the one we keep */
#menuModal .modal-close-btn, #menuModal .position-absolute.top-0.end-0 { display: none !important; }
/* center the menu content column inside the full-screen sheet */
#menuModal #menu-sections, #menuModal #category-tabs, #menuModal .fgm-infobar,
#menuModal .fgm-crumbs, #menuModal #menu-search, #menuModal #checkout-btn,
#menuModal .fgm-hero {
  max-width: var(--maxw, 1240px); margin-left: auto; margin-right: auto; }
@media (min-width: 992px) {
  #menuModal .mgrid, #menuModal #menu-sections { }
}

/* ============================================================
   #12 Maddie concierge widget (Amenify blue)
   ============================================================ */
#fg-maddie { position: fixed; right: 20px; bottom: 20px; z-index: 21050; }
/* While any dialog is open, the Maddie FAB yields so it can't cover a dialog's action
   buttons (add-to-cart, place-order, track "OK"). Toggled by fgSyncDialogChrome(). The
   open Maddie chat panel is unaffected. */
body.fg-dialog-open #fg-maddie-fab { display: none !important; }
/* fg-style circular avatar FAB with a pulse ring + hover tooltip */
#fg-maddie-fab {
  position: relative; width: 62px; height: 62px; border: 0; padding: 0; cursor: pointer;
  border-radius: 50%; background: var(--card); box-shadow: var(--shadow-lg);
  display: inline-grid; place-items: center;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
#fg-maddie-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-xl); }
#fg-maddie-fab.hidden { display: none; }
.fg-maddie-fab-img { width: 58px; height: 58px; border-radius: 50%; display: block; }
.fg-maddie-fab-pulse { position: absolute; inset: -2px; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0,105,255,.45); animation: fgMaddiePulse 2.2s infinite; }
@keyframes fgMaddiePulse {
  0% { box-shadow: 0 0 0 0 rgba(0,105,255,.45); }
  70% { box-shadow: 0 0 0 14px rgba(0,105,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,105,255,0); }
}
.fg-maddie-fab-tip { position: absolute; right: 72px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 13px; border-radius: 999px; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .15s var(--ease); }
#fg-maddie-fab:hover .fg-maddie-fab-tip { opacity: 1; }
.fg-maddie-avatar-img { width: 40px; height: 40px; border-radius: 50%; display: block;
  background: rgba(255,255,255,.9); flex: none; }
.fg-maddie-panel {
  position: fixed; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 40px); background: var(--card);
  border-radius: var(--r-xl); box-shadow: var(--shadow-xl); overflow: hidden;
  display: none; flex-direction: column; }
.fg-maddie-panel.open { display: flex; }
.fg-maddie-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.fg-maddie-head-id { display: flex; align-items: center; gap: 10px; }
.fg-maddie-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.fg-maddie-name { font-weight: 800; font-size: 15px; line-height: 1.1; }
.fg-maddie-sub { font-size: 12px; opacity: .85; }
.fg-maddie-close { background: transparent; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.fg-maddie-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.fg-maddie-msg { display: flex; }
.fg-maddie-msg.me { justify-content: flex-end; }
.fg-maddie-bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.4;
  white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow-xs); }
.fg-maddie-msg.bot .fg-maddie-bubble { background: var(--card); color: var(--ink); border-bottom-left-radius: 5px; }
.fg-maddie-msg.me .fg-maddie-bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.fg-maddie-dots { display: inline-flex; gap: 4px; align-items: center; }
.fg-maddie-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2);
  animation: fgMaddieBlink 1.2s infinite ease-in-out both; }
.fg-maddie-dots span:nth-child(2) { animation-delay: .2s; }
.fg-maddie-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes fgMaddieBlink { 0%,80%,100%{opacity:.25;transform:translateY(0)} 40%{opacity:1;transform:translateY(-2px)} }
.fg-maddie-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; background: var(--bg); }
.fg-maddie-chip { border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.fg-maddie-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.fg-maddie-input { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--card); }
.fg-maddie-input input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px;
  font-size: 14px; outline: none; }
.fg-maddie-input input:focus { border-color: var(--brand); box-shadow: var(--ring); }
.fg-maddie-send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 15px; }
.fg-maddie-send:hover { background: var(--brand-dark); }
@media (max-width: 480px) {
  .fg-maddie-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: none; }
  #fg-maddie { right: 12px; bottom: 12px; }
}

/* Maddie interactive cards (restaurant picks the user can tap to open) */
.fg-maddie-cards { display: flex; flex-direction: column; gap: 8px; max-width: 88%; }
.fg-maddie-card { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 12px; cursor: pointer; transition: border-color .12s var(--ease), transform .12s var(--ease), box-shadow .12s var(--ease); }
.fg-maddie-card:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.fg-mc-thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 20px; }
.fg-mc-info { display: flex; flex-direction: column; min-width: 0; }
.fg-mc-title { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-mc-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
/* Maddie item card add (+) button */
.fg-maddie-card-add { position: relative; }
.fg-mc-add { flex: none; margin-left: auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.fg-maddie-card-add:hover .fg-mc-add { background: var(--brand-dark); }

/* ---- Menu-modal top loading bar (replaces the "Getting details!" dialog) ---- */
.menu-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 20;
  background: var(--brand-soft); overflow: hidden; }
.menu-progress[hidden] { display: none; }
.menu-progress-bar { position: absolute; left: 0; top: 0; height: 100%; width: 40%;
  background: var(--brand); border-radius: 999px; animation: fgMenuBar 1.1s ease-in-out infinite; }
@keyframes fgMenuBar {
  0%   { left: -40%; width: 40%; }
  50%  { left: 30%;  width: 55%; }
  100% { left: 100%; width: 40%; }
}
/* ---- Menu-modal centered loading spinner (rotating ring) ---- */
.fgm-spinner { position: absolute; inset: 0; z-index: 21; display: grid;
  place-items: center; pointer-events: none; }
.fgm-spinner[hidden] { display: none; }
.fgm-spinner-ring { width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid var(--brand-soft); border-top-color: var(--brand);
  animation: fgSpin .8s linear infinite; }
@keyframes fgSpin { to { transform: rotate(360deg); } }

/* ---- Grocery store hero (fg image-forward: photo bg, badge, tagline, stat pills) ---- */
/* NOTE: bg photo is a placeholder produce shot (solid-color fallback) until the
   fg store-image migration supplies the real Amenify Grocery hero asset. */
.fgm-hero--grocery {
  height: 244px; align-items: stretch;
  /* On-brand gradient (no Unsplash — CLAUDE.md restricts Unsplash to onerror fallbacks).
     Real Amenify Grocery hero image lands with the fg store-image migration. */
  background: linear-gradient(135deg, #0f766e 0%, #10b981 100%);
}
.fgm-hero--grocery .fgm-hero-overlay { background: linear-gradient(180deg, rgba(11,14,17,.25) 0%, rgba(11,14,17,.74) 100%); }
.fgm-gh-content { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 5px; }
.fgm-store-badge { display: inline-block; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 4px 12px; border-radius: 999px; }
.fgm-gh-tagline { font-size: 14px; opacity: .95; }
.fgm-gh-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fgm-gh-pill { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); color: #fff;
  font-size: 13px; font-weight: 600; padding: 5px 13px; border-radius: 999px; backdrop-filter: blur(3px); }
.fgm-hero-back { position: absolute; top: 14px; left: 14px; z-index: 3; border: 0; cursor: pointer;
  background: rgba(11,14,17,.55); color: #fff; font-size: 14px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; backdrop-filter: blur(3px); }
.fgm-hero-back:hover { background: rgba(11,14,17,.72); }

/* ---- Cart items (fg layout: store header, thumb + each + line total, qty + Remove, add-more) ---- */
.cart-store-head { font-size: 14px; color: var(--muted); margin: 2px 0 14px; }
.cart-store-head strong { color: var(--brand-dark); font-weight: 700; }
.cart-store-sep { color: var(--muted-2); padding: 0 4px; }
.cart-item-wrap { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.cart-item { display: flex; align-items: flex-start; gap: 12px; }
.cart-item-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--line-2); }
.cart-item-main { flex: 1 1 auto; min-width: 0; }
.cart-item-name { font-weight: 700; color: var(--ink); }
.cart-item-each { font-size: 13px; color: var(--muted-2); margin-top: 2px; }
.cart-item-price { font-weight: 700; color: var(--ink); white-space: nowrap; }
.cart-item-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.cart-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.cart-qty-btn { width: 30px; height: 30px; border-radius: 999px; border: 0; background: transparent; font-size: 17px; line-height: 1; cursor: pointer; color: var(--ink); }
.cart-qty-btn:hover { background: var(--line-2); }
.cart-qty-n { min-width: 22px; text-align: center; font-weight: 700; }
.cart-remove { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.cart-remove:hover { color: var(--danger); }
.cart-addmore { width: 100%; border: 1.5px dashed var(--brand-tint); background: transparent; color: var(--brand);
  font-weight: 700; border-radius: 12px; padding: 12px; cursor: pointer; margin-top: 2px; }
.cart-addmore:hover { background: var(--brand-soft); }
.cart-line-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---- Search typeahead dropdown (fg-style) ---- */
.fg-search-dd { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1200;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden auto; max-height: 72vh; }
.fg-search-dd[hidden] { display: none; }
.fg-sdd-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted-2); padding: 13px 16px 6px; }
.fg-sdd-row { display: flex; align-items: center; gap: 12px; padding: 9px 16px; cursor: pointer;
  border: 0; background: transparent; width: 100%; text-align: left; font: inherit; }
.fg-sdd-row:hover { background: var(--line-2); }
.fg-sdd-thumb { position: relative; width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: var(--brand-soft); display: grid; place-items: center; font-size: 22px; overflow: hidden; }
.fg-sdd-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fg-sdd-main { min-width: 0; flex: 1 1 auto; }
.fg-sdd-title { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-sdd-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-sdd-empty { padding: 16px; color: var(--muted); font-size: 14px; text-align: center; }
.fg-sdd-foot { border-top: 1px solid var(--line); }
.fg-sdd-foot .fg-sdd-row { color: var(--brand); font-weight: 700; }

/* ---- Restaurant menu hero (image-forward, same family as grocery) ---- */
.fgm-hero--rest { height: 210px; align-items: stretch; background-size: cover; background-position: center; }
.fgm-hero--rest .fgm-hero-overlay { background: linear-gradient(180deg, rgba(11,14,17,.15) 0%, rgba(11,14,17,.76) 100%); }

/* ---- Header Track button (pending order) ---- */
.fg-track-btn { background: var(--brand-soft) !important; color: var(--brand) !important; }
.fg-track-btn:hover { background: var(--brand-tint) !important; }

/* ---- Off-hours compact banner (small, top; replaces the bulky card) ---- */
.fg-offhours { display: flex; align-items: center; gap: 10px;
  background: #fff8e6; border: 1px solid #ffe4a1; color: #7a5f12;
  border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 4px 0 12px; }
.fg-offhours i { color: #d99a1a; font-size: 15px; flex: none; }
.fg-offhours strong { color: #5f4a0e; }

/* ---- Inline Store Notes + Tip on checkout (replaces the contact dialog) ---- */
.fgco-card.fgco-notestip { display: block; }
.fgco-nt-field { margin: 0; }
.fgco-nt-label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700;
  color: var(--ink); margin-bottom: 8px; }
.fgco-nt-ic { color: var(--muted); flex: none; }
.fgco-nt-opt { font-weight: 500; font-size: 11px; color: var(--muted); text-transform: none;
  letter-spacing: 0; background: var(--line-2); padding: 2px 8px; border-radius: 999px; }
.fgco-nt-input { display: block; width: 100%; min-height: 62px; resize: vertical; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; font-size: 14px;
  color: var(--ink); background: var(--card); line-height: 1.45; font-family: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.fgco-nt-input::placeholder { color: var(--muted-2); }
.fgco-nt-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }

/* ---- Driver tip: percentage-preset chips (amounts computed from subtotal) ---- */
.fgco-card.fgco-tipcard { display: block; }
.fgco-tip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.fgco-tip-ic { color: var(--ink); flex: none; }
.fgco-tip-title { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.fgco-tip-sub { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted);
  text-align: right; }
.fgco-tip-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fg-tip-chip { display: inline-flex; align-items: baseline; gap: 5px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); border-radius: 999px; padding: 9px 15px; cursor: pointer;
  font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent; }
.fg-tip-chip--text { align-items: center; }
.fg-tip-chip .fg-tip-amt { font-weight: 600; color: var(--muted); font-size: 13px; }
.fg-tip-chip .fg-tip-mid { color: var(--muted-2); font-weight: 600; }
.fg-tip-chip:hover { border-color: var(--muted-2); }
.fg-tip-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.fg-tip-chip.active .fg-tip-amt { color: rgba(255, 255, 255, 0.9); }
.fg-tip-chip.active .fg-tip-mid { color: rgba(255, 255, 255, 0.6); }
.fg-tip-chip:focus-visible { outline: none; box-shadow: var(--ring); }
.fg-tip-chip:active { transform: scale(0.97); }
.fgco-tip-custom { margin-top: 12px; display: flex; align-items: center; border: 1.5px solid var(--brand);
  border-radius: var(--r-sm); overflow: hidden; max-width: 220px; box-shadow: var(--ring); }
.fgco-tip-cur { padding: 0 2px 0 13px; font-weight: 700; color: var(--ink); font-size: 15px; }
.fgco-tip-custom-input { flex: 1; min-width: 0; border: 0; outline: none; padding: 11px 13px 11px 5px;
  font-size: 15px; font-weight: 700; color: var(--ink); background: transparent; font-family: inherit; }
.fgco-tip-custom-input::placeholder { font-weight: 500; color: var(--muted-2); font-size: 13px; }
/* Hide native number spinners — the chips are the primary control. */
.fgco-tip-custom-input::-webkit-outer-spin-button,
.fgco-tip-custom-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fgco-tip-custom-input { -moz-appearance: textfield; appearance: textfield; }
