/* ===========================================================================
   Adega — Burgundy design system (see DESIGN.md)
   Component classes consumed by the Jinja templates. Layout/spacing is left to
   Tailwind utilities; brand surfaces (buttons, cards, fields, nav, chips) live
   here as plain CSS so they don't depend on the CDN build picking up arbitrary
   class names.
   =========================================================================== */

:root {
  --burgundy: #7b1e3c;
  --burgundy-accent: #94264a;
  --burgundy-deep: #3d1320;
  --burgundy-uplift: #5e1d33;
  --burgundy-light: #f4dbe2;
  --cellar-slate: #4a2630;
  --gold: #cba258;
  --cream: #f2f0eb;
  --ceramic: #edebe9;
  --ink: rgba(0, 0, 0, 0.87);
  --ink-soft: rgba(0, 0, 0, 0.58);
  --hairline: rgba(0, 0, 0, 0.06);

  --shadow-card: 0 0 0.5px 0 rgba(0, 0, 0, 0.14), 0 1px 1px 0 rgba(0, 0, 0, 0.24);
  --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.1), 0 2px 2px rgba(0, 0, 0, 0.06),
    0 0 2px rgba(0, 0, 0, 0.07);
  --shadow-float: 0 0 6px rgba(0, 0, 0, 0.24), 0 8px 12px rgba(0, 0, 0, 0.14);
}

/* Base voice: tight tracking, warm-cream canvas, never-pure-black ink. */
body {
  letter-spacing: -0.01em;
  background-color: var(--cream);
  color: var(--ink);
}

/* Ceremony serif — wordmark, page titles, wine names. */
.font-display {
  font-family: "Lora", "Iowan Old Style", Georgia, serif;
  letter-spacing: -0.02em;
}

/* --- Buttons: universal 50px pill + scale(0.95) active ------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.95);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(148, 38, 74, 0.3);
}
.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--burgundy-accent);
  color: #fff;
  border-color: var(--burgundy-accent);
}
.btn-primary:hover {
  background: var(--burgundy);
  border-color: var(--burgundy);
}

.btn-outline {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--burgundy);
}
.btn-outline:hover {
  background: var(--burgundy-light);
}

.btn-deep {
  background: var(--burgundy-deep);
  color: #fff;
  border-color: var(--burgundy-deep);
}
.btn-deep:hover {
  background: var(--burgundy-uplift);
  border-color: var(--burgundy-uplift);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(0, 0, 0, 0.18);
}
.btn-ghost:hover {
  background: var(--ceramic);
}

.btn-inverted {
  background: #fff;
  color: var(--burgundy);
  border-color: #fff;
}
.btn-inverted:hover {
  background: var(--burgundy-light);
}

/* A quiet destructive text affordance (delete links). */
.btn-danger-link {
  color: #b91c1c;
  font-size: 0.85rem;
  text-decoration: none;
}
.btn-danger-link:hover {
  text-decoration: underline;
}

/* --- Cards -------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

/* --- Form fields -------------------------------------------------------- */
.field {
  background: #fff;
  border: 1px solid #d6d3d1;
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder {
  color: rgba(0, 0, 0, 0.38);
}
.field:focus {
  outline: none;
  border-color: var(--burgundy-accent);
  box-shadow: 0 0 0 3px rgba(148, 38, 74, 0.15);
}
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

/* --- Section label (the small uppercase headers) ------------------------ */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(123, 30, 60, 0.65);
}

/* --- Chips -------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  padding: 0.12rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}
.chip-brand {
  background: var(--burgundy-light);
  color: var(--burgundy);
}

/* --- Navigation --------------------------------------------------------- */
.navlink {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.navlink:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* --- Floating "Pour" add button ---------------------------------------- */
.float-add {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: var(--burgundy-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  transition: all 0.2s ease;
  z-index: 40;
}
.float-add:hover {
  background: var(--burgundy);
}
.float-add:active {
  transform: scale(0.95);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.24), 0 8px 12px rgba(0, 0, 0, 0);
}

/* --- Soft image fade-in ------------------------------------------------- */
.wine-img {
  transition: opacity 0.3s ease-in;
}

/* --- HTMX loading indicator (kept from original) ------------------------ */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}
