/* Shared theme + components for all pages (served from 'self'; no inline styles). */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #781826;        /* Sewing the Seeds maroon */
  --brand-dark: #5e121d;
  --brand-tint: #fbf2f3;   /* soft maroon wash */
  --brand-soft: #f4e6e8;
  --accent: #a8433f;       /* warm terracotta accent */
  --ink: #3a2f30;
  --muted: #857a7b;
  --error: #c0392b;
  --page-bg: #f1ece6;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  line-height: 1.6;
  padding: 2.5rem 1rem;
  min-height: 100vh;
}

/* Centered-card layout (used by success.html) */
body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container { max-width: 460px; margin: 0 auto; transition: max-width 0.25s ease; }
.container.wide { max-width: 720px; }

.logo { display: block; margin: 0 auto 1.5rem; height: 110px; width: auto; }
.logo.sm { height: 72px; margin-bottom: 1.25rem; }

.card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 6px 28px rgba(120, 24, 38, 0.10);
  border: 1px solid var(--brand-soft);
}
.card.centered-text { text-align: center; padding: 2.5rem; max-width: 440px; }

h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.5rem;
  color: var(--brand);
  text-align: center;
  margin-bottom: 0.25rem;
}
h1 span {
  display: block;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--brand); }

input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2d6d7;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--ink);
  background: #fff;
  color-scheme: light;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0px 1000px #fff inset;
  transition: background-color 5000s ease-in-out 0s;
}
option { color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(120, 24, 38, 0.12);
}
input.input-error { border-color: var(--error); }
textarea { resize: vertical; min-height: 70px; }

/* Responsive grid: single column on mobile, two columns on wider screens */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 0.9rem; }
.col-span-2 { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.field { margin-bottom: 0.6rem; }
.field.relative { position: relative; }
.field-error { font-size: 0.8rem; color: var(--error); min-height: 1rem; margin-bottom: 0.25rem; }
.required { color: var(--error); }

.toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: 8px;
}
.toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.toggle span { font-size: 0.95rem; color: var(--ink); }

.amount-presets { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.amount-presets button {
  flex: 1;
  min-width: 70px;
  padding: 0.5rem;
  border: 1.5px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.amount-presets button:hover,
.amount-presets button.selected { background: var(--brand); color: #fff; }

.btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { background: #d8c3c6; cursor: not-allowed; }

.section-title { font-family: 'Libre Baskerville', serif; font-size: 1.1rem; color: var(--brand); margin-bottom: 0.6rem; }
.section-group { background: #fcfaf8; border: 1px solid var(--brand-soft); border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem; }
.optional { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

.general-error { color: var(--error); font-size: 0.85rem; margin-bottom: 0.75rem; }

.manage-link { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; }
.manage-link a { color: var(--accent); text-decoration: none; cursor: pointer; }
.manage-link a:hover { text-decoration: underline; }

.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.85rem; color: var(--accent); cursor: pointer; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.divider { border: none; border-top: 1px solid var(--brand-soft); margin: 1.25rem 0; }

/* Thank-you page copy */
.thanks-text { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.thanks-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.thanks-link:hover { text-decoration: underline; }

/* Multi-step wizard */
.step { display: none; }
.step.active { display: block; }

/* Review summary rows (built as DOM nodes in app.js) */
.review-summary { font-size: 0.9rem; color: #333; line-height: 1.8; margin-bottom: 1.25rem; }

/* Currency autocomplete */
.cur-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #e2d6d7;
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 8px 20px rgba(120, 24, 38, 0.14);
}
.cur-item { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.5rem 0.75rem; cursor: pointer; color: var(--ink); font-size: 0.95rem; }
.cur-item:hover { background: var(--brand-tint); }
.cur-item .cur-sym { width: 2.2rem; color: var(--brand); font-weight: 600; flex-shrink: 0; }
.cur-item .cur-code { width: 2.6rem; font-weight: 600; color: var(--ink); flex-shrink: 0; }
.cur-item .cur-name { color: var(--muted); }

/* Utility */
.hidden { display: none; }
