/* Styles for find-table.html (მარიამი & ირაკლი seating lookup). The class
   names are fixed by the vendored find-table.js; only the look lives here. */

@font-face {
  font-family: 'DM Medea';
  src: url('DM-Medea.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'BPG Irubaqidze';
  src: url('bpg_irubaqidze.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

/* Viewport height and loading screen — same reasoning as style.css on the main
   page: the in-app browser nav bar resizes the whole frame, so the height is
   pinned to --vh instead of tracking `vh`. This page has no entry artwork, so
   its loading screen waits on the webfonts alone — which are normally already
   cached from the main page, making it a no-op in practice. It exists so that
   font-display: block never shows as blank text. */
.vh-lock body {
  min-height: calc(var(--vh) * 100);
}

html {
  overscroll-behavior-y: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--paper, #f8f5ff);
  transition: opacity 0.6s ease;
}

.loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader__spinner {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(107, 84, 144, 0.25);
  border-top-color: var(--purple, #6b5490);
  border-radius: 50%;
  animation: loader-spin 0.9s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

:root {
  /* 1% of the viewport height in pixels, frozen by the head script. */
  --vh: 1vh;

  --purple-deep: #3a2660;
  --purple:      #6b5490;
  --purple-soft: #9880bc;
  --lavender:    #c5b8e2;
  --lavender-lt: #e8e0f5;
  --white:       #ffffff;
  --paper:       #f8f5ff;
  --text:        #3a2660;
  --text-soft:   #6b5490;
  --border:      #d4c8ee;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 184, 226, 0.5) transparent;
}
html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: rgba(197, 184, 226, 0.5); border-radius: 3px; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  font-family: 'BPG Irubaqidze', Georgia, serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ────────────────────────────────────────────────── */
.ft-header {
  padding: 36px 24px 0;
  text-align: center;
}

.ft-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--purple-soft);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.ft-back:hover { color: var(--purple); }
.ft-back svg { width: 14px; height: 14px; }

.ft-eyebrow {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--purple-soft);
  margin-bottom: 10px;
}

.ft-title {
  font-family: 'DM Medea', 'BPG Irubaqidze', serif;
  font-weight: 400;
  font-size: 28px;
  color: var(--purple-deep);
  margin-bottom: 2rem;
  line-height: 1.25;
}

.ft-sub {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Search ────────────────────────────────────────────────── */
.ft-search-wrap {
  padding: 32px 24px 0;
  max-width: 480px;
  margin: 0 auto;
}

.ft-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.ft-search-box > svg {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--lavender);
  pointer-events: none;
  flex-shrink: 0;
}

.ft-search-input {
  width: 100%;
  padding: 14px 14px 14px 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 16px rgba(58, 38, 96, 0.06);
}

.ft-search-input::placeholder { color: var(--lavender); }

.ft-search-input:focus {
  border-color: var(--purple-soft);
  box-shadow: 0 2px 20px rgba(152, 128, 188, 0.18);
}

.ft-clear {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--lavender);
  font-size: 14px;
  line-height: 1;
  padding: 4px;
  display: none;
  transition: color 0.2s ease;
}

.ft-clear:hover { color: var(--purple); }
.ft-clear.visible { display: block; }

/* ── Divider ───────────────────────────────────────────────── */
.ft-divider {
  width: 48px;
  height: 1px;
  background-color: var(--lavender);
  margin: 28px auto;
  opacity: 0.6;
}

/* ── Results ───────────────────────────────────────────────── */
.ft-results {
  display: none;
  padding: 0 24px 8px;
  max-width: 480px;
  margin: 0 auto;
}

.ft-results.visible { display: block; }

.ft-results-label {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--purple-soft);
  margin-bottom: 14px;
}

.ft-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(58, 38, 96, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ft-result-item:hover {
  border-color: var(--lavender);
  box-shadow: 0 4px 18px rgba(107, 84, 144, 0.1);
}

.ft-result-name {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.ft-result-name mark {
  background: rgba(197, 184, 226, 0.35);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.ft-result-table {
  flex-shrink: 0;
  margin-left: 12px;
  background-color: var(--purple-deep);
  color: var(--white);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ft-no-results {
  text-align: center;
  padding: 32px 0;
  color: var(--text-soft);
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.9;
}

/* ── Live status (loading / error / not-published) ──────────
   Written by the vendored find-table.js embed — see FIND-TABLE.md in the
   weddsites panel repo for the full contract. */
.ft-state {
  text-align: center;
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--text-soft);
  padding: 24px;
}

.ft-state--error { color: #b3564a; }

/* ── All tables grid ───────────────────────────────────────── */
.ft-tables-section {
  flex: 1;
  padding: 0 24px 72px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.ft-tables-label {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--purple-soft);
  text-align: center;
  margin-bottom: 20px;
}

.ft-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 12px;
  column-gap: 36px;
}

.ft-table-card {
  background: var(--white);
  border-radius: 12px;
  padding: 16px 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(58, 38, 96, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ft-table-card:hover {
  border-color: var(--lavender);
  box-shadow: 0 4px 18px rgba(107, 84, 144, 0.08);
}

.ft-table-note {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  color: var(--purple-soft);
  margin-bottom: 8px;
}

.ft-table-num {
  font-family: 'DM Medea', 'BPG Irubaqidze', serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--purple-deep);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
}

.ft-table-guests { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.ft-table-guests li {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.4;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(197, 184, 226, 0.3);
}

.ft-table-guests li:last-child { border-bottom: none; }

/* "თანმხლები · <host>" under a companion, written by find-table.js */
.ft-result-host,
.ft-table-host {
  font-family: 'BPG Irubaqidze', serif;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-soft);
}

/* ── Footer ────────────────────────────────────────────────── */
.ft-footer {
  padding: 20px 24px;
  text-align: center;
  background-color: var(--purple-deep);
}

.ft-footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.ft-footer-credit:hover { opacity: 1; }
.ft-footer-logo { width: 22px; height: 22px; object-fit: contain; }
