/* Seventy-Seven Live — find-my-table portal. Brand palette from 7ty7.com.au (Q-008) */

/* Self-hosted display fonts (offline venue use; no third-party requests) */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/fonts/playfair-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/fonts/playfair-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/great-vibes-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/great-vibes-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #1c79bd;
  --blue-dark: #125a94;
  --blue-deep: #0d4a7c;
  --gold: #f5b40e;
  --ink: #0f2740;
  --muted: #5b7186;
  --card: #ffffff;
  --line: #e3ecf4;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(212, 160, 23, .12), transparent 60%),
    linear-gradient(160deg, #f7f5ef 0%, #efece3 100%);
}

/* ---- card ---- */
.card {
  background: var(--card);
  border-radius: 24px;
  width: min(94vw, 480px);
  /* NO overflow:hidden — the search dropdown must overlay the card boundary */
  box-shadow: 0 30px 80px rgba(4, 20, 40, .5);
  animation: rise .45s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.body { padding: 2.1rem 1.9rem 2.2rem; border-radius: 24px; background: var(--card); }

/* ---- views & transitions ---- */
.view { animation: fade .3s ease both; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0 0 .7rem;
}
.sub { color: var(--muted); font-size: .92rem; margin: 0 0 .3rem; }
.sub.venue { margin-bottom: .9rem; }

/* ---- organiser / event block ---- */
.org-block { text-align: center; margin-bottom: 1.6rem; }
.org-logo { width: min(92%, 380px); height: auto; }
.event-link { margin: 0 0 1.6rem; }
.event-link a {
  color: #161616;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
}
.event-link a:hover { color: #000; }

/* ---- search ---- */
.search-wrap { position: relative; margin-top: .6rem; }
.search-icon {
  position: absolute;
  left: .95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8aa2b8;
  pointer-events: none;
}
#q {
  width: 100%;
  padding: .95rem 1rem .95rem 2.9rem;
  font-size: 1.1rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #f8fbfe;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
#q:focus {
  outline: none;
  border-color: #161616;
  box-shadow: 0 0 0 4px rgba(22, 22, 22, .1);
  background: #fff;
}
/* Dropdown overlays the page (absolute) — the card NEVER resizes (mobile UX). */
.matches {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  overflow-y: auto;
  max-height: min(46vh, 340px);
  background: #fff;
  box-shadow: 0 18px 40px rgba(4, 20, 40, .28);
}
.matches li + li { border-top: 1px solid var(--line); }
.match {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  background: #fff;
  border: none;
  font-size: 1.02rem;
  font-weight: 550;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.match:hover, .match:focus-visible { background: #faf6ea; }
.match .initials {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #161616;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.field-err { color: #b3261e; font-size: .85rem; margin-top: .7rem; }

/* ---- result ---- */
/* One consistent label tier (sans, uppercase, tracked) — used for WELCOME,
   SHARING YOUR TABLE, and any future small labels. */
.label, .welcome, .mates-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .18em;
}
.welcome { margin-bottom: .2rem; }
.guest-name {
  font-family: "Great Vibes", "Playfair Display", cursive;
  font-weight: 400;
  font-size: 2.9rem;
  line-height: 1.15;
  color: #161616;
  margin: 0 0 1.2rem;
}
.table-badge {
  text-align: center;
  background: linear-gradient(150deg, #161616 0%, #2b2b2b 100%);
  border-radius: 18px;
  padding: 1.5rem 1rem 1.7rem;
  margin: .4rem 0 1.4rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}
.table-label { display: block; color: var(--gold); font-weight: 800; letter-spacing: .38em; font-size: .8rem; }
.table-num {
  display: block;
  font-family: "Playfair Display", Georgia, serif;   /* serif tier, same as headings */
  color: #fff;
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .02em;
}

/* ---- table mates ---- */
.mates-title { margin-bottom: .55rem; }
.mates { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.3rem; }
.mates li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: #eef4fa;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .8rem .4rem .45rem;
  font-size: .88rem;
  font-weight: 550;
  color: var(--ink);
}
.mates li.you { background: #fdf3d7; border-color: var(--gold); }
.mates .initials {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.mates li.you .initials { background: var(--gold); color: var(--ink); }

/* ---- managed-by credit ---- */
.managed-by {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: center;
  color: #6b6659;
  font-size: .75rem;
  letter-spacing: .04em;
}
.managed-by img { height: 26px; width: auto; border-radius: 6px; }

/* ---- buttons ---- */
button { font-family: inherit; }
.cta, .ghost {
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s, opacity .15s;
}
.cta {
  color: var(--ink);
  background: var(--gold);
  border: none;
  box-shadow: 0 8px 20px rgba(245, 180, 14, .35);
}
.cta:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(245, 180, 14, .45); }
.cta:disabled { opacity: .55; cursor: default; box-shadow: none; }
.ghost {
  margin-top: .6rem;
  background: transparent;
  color: #161616;
  border: 2px solid #161616;
}
.ghost:hover { background: #f3efe4; }
#pass-btn { border-style: dashed; }
.hint { color: var(--muted); font-size: .9rem; text-align: center; margin-top: .7rem; }

@media (prefers-reduced-motion: reduce) {
  .card, .view { animation: none; }
}
