/* ============================================================
   WhereTooEat — RESTAURANT PROFILE EXPERIENCE (PHASE2 2026-10-02)
   Loaded LAST. Scoped to the selected-restaurant experience only.
   Explore map baseline is untouched.
   ============================================================ */

/* ---------- transition in (250-450ms, respects reduced motion) ---------- */
.wte-profile-modal .wte-profile-backdrop {
  background: rgba(4, 12, 18, 0.62);
  animation: wtePfBackdrop 320ms ease-out both;
}
.wte-profile-modal .wte-profile-sheet {
  animation: wtePfCardIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.wte-profile-modal.wte-pg-closing .wte-profile-backdrop {
  animation: wtePfBackdropOut 240ms ease-in both;
}
.wte-profile-modal.wte-pg-closing .wte-profile-sheet {
  animation: wtePfCardOut 240ms ease-in both;
}
@keyframes wtePfBackdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes wtePfBackdropOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes wtePfCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes wtePfCardOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(10px) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .wte-profile-modal .wte-profile-backdrop,
  .wte-profile-modal .wte-profile-sheet { animation: none; }
}

/* ---------- desktop sheet: room for photography ---------- */
@media (min-width: 901px) {
  .wte-profile-modal .wte-profile-sheet {
    width: min(980px, calc(100vw - 96px)) !important;
    max-width: none !important;
    max-height: min(92dvh, 940px) !important;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .wte-profile-modal .wte-profile-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
}

/* ---------- cinematic hero (16:9-ish) with identity overlay ---------- */
.wte-profile-card .wte-profile-media {
  position: relative;
  aspect-ratio: 16 / 8.4;
  max-height: none !important;
  height: auto;
  overflow: hidden;
  background: linear-gradient(180deg, #0a1e2b, #06141c);
}
.wte-profile-card .wte-profile-media::after {
  /* readability gradient toward the bottom ONLY (PROFILE-OVERLAY 2026-10-06: was inset:0 over the whole hero) */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  height: 35%;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 20, 28, 0) 0%, rgba(6, 20, 28, 0.55) 50%, rgba(6, 20, 28, 0.94) 100%);
  z-index: 2;
}
.wte-profile-card .wte-profile-img,
.wte-profile-card .wte-profile-img.ph,
.wte-profile-card .wte-profile-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.wte-profile-card .wte-profile-img.ph {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #12384c, #071620);
  color: rgba(255, 231, 199, 0.5);
  font-size: 15px;
}
.wte-profile-card .wte-profile-heart,
.wte-profile-card .wte-profile-rating {
  z-index: 5;
}
.wte-profile-card .wte-profile-rating {
  /* PROFILE-OVERLAY 2026-10-06: app.css also sets bottom:12px;right:12px on this pill, so top+left without
     resetting them stretched the 78%-navy pill over the WHOLE hero (z-index 5, above photo, name and avatar).
     Reset left/bottom and sit it top-right beside the close button (close = right ~11px, 40px), clear of the heart
     and the avatar. Text colour: app.css #1a140c was meant for the old white pill and is unreadable on navy. */
  top: 19px;
  right: 60px;
  left: auto;
  bottom: auto;
  color: #ffe6ad;
  background: rgba(6, 20, 28, 0.78);
  border: 1px solid rgba(255, 194, 74, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
}
/* identity overlay: avatar + name + meta over the hero's lower third */
.wte-profile-card .wte-profile-hero-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 66px 26px 20px;
  color: var(--text);
}
.wte-profile-card .wte-profile-avatar,
.wte-profile-card .wte-profile-avatar.ph {
  position: absolute;
  left: 26px;
  top: -66px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(6, 20, 28, 0.55), 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 4;
}
/* PROFILE-OVERLAY 2026-10-06: uifix-8765.css ".wte-profile-modal .wte-profile-media img {width:100%;height:100%}"
   outranks the avatar rule above, so real <img> avatars (Instagram pictures) stretched over the name block. */
.wte-profile-modal .wte-profile-card img.wte-profile-avatar {
  width: 84px;
  height: 84px;
}
.wte-profile-card .wte-profile-avatar.ph {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #17435a, #0a1e2b);
  color: #ffe199;
  font-weight: 800;
  font-size: 26px;
}
.wte-profile-card .wte-profile-hero-meta h2 {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
  max-width: calc(100% - 120px);
}
.wte-profile-card .wte-profile-hero-meta .wte-profile-cuisine {
  margin: 0 0 6px;
  color: #dfe8ec;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.wte-profile-card .wte-profile-hero-meta .wte-profile-meta-line {
  margin: 0 0 4px;
  font-size: 0.86rem;
  color: #c9d6dd;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.wte-open-now { color: #6fe08a; font-weight: 700; }
.wte-closed-now { color: #ff9a8a; font-weight: 700; }
.wte-profile-card .wte-profile-hero-meta .premium-badges {
  margin-top: 8px;
}

/* ---------- body / sections ---------- */
.wte-profile-card .wte-profile-body {
  padding: 16px 26px 22px;
}
.wte-profile-card .wte-profile-section {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  background: none;
}
.wte-profile-card .wte-profile-section h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.wte-profile-card .wte-profile-desc {
  font-size: 0.98rem;
  line-height: 1.55;
  color: #dde6ea;
  max-width: 72ch;
}
.wte-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.wte-chip {
  border: 1px solid rgba(255, 194, 74, 0.28);
  background: rgba(14, 49, 68, 0.55);
  color: #ffe6ad;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
}

/* ---------- primary action bar ---------- */
.wte-profile-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}
.wte-profile-actions-primary .wte-pact {
  flex: 1;
  min-width: 108px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 194, 74, 0.4);
  background: rgba(10, 28, 40, 0.85);
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.wte-profile-actions-primary .wte-pact-gold {
  background: linear-gradient(135deg, rgba(255, 194, 74, 0.95), rgba(232, 170, 40, 0.9));
  color: #1a1200;
  border-color: #ffd978;
}

/* ---------- sticky section navigation ---------- */
.wte-profile-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  gap: 4px;
  margin: 14px -26px 0;
  padding: 8px 26px;
  background: linear-gradient(180deg, rgba(8, 22, 32, 0.97), rgba(8, 22, 32, 0.92));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 194, 74, 0.12);
  overflow-x: auto;
  scrollbar-width: none;
}
.wte-profile-nav::-webkit-scrollbar { display: none; }
.wte-pnav {
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: #a9bbc5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 7px 12px 8px;
  position: relative;
}
.wte-pnav::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  opacity: 0;
}
.wte-pnav.on { color: var(--gold-soft); }
.wte-pnav.on::after { opacity: 1; }
.wte-pnav:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

/* ---------- details: location snapshot + rows ---------- */
.wte-profile-loc {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  background: rgba(7, 22, 32, 0.55);
}
.wte-profile-loc-map {
  position: relative;
  height: 170px;
  background:
    radial-gradient(circle at 62% 38%, rgba(32, 207, 255, 0.16), transparent 42%),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, #0d2a3a, #081c28);
  background-size: auto, 26px 26px, 26px 26px, auto;
}
.wte-loc-pin {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -100%);
  color: var(--gold);
  font-size: 26px;
  text-shadow: 0 0 10px rgba(255, 194, 74, 0.8), 0 4px 10px rgba(0, 0, 0, 0.6);
}
.wte-profile-loc p {
  margin: 0;
  padding: 10px 12px 4px;
  font-size: 0.86rem;
  color: #c9d6dd;
}
.wte-profile-loc .action {
  margin: 4px 12px 12px;
}
.wte-profile-details .wte-detail-row {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}
.wte-profile-details .wte-detail-row:last-child { border-bottom: 0; }
.wte-profile-details p { margin: 0; }
.wte-profile-details strong { color: #e8e2d4; margin-right: 4px; font-weight: 600; }
.wte-profile-details a { color: var(--gold-soft); }
.wte-profile-social { display: flex; gap: 6px; margin-top: 8px; }
.wte-menu-full a { color: var(--gold-soft); font-size: 0.88rem; font-weight: 700; }

/* reviews section spacing */
.wte-cr-section { margin-top: 20px; }

/* ---------- mobile: full-screen experience ---------- */
@media (max-width: 900px) {
  .wte-profile-modal {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .wte-profile-modal .wte-profile-sheet {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: 100dvh;
    border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .wte-profile-card .wte-profile-media {
    aspect-ratio: 16 / 11;
  }
  .wte-profile-card .wte-profile-media::after {
    height: 62%; /* PROFILE-OVERLAY: the name block spans ~60% of the shorter mobile hero */
  }
  .wte-profile-modal .wte-profile-card img.wte-profile-avatar {
    width: 68px;
    height: 68px;
  }
  .wte-profile-card .wte-profile-hero-meta {
    padding: 58px 16px 14px;
  }
  .wte-profile-card .wte-profile-avatar,
  .wte-profile-card .wte-profile-avatar.ph {
    left: 16px;
    width: 68px;
    height: 68px;
  }
  .wte-profile-card .wte-profile-hero-meta h2 {
    font-size: 1.35rem;
    max-width: calc(100% - 92px);
  }
  .wte-profile-card .wte-profile-body {
    padding: 12px 16px 18px;
  }
  .wte-profile-nav {
    margin-left: -16px;
    margin-right: -16px;
    padding: 8px 16px;
  }
}
