/* ============================================
   GiftMatch — shared styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #23262b;
  --ink-soft: #565b64;
  --paper: #faf7f0;
  --paper-raised: #ffffff;
  --gold: #c99a3f;
  --gold-deep: #a67c2e;
  --sage: #5d7c5e;
  --sage-bg: #e9f0e6;
  --rust: #b3452c;
  --rust-bg: #fbeae5;
  --line: #e4ddce;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(35, 38, 43, 0.06);
  --shadow-lift: 0 8px 24px rgba(35, 38, 43, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page--wide {
  max-width: 880px;
}

/* ---- Ribbon signature mark ---- */
.ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.ribbon::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

.subtitle {
  color: var(--ink-soft);
  margin: 0 0 32px;
  font-size: 0.98rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  margin-top: 18px;
}
label:first-of-type { margin-top: 0; }

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}
textarea { resize: vertical; min-height: 90px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  margin-top: 26px;
  border: none;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn:hover { background: #34383f; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--gold { background: var(--gold-deep); }
.btn--gold:hover { background: var(--gold); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { background: var(--paper-raised); }

.btn--small {
  width: auto;
  margin-top: 0;
  padding: 8px 16px;
  font-size: 0.88rem;
}

.link {
  color: var(--gold-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.link:hover { text-decoration: underline; }

.center-link {
  display: block;
  text-align: center;
  margin-top: 18px;
}

/* ---- Alerts / feedback ---- */
.alert {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-top: 18px;
}
.alert--error {
  background: var(--rust-bg);
  color: var(--rust);
}
.alert--success {
  background: var(--sage-bg);
  color: var(--sage);
}
.alert.show { display: block; }

/* ---- Card ---- */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ---- Participant list (tag / gift-label style) ---- */
.participant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--paper-raised);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  position: relative;
  transition: border-color 0.15s ease;
}
.participant-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 12px;
  flex-shrink: 0;
}
.participant-name {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}

.participant-item--taken {
  opacity: 0.5;
}
.participant-item--taken .participant-name {
  text-decoration: line-through;
  text-decoration-color: var(--ink-soft);
}
.participant-item--taken::before {
  background: var(--ink-soft);
}

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sage-bg);
  color: var(--sage);
}
.tag--taken {
  background: var(--line);
  color: var(--ink-soft);
}

/* ---- Nav / top bar (admin) ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 24px 0;
}
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}

/* ---- Event list / table-ish cards ---- */
.event-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.event-card__meta { color: var(--ink-soft); font-size: 0.88rem; margin-top: 4px; }

.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pill--upcoming { background: #eef1fb; color: #4a5aa8; }
.status-pill--active { background: var(--sage-bg); color: var(--sage); }
.status-pill--completed { background: var(--line); color: var(--ink-soft); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.grid-2 label { margin-top: 0; }
@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.summary-row {
  display: flex;
  gap: 24px;
  margin: 20px 0 28px;
}
.summary-stat { flex: 1; }
.summary-stat .num {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
}
.summary-stat .label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-soft);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
