/* ==========================================================================
   Guest list page — soft-gated view of invitees.json
   Relies on the tokens defined in style.css (:root palette).
   ========================================================================== */

/* Override the intro-oriented body layout: this page is scrollable. */
body {
  min-height: 100dvh;
  display: block;
  padding: clamp(2rem, 8vh, 5rem) 1rem 4rem;
  user-select: text;
}

/* ---------- Denied message (after 3 failed prompt() attempts) ---------- */

.gate {
  max-width: 380px;
  margin: 8vh auto 0;
  text-align: center;
  animation: fadeUp .7s ease;
}
.gate .orn {
  font-size: 1.4rem;
  color: var(--gold-lt);
  letter-spacing: .5em;
  margin-bottom: .8rem;
}
.gate h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 .4rem;
}
.gate p {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Guest list ---------- */

.list-wrap {
  max-width: 720px;
  margin: 0 auto;
  animation: fadeUp .7s ease;
}
.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--skip-border);
}
.list-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 4.5vw, 1.8rem);
  color: var(--gold);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0;
}
.list-header .count {
  font-size: .9rem;
  color: var(--text-soft);
  font-style: italic;
  letter-spacing: .08em;
  white-space: nowrap;
}
.list-toolbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.list-search {
  flex: 1 1 220px;
  padding: .55rem .85rem;
  border: 1px solid var(--skip-border);
  border-radius: 999px;
  background: rgba(var(--rgb-white), .6);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s ease;
}
.list-search:focus { border-color: var(--gold-lt); }
.list-logout {
  padding: .5rem 1rem;
  background: transparent;
  border: 1px solid var(--skip-border);
  color: var(--text-soft);
  font-family: 'Cormorant Garamond', serif;
  font-size: .85rem;
  font-style: italic;
  letter-spacing: .12em;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.list-logout:hover,
.list-logout:focus-visible {
  background: var(--skip-hover-bg);
  color: var(--gold);
  outline: none;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; flex-direction: column;
  gap: .55rem;
}
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: rgba(var(--rgb-white), .35);
  border: 1px solid rgba(var(--rgb-gold-lt), .18);
  border-radius: 8px;
  transition: background .2s ease, border-color .2s ease;
}
.list li:hover {
  background: rgba(var(--rgb-white), .6);
  border-color: var(--gold-lt);
}
.list .name {
  font-family: 'Great Vibes', cursive;
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1.1;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}
.list .id {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: .72rem;
  font-style: italic;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: .1rem;
}
.list .actions {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
}
.list .actions a,
.list .actions button {
  padding: .4rem .75rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: .82rem;
  font-style: italic;
  letter-spacing: .12em;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--skip-border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.list .actions a:hover,
.list .actions button:hover,
.list .actions a:focus-visible,
.list .actions button:focus-visible {
  background: var(--skip-hover-bg);
  color: var(--gold);
  border-color: var(--gold-lt);
  outline: none;
}
.list .actions .copied {
  color: var(--gold);
  border-color: var(--gold-lt);
  background: var(--skip-hover-bg);
}

.empty {
  text-align: center;
  padding: 2rem 1rem;
  font-style: italic;
  color: var(--text-soft);
}

/* Narrow-screen tweaks */
@media (max-width: 480px) {
  .list li {
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
  }
  .list .actions { justify-content: flex-end; }
  .list .name { font-size: 1.3rem; }
}
