/* WhereTooEat — uifix-8765 (loaded last). Profile modal, Gold AI orb, brighter seams, ambient backgrounds. */

/* ---------- 1. Profile modal: lock html + body, stable gutter ---------- */
html.wte-profile-open,
html.wte-profile-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}
html.wte-profile-open { scrollbar-gutter: stable; }
.wte-profile-modal { overscroll-behavior: contain; }
.wte-profile-modal .wte-profile-sheet {
  overscroll-behavior: contain;
  width: min(500px, calc(100vw - 28px)) !important;
  max-height: min(90vh, 860px) !important;
}
.wte-profile-modal .wte-profile-backdrop { touch-action: none; }

/* close: sticky, not floated (floats narrowed the hero) */
.wte-profile-modal .wte-profile-close {
  float: none;
  display: grid;
  place-items: center;
  position: sticky;
  top: 10px;
  margin: 10px 10px -50px auto;
  z-index: 30;
}
.wte-profile-modal .wte-profile-inner { overflow: visible; }

/* hero: full width, larger (was capped at 200px) */
.wte-profile-modal .wte-profile-media {
  width: 100%;
  max-height: none !important;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: min(56vh, 440px) !important;
}
.wte-profile-modal .wte-profile-media.wte-profile-media--sig { aspect-ratio: 1 / 1; }
.wte-profile-modal .wte-profile-media img,
.wte-profile-modal .wte-profile-media video,
.wte-profile-modal .wte-profile-img {
  max-height: none !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wte-profile-modal .wte-profile-heart { right: auto; left: 12px; }

/* hours */
.wte-profile-hours { margin: 6px 0; }
.wte-profile-hours > strong { display: block; margin-bottom: 4px; }
.wte-profile-hours p { margin: 0; }
.wte-profile-hours ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wte-profile-hours li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.86rem; }
.wte-profile-hours li span:first-child { color: rgba(255, 214, 140, 0.9); font-weight: 700; min-width: 76px; }
.wte-profile-hours li span:last-child { color: rgba(236, 240, 244, 0.9); text-align: right; }

/* placeholder media: clearly labelled, never the hero */
.wte-profile-placeholder { margin: 10px 0 4px; }
.wte-profile-ph-rail { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.wte-profile-ph-item {
  position: relative;
  flex: 0 0 150px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px dashed rgba(255, 194, 74, 0.7);
  background: #0d0c0a;
  aspect-ratio: 1 / 1;
}
.wte-profile-ph-item img,
.wte-profile-ph-item video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.8; }
.wte-profile-ph-badge {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(20, 16, 8, 0.9); color: #ffd27a;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.03em;
  border: 1px solid rgba(255, 194, 74, 0.6);
}
.wte-profile-ph-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 0.66rem; background: linear-gradient(transparent, #000c); }

/* ---------- 2. Gold AI orb: calmer, smaller, below dialogs/dock, hidden behind overlays ---------- */
#foodAiFab.wte-fab.fab-orb { z-index: 790; width: 72px; height: 72px; transition: opacity 0.2s ease, transform 0.25s ease; } /* reviewfix P2-13: no layout-property transitions */
#foodAiFab.wte-fab.fab-orb:not(.is-open) { animation: none; }
#foodAiFab.wte-fab.fab-orb:not(.is-open):not(:hover) .fab-orb-aura { animation: none; opacity: 0.55; }
#foodAiFab.wte-fab.fab-orb.is-open { width: 140px; height: 140px; }
@media (max-width: 900px) {
  #foodAiFab.wte-fab.fab-orb { width: 56px; height: 56px; }
  #foodAiFab.wte-fab.fab-orb.is-open { width: 128px; height: 128px; }
}
@media (max-width: 480px) {
  #foodAiFab.wte-fab.fab-orb { width: 50px; height: 50px; }
  #foodAiFab.wte-fab.fab-orb.is-open { width: 120px; height: 120px; }
}
html.wte-modal-open .mobile-nav { opacity: 0; transform: translateY(120%); pointer-events: none; transition: opacity .18s ease, transform .18s ease; } /* reviewfix P1-5 */
html.wte-modal-open #foodAiFab,
html.wte-orb-hidden #foodAiFab,
html.wte-profile-open #foodAiFab,
html.mlb-open #foodAiFab,
html.classified-open #foodAiFab,
body.fav-drawer-open #foodAiFab { display: none !important; }
html.wte-profile-open #orbChat,
html.mlb-open #orbChat { display: none !important; }

/* ---------- 3. Seamless discovery stack (reviewfix P1-7) ----------
   One continuous warm-charcoal gradient on the stack (single element => no seams), section wrappers are
   transparent (only soft gold light), and the per-section bottom washes are gone, so the ambient images
   fade into the same colour on both sides of every boundary. Brightness is kept close to the old grey. */
#discoveryStack.wte-fire-ready::before,
#discoveryStack.discovery-stack:not(.wte-fire-ready) {
  background:
    radial-gradient(ellipse 90% 30% at 50% -4%, rgba(255, 194, 74, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 18% at 80% 40%, rgba(255, 176, 70, 0.06), transparent 60%),
    radial-gradient(ellipse 70% 18% at 20% 70%, rgba(255, 176, 70, 0.05), transparent 60%),
    linear-gradient(180deg, #1d1a15 0%, #211d17 30%, #221e18 60%, #1d1a15 100%);
}
#discoveryStack .disc-section:not(#discFeatured):not(#discNewest)::after { content: none; }
#discoveryStack .disc-exclusive.premium-showcase,
#discoveryStack #discExclusive.premium-showcase {
  background: radial-gradient(ellipse 95% 40% at 50% 0%, rgba(255, 194, 74, 0.14), transparent 70%);
}
#discoveryStack #discPromoted,
#discoveryStack #discPromotedNear,
#discoveryStack .disc-dish-carousel {
  background: radial-gradient(ellipse 80% 36% at 50% 0%, rgba(255, 194, 74, 0.08), transparent 70%);
}

/* ---------- 4. Ambient section backgrounds (decorative stock, dimmed) ---------- */
#discoveryStack .disc-section > .wte-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: paint;
}
.wte-ambient .wte-ambient-img {
  position: absolute;
  inset: 0;
  background: transparent center / cover no-repeat;
  opacity: 0;
  /* reviewfix P1-7: long feathered edges => no hard line where the image ends */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.55) 10%, #000 24%, #000 76%, rgba(0, 0, 0, 0.55) 90%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.55) 10%, #000 24%, #000 76%, rgba(0, 0, 0, 0.55) 90%, transparent 100%);
}
html.wte-ambient-anim .wte-ambient .wte-ambient-img { transition: opacity 1.4s ease; }
.wte-ambient .wte-ambient-img.on { opacity: 0.58; }
.disc-section:not(.wte-ambient-in) > .wte-ambient .wte-ambient-img.on { opacity: 0.18; }
.wte-ambient .wte-ambient-dim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 12, 9, 0.56) 0%, rgba(14, 12, 9, 0.5) 22%, rgba(14, 12, 9, 0.32) 42%, rgba(14, 12, 9, 0.34) 70%, rgba(14, 12, 9, 0.46) 100%),
    radial-gradient(ellipse 75% 65% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.28) 100%);
}
html.wte-ambient-off .wte-ambient { display: none !important; }
/* never inside profiles / lightboxes */
.wte-profile-modal .wte-ambient,
.mlb .wte-ambient,
.wte-profile-lightbox .wte-ambient { display: none !important; }

/* ---------- UIFIX2: orb yields to the map, logo marks, placeholder labels ---------- */
html.wte-orb-maphide #foodAiFab:not(.is-open) { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility 0s linear .2s; }
/* card: monogram sits in the real-logo slot (bottom-left of the media), same size as a real logo */
.wte-logo-fallback.wte-logo-card { top: auto; left: 10px; bottom: 10px; width: 48px; height: 48px; z-index: 2; }
.premium-card .wte-logo-fallback:not(.wte-logo-card),
.feed-card .wte-logo-fallback { top: auto; bottom: 10px; left: 10px; width: 48px; height: 48px; }
/* PROMOTED strip: Instagram circle only — kill letter monograms (CO/AL/EM) */
.promo-card .wte-logo-fallback,
#promoTrack .wte-logo-fallback {
  display: none !important;
}
.promo-card .food-pic.wte-ig-profile-pic {
  object-fit: cover;
  background: #1d0d02;
}
.fav-item .wte-logo-fallback { width: 36px; height: 36px; top: 6px; left: 6px; }
/* map preview: logo companion / avatar */
.preview-logo-wrap { display: inline-flex; width: 52px; height: 52px; flex-shrink: 0; }
.preview-logo-wrap .preview-logo, .preview-avatar--logo .preview-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.preview-logo.wte-logo-fallback, .preview-avatar--logo .wte-logo-fallback { position: static; display: block; width: 100%; height: 100%; }
.preview-avatar--logo { background: #0b0b0b; }
/* Profile modal: one restaurant photo — no corner logo double on top of the hero */
.wte-profile-logo-corner,
.wte-profile-logo-hero,
.wte-profile-media .wte-logo-fallback,
.wte-profile-card > .wte-logo-fallback,
#wteProfileModal .wte-logo-fallback {
  display: none !important;
}
.wte-profile-card .wte-hero-ph-badge { position: absolute; top: 12px; left: 12px; z-index: 4; }
/* the profile has its own labelled placeholder section; the generic card label would sit on the whole modal */
.wte-profile-card > .wte-placeholder-label { display: none; }

/* ---------- CLOSED-8765: permanently closed venues ---------- */
.wte-closed-banner { margin: 0; padding: 12px 16px; background: #3a0d0d; color: #ffd7d0; border-bottom: 2px solid #c0392b; font: 600 14px/1.35 Inter, system-ui, sans-serif; letter-spacing: .01em; }
.wte-closed-banner strong { color: #fff; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.wte-profile-card.is-closed .wte-profile-media { filter: grayscale(.65) brightness(.85); }

/* ---------- reviewfix-20260930 ---------- */
/* P0-1: [hidden] always wins over the carousel track's display:flex !important */
.premium-showcase-track[hidden], .disc-track[hidden] { display: none !important; }
/* P2-1: section ledes / footer small print pass 4.5:1 on the lighter backgrounds */
#discoveryStack .premium-lede { color: #dfe6ea; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55); }
#discoveryStack .premium-kicker { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
#siteFooter .site-footer-bottom { color: #d4dde2; }
#siteFooter .site-footer-tag { color: #d7e1e6; }
/* P2-12: smoke rises behind the cards (content is z 3), so food images stay crisp */
#discoveryStack > .wte-smoke { z-index: 2; }
