/* Styles for find-table.html only. find-table.js writes the .ft-result-*,
   .ft-table-*, .ft-state--* classes and never sets a colour, so every look here
   is this site's. Same ivory + powder-blue palette as style.css. */

@font-face {
  font-family: 'BPG Nino';
  src: url('bpg_nino.otf') format('opentype');
  font-display: block;      /* safe only because .loader covers the block period */
}

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

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

[hidden] {
  display: none !important;
}

:root {
  --vh: 1vh;
  --bg:        #f5f4f0;
  --paper:     #fbfaf7;
  --text:      #2b3746;
  --text-soft: #6d7b8a;
  --blue:      #6f8ca8;
  --blue-deep: #44607c;
  --blue-pale: #dde6ee;
  --border:    #d5dce2;
  --rule:      #c3cfd9;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--rule) var(--bg);
}

html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background-color: var(--rule); border-radius: 3px; }

html, body {
  overscroll-behavior-y: none;
}

body {
  font-family: 'BPG Nino', 'Noto Serif Georgian', serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.vh-lock body {
  min-height: calc(var(--vh) * 100);
}

input, button {
  font-family: inherit;
}

/* ===== LOADER ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--paper);
  transition: opacity 0.6s ease;
}

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

.loader__ring {
  width: 42px;
  height: 42px;
  border: 2px solid var(--blue-pale);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ===== PAGE ===== */
.ft-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 32px;
  transition: opacity 0.5s ease;
}

html.is-loading .ft-page {
  opacity: 0;
}

.ft-header {
  text-align: center;
  padding-bottom: 28px;
}

.ft-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-bottom: 26px;
  font-size: 13px;
  color: var(--blue-deep);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--paper);
}

.ft-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ft-back__chev {
  width: 7px;
  height: 7px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.ft-seal {
  width: 76px;
  height: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 10px rgba(68, 96, 124, 0.22));
}

.ft-eyebrow {
  font-family: 'Noto Serif Georgian', serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 12px;
}

.ft-title {
  font-family: 'DM Medea', 'BPG Nino', serif;
  font-weight: normal;
  font-size: 28px;
  color: var(--blue-deep);
  margin-bottom: 16px;
}

.ft-rule {
  display: block;
  width: 36px;
  height: 1px;
  background-color: var(--rule);
  margin-bottom: 16px;
}

.ft-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

/* ===== SEARCH ===== */
.ft-search-wrap {
  margin-bottom: 26px;
}

.ft-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.25s ease;
}

.ft-search-box:focus-within {
  border-color: var(--blue);
}

/* magnifier drawn from a ring + handle */
.ft-search-icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: 16px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
}

.ft-search-icon::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 1.5px;
  background-color: var(--blue);
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
}

.ft-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background-color: transparent;
  padding: 15px 12px;
  font-size: 16px;          /* 16px stops iOS zooming on focus */
  color: var(--text);
  outline: none;
}

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

.ft-search-input:disabled {
  opacity: 0.6;
}

.ft-clear {
  flex: none;
  width: 40px;
  height: 40px;
  margin-right: 4px;
  border: none;
  background-color: transparent;
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
  visibility: hidden;
}

.ft-clear.visible {
  visibility: visible;
}

.ft-state {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--text-soft);
}

.ft-state--error {
  color: #9a4a4a;
}

/* ===== RESULTS ===== */
.ft-results {
  display: none;
  margin-bottom: 28px;
}

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

.ft-results-label,
.ft-tables-label {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 12px;
  text-align: center;
}

.ft-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background-color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.ft-result-name {
  font-size: 16px;
  color: var(--text);
  line-height: 1.4;
}

.ft-result-name mark {
  background-color: var(--blue-pale);
  color: var(--blue-deep);
  border-radius: 3px;
}

.ft-result-host,
.ft-table-host {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.ft-result-table {
  flex: none;
  font-size: 14px;
  color: #fbfaf7;
  background-color: var(--blue-deep);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
}

.ft-no-results {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
  text-align: center;
  padding: 16px 0;
}

/* ===== ALL TABLES ===== */
.ft-tables-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ft-table-card {
  background-color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
}

.ft-table-num {
  font-family: 'DM Medea', 'BPG Nino', serif;
  font-size: 18px;
  color: var(--blue-deep);
  margin-bottom: 4px;
}

.ft-table-note {
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 6px;
}

.ft-table-guests {
  list-style: none;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}

.ft-table-guests li {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  padding: 4px 0;
}

/* ===== FOOTER ===== */
.ft-footer {
  text-align: center;
  padding-top: 40px;
}

.ft-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

.ft-credit:hover {
  opacity: 1;
}

.ft-credit__logo {
  width: 22px;
  height: auto;
}

.ft-credit span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
}

@media (min-width: 481px) {
  .ft-tables-grid { grid-template-columns: 1fr 1fr; }
  .ft-title       { font-size: 32px; }
}

/* nothing published yet: don't show an "all tables" heading over an empty grid */
.ft-tables-section:has(.ft-tables-grid:empty) {
  display: none;
}

/* script ampersand, matching the invitation's name lines */
.amp {
  font-family: 'Pinyon Script', cursive;
  font-size: 1.3em;
  line-height: 1;
  letter-spacing: 0;
}
