/* ── Layout ─────────────────────────────────────────── */
:root {
  --biscotti: #c8892a;
  --biscotti-light: #f5e6cc;
  --star-fill: #e8a020;
  --star-empty: #d1d5db;
}

body > header {
  border-bottom: 1px solid var(--pico-muted-border-color);
  padding-block: 0.75rem;
}

body > footer {
  margin-top: 3rem;
  border-top: 1px solid var(--pico-muted-border-color);
  padding-block: 1rem;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  text-align: center;
}

/* ── Flash messages ─────────────────────────────────── */
.flash-list {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 320px;
}
.flash-list div {
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 1;
  transition: opacity 0.4s ease;
}
.flash-list div.success { background: #d1fae5; color: #065f46; }
.flash-list div.error   { background: #fee2e2; color: #991b1b; }
.flash-list div.info    { background: #dbeafe; color: #1e40af; }

/* ── Notification bell ──────────────────────────────── */
.bell-link { text-decoration: none; position: relative; }
.bell-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  padding: 0 0.2rem;
  vertical-align: super;
  line-height: 1;
}

/* ── Star display ───────────────────────────────────── */
.stars { letter-spacing: -0.05em; white-space: nowrap; }
.stars .s-fill  { color: var(--star-fill); }
.stars .s-empty { color: var(--star-empty); }
.stars-avg { font-size: 0.85rem; color: var(--pico-muted-color); margin-left: 0.25rem; }

/* ── Star picker ─────────────────────────────────────── */
.star-picker {
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
}
.star-picker input[type="radio"] { display: none; }
.star-picker label {
  font-size: 2rem;
  color: var(--star-empty);
  cursor: pointer;
  line-height: 1;
  transition: color 0.1s;
  user-select: none;
}
.star-picker label.active {
  color: var(--star-fill);
}

/* ── Flavor grid ────────────────────────────────────── */
.flavor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.flavor-card {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.flavor-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--biscotti-light);
}
.flavor-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: var(--biscotti-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.flavor-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.flavor-card-body h3 { margin: 0; font-size: 1.1rem; }
.flavor-card-body p  { margin: 0; font-size: 0.9rem; color: var(--pico-muted-color); flex: 1; }
.flavor-card-footer  { padding: 0.75rem 1rem; border-top: 1px solid var(--pico-muted-border-color); }

/* ── Admin controls ─────────────────────────────────── */
#invites button, #flavors button, #tasters button,
#invites a[role=button], #flavors a[role=button], #tasters a[role=button] {
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

/* ── Admin tables ───────────────────────────────────── */
.code-chip {
  display: inline-block;
  font-family: monospace;
  background: var(--pico-code-background-color, #f4f4f5);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.badge {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-draft     { background: #fef3c7; color: #92400e; }
.badge-published { background: #d1fae5; color: #065f46; }

/* ── Misc ───────────────────────────────────────────── */
.muted { color: var(--pico-muted-color); font-size: 0.875rem; }
.mt-0  { margin-top: 0; }
.rating-note {
  border-left: 3px solid var(--biscotti-light);
  padding-left: 0.75rem;
  font-style: italic;
  color: var(--pico-muted-color);
  margin: 0.25rem 0 0;
}
