/* Tam-O-Shanter Guest Form – styles matching the Guest Entry Management System design.
   Palette: deep green #1E4634, gold #D8B87A, cream #F6F3EC, ink #1C221E, muted #5B655E. */

:root {
  --green: #1E4634;
  --green-dark: #143225;
  --gold: #D8B87A;
  --gold-focus: #B99562;
  --cream: #F6F3EC;
  --cream-card: #FBF9F4;
  --ink: #1C221E;
  --muted: #5B655E;
  --line: #DDD8CC;
  --line-soft: #EAE5D9;
  --input-border: #C9C3B5;
  --danger: #8A3B2B;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Lora', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }
input, select, button, textarea { font-family: inherit; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold-focus);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

@keyframes tsRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ts-rise { animation: tsRise .35s ease-out; }

/* ---------- Shell ---------- */
.ts-app { min-height: 100vh; display: flex; flex-direction: column; }

.ts-header {
  background: var(--green);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ts-header__logo { width: 40px; height: 46px; object-fit: contain; }
.ts-header__title { display: flex; flex-direction: column; line-height: 1.15; }
.ts-header__club { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.ts-header__tag { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.ts-header__member { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 17px; }
.ts-header__member small { opacity: .75; font-size: 15px; }

.ts-main { flex: 1; padding: 28px 20px 80px; }
.ts-main--center { display: flex; align-items: flex-start; justify-content: center; padding-top: 40px; }

.ts-stack { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.ts-stack--sm { display: flex; flex-direction: column; gap: 8px; }
.ts-stack--md { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Type ---------- */
.ts-h1 { font-family: var(--font-head); font-weight: 600; font-size: 32px; margin: 0; line-height: 1.15; }
.ts-h1--page { font-size: 34px; }
.ts-h2 { font-family: var(--font-head); font-weight: 600; font-size: 26px; margin: 0; }
.ts-lead { margin: 6px 0 0; color: var(--muted); font-size: 19px; line-height: 1.5; }
.ts-hint { margin: 6px 0 0; color: var(--muted); font-size: 18px; line-height: 1.5; }
.ts-hint--center { text-align: center; font-size: 17px; margin: 0; }
.ts-label { font-weight: 600; font-size: 18px; }

/* ---------- Cards ---------- */
.ts-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ts-card--gap { gap: 18px; }
.ts-card--narrow { width: 100%; max-width: 460px; padding: 32px 28px; gap: 18px; }
.ts-card--left { text-align: left; gap: 8px; padding: 20px 24px; }

/* ---------- Fields ---------- */
.ts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ts-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 18px; }
.ts-field input, .ts-field select {
  width: 100%;
  min-height: 60px;
  padding: 0 18px;
  font-size: 22px;
  font-weight: 400;
  border: 2px solid var(--input-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.ts-field--inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.ts-field--inline input { width: auto; min-height: 56px; padding: 0 14px; font-size: 20px; }


/* Honeypot: visually removed, still in the DOM for bots. */
.ts-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Choice chips (radio buttons styled as buttons) ---------- */
.ts-choices { display: grid; gap: 12px; }
.ts-choices--purpose { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ts-choices--days { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ts-choice { position: relative; display: block; }
.ts-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ts-choice__box {
  min-height: 64px;
  border-radius: 12px;
  border: 2px solid var(--input-border);
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  text-align: center;
  padding: 6px 8px;
}
.ts-choice__box--day small { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.ts-choice__box--day b { font-size: 21px; font-weight: 700; }
.ts-choice input:checked + .ts-choice__box { background: var(--green); color: #fff; border-color: var(--green); }
.ts-choice input:focus-visible + .ts-choice__box { outline: 3px solid var(--gold-focus); outline-offset: 2px; }
.ts-choice:hover .ts-choice__box { border-color: var(--green); }

/* ---------- Guest rows ---------- */
.ts-guest {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border: 2px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px 16px;
  background: var(--cream-card);
}
.ts-guest__field { flex: 1; }
.ts-guest__label { font-weight: 700; font-size: 16px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.ts-btn--remove { min-height: 60px; padding: 0 16px; background: #fff; color: var(--danger); border: 2px solid var(--input-border); font-size: 18px; }
.ts-btn--remove:hover { border-color: var(--danger); }

/* ---------- Buttons ---------- */
.ts-btn {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 12px;
  border: 0;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1.1;
}
.ts-btn--primary { background: var(--green); color: #fff; min-height: 60px; padding: 0 24px; font-size: 21px; }
.ts-btn--primary:hover { background: var(--green-dark); color: #fff; }
.ts-btn--xl { min-height: 64px; padding: 0 28px; font-size: 22px; }
.ts-btn--grow { flex: 1; }
.ts-btn--outline { background: #fff; color: var(--green); border: 2px solid var(--green); min-height: 60px; padding: 0 24px; font-size: 21px; }
.ts-btn--dashed { min-height: 60px; background: #fff; color: var(--green); border: 2px dashed var(--green); font-size: 21px; width: 100%; }
.ts-btn__plus { font-size: 26px; line-height: 1; }
.ts-btn--ghost-light { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-size: 16px; }
.ts-btn--danger-text { min-height: 44px; padding: 0 14px; border-radius: 8px; background: transparent; color: var(--danger); font-size: 17px; }
.ts-btn[disabled] { opacity: .6; cursor: wait; }

.ts-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ts-actions--center { justify-content: center; }

/* ---------- Errors ---------- */
.ts-error {
  background: #FBEDE7;
  border: 2px solid #D98B6F;
  color: #7A2E1B;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 19px;
  font-weight: 600;
}
.ts-error ul { margin: 0; padding-left: 22px; }
.ts-error li + li { margin-top: 4px; }

/* ---------- Done page ---------- */
.ts-done { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; text-align: center; padding-top: 12px; }
.ts-done__check {
  width: 84px; height: 84px; border-radius: 50%;
  background: #E3F1E7; color: #2E7D4F;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; margin: 0 auto;
}
.ts-done__check--warn { background: #FBEDE7; color: #7A2E1B; }
.ts-done__sub { margin: 0; font-size: 21px; color: var(--muted); }
.ts-done__date { font-family: var(--font-head); font-weight: 600; font-size: 23px; }
.ts-done__meta { color: var(--muted); font-size: 19px; }
.ts-done__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 20px; }

.ts-pill { padding: 4px 12px; border-radius: 999px; font-size: 16px; font-weight: 700; }
.ts-pill--ok { background: #EEF2E6; color: #4B6B2B; }
.ts-pill--bad { background: #FBEDE7; color: #7A2E1B; }

/* ---------- "About" footer + modal ---------- */
.ts-foot { padding: 0 20px 28px; display: flex; justify-content: center; align-items: center; gap: 4px; }
.ts-about__trigger, .ts-foot__link {
  border: 0; background: transparent; cursor: pointer; font-family: inherit; text-decoration: none;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .55;
  padding: 8px 12px; border-radius: 8px; transition: opacity .15s;
}
.ts-about__trigger:hover, .ts-foot__link:hover { opacity: 1; color: var(--muted); }
.ts-about__trigger + .ts-foot__link::before { content: '·'; margin-right: 12px; opacity: .7; }

.ts-about { border: 0; padding: 20px; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.ts-about::backdrop { background: rgba(28,34,30,.55); }
.ts-about[open] { display: flex; align-items: center; justify-content: center; }
.ts-about__card {
  position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 30px 28px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 10px; animation: tsRise .25s ease-out;
}
.ts-about__close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cream); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ts-about__close:hover { background: var(--line-soft); color: var(--ink); }
.ts-about__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ts-about__kicker { display: flex; align-items: center; gap: 10px; padding-right: 44px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-focus); }
.ts-about__title { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(16px, 4.6vw, 22px); line-height: 1.15; padding-right: 32px; }
.ts-about__version { padding: 2px 9px; border-radius: 999px; background: var(--cream); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: none; }
.ts-about__text { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.ts-about__rows { margin-top: 8px; border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ts-about__row { display: flex; gap: 12px; font-size: 16px; }
.ts-about__label { min-width: 92px; color: var(--muted); font-weight: 600; }
.ts-about__value { font-weight: 600; }
.ts-about__contact { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.ts-about__pill {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--cream-card); color: var(--green);
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.ts-about__pill:hover { border-color: var(--green); background: #fff; }
.ts-about__pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 480px) {
  body { font-size: 18px; }
  .ts-about__pill { width: 100%; justify-content: center; }
  .ts-guest { flex-wrap: wrap; }
  .ts-guest__field { flex-basis: 100%; }
  .ts-btn--remove { width: 100%; min-height: 48px; }
  .ts-h1--page { font-size: 30px; }
  .ts-card { padding: 20px 16px; }
  .ts-header__member { margin-left: 0; width: 100%; justify-content: space-between; }
}
