/* Find Your Red Cross — concept mockup. Not an official redcross.org feature. */
:root {
  --red: #D8001B;
  --red-dark: #B40016;
  --red-soft: #FDECEE;
  --navy: #24384f;
  --navy-deep: #1a2a3c;
  --ink: #1c242c;
  --muted: #5c6874;
  --paper: #F7F4F0;
  --card: #ffffff;
  --line: #e3dcd3;
  --chip: #faf8f5;
  --smile: #1B8A4A;
  --smile-dark: #146b39;
  --shadow: 0 18px 50px rgba(36, 56, 79, 0.10);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; }
button, input, textarea { font-family: inherit; }
a { color: var(--red); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 80;
  background: #fff;
  padding: 8px 12px;
  color: var(--navy);
}

/* —— Feedback widget (always-on, one only) —— */
.feedback {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px 5px 12px;
  box-shadow: 0 8px 24px rgba(36, 56, 79, 0.12);
}
.feedback .lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 4px;
}
.fb-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.fb-btn:hover { transform: scale(1.08); }
.fb-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.fb-btn.smile { background: var(--smile); color: #fff; }
.fb-btn.smile:hover { background: var(--smile-dark); }
.fb-btn.frown { background: var(--red); color: #fff; }
.fb-btn.frown:hover { background: var(--red-dark); }
.fb-btn svg { width: 20px; height: 20px; }

/* —— Header —— */
.toprule {
  height: 6px;
  background: var(--red);
  flex: 0 0 6px;
}
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 18px 28px 16px;
  padding-right: 200px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
}
.cross {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--red);
}
.brand-text h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-text p {
  font-size: 12px;
  color: #c9d3de;
  margin-top: 3px;
  font-weight: 500;
}

/* —— Main —— */
.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 20px;
  flex: 1;
}
.lede {
  margin-bottom: 18px;
}
.lede p {
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.3;
  max-width: 28em;
}
.lede .motto {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

/* —— Chat card —— */
.chat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 560px;
  max-height: min(74vh, 760px);
  overflow: hidden;
}
.chat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf8;
}
.chat-bar .who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.chat-bar .who span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
}
.avatar svg { width: 14px; height: 14px; }
.bar-actions {
  display: flex;
  gap: 8px;
}
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.ghost:hover { border-color: var(--navy); background: #fff; }
.ghost:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  max-width: 100%;
  animation: rise 0.28s ease;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.row.bot { align-self: flex-start; }
.row.user { align-self: flex-end; flex-direction: row-reverse; }
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.row.bot .bubble {
  background: #f3efe8;
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.row.user .bubble {
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.row.bot .avatar { background: var(--red); }
.dots { display: inline-flex; gap: 4px; padding: 2px 2px; }
.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1s infinite;
}
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 54px 6px;
}
.chip {
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.chip:hover, .chip:focus-visible {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
  outline: none;
}

/* Recommendation card */
.rec {
  margin: 4px 0 4px 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(36, 56, 79, 0.08);
  max-width: 560px;
  animation: rise 0.32s ease;
}
.rec-top {
  height: 6px;
  background: var(--red);
}
.rec-body { padding: 16px 18px 14px; }
.rec-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.rec h2 {
  font-size: 22px;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin: 4px 0 8px;
  font-weight: 700;
}
.rec .why { font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.rec .does { font-size: 14px; color: var(--muted); }
.rec .does strong { color: var(--navy); font-weight: 700; }
.rec-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn.primary {
  background: var(--red);
  color: #fff;
}
.btn.primary:hover { background: var(--red-dark); }
.btn.secondary {
  background: #fff;
  color: var(--navy);
  border-color: var(--navy);
}
.btn.secondary:hover { background: var(--navy); color: #fff; }
.btn.tertiary {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn.tertiary:hover { border-color: var(--navy); }
.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.demo-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.composer {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.composer input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
}
.composer input:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
}
.composer button.send {
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-width: 76px;
}
.composer button.send:hover { background: var(--red-dark); }
.composer button.send:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.composer button.send:disabled { opacity: 0.5; cursor: default; }

.site-footer {
  text-align: center;
  padding: 18px 16px 28px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer strong { color: var(--navy); font-weight: 600; }

/* —— Programs drawer —— */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 42, 60, 0.45);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 100%);
  background: #fff;
  z-index: 61;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 40px rgba(0,0,0,0.12);
}
.drawer.open { transform: none; }
.drawer header {
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.drawer header h2 {
  font-size: 18px;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.drawer header p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 32em;
}
.icon-x {
  border: 0;
  background: var(--paper);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  color: var(--navy);
  line-height: 1;
}
.drawer-body {
  overflow-y: auto;
  padding: 8px 20px 32px;
}
.pg-group { margin-top: 18px; }
.pg-group h3 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 8px;
}
.pg-group ul { list-style: none; }
.pg-group li {
  font-size: 14.5px;
  padding: 6px 0;
  border-bottom: 1px solid #f0ebe4;
  color: var(--navy);
  font-weight: 550;
}
.pick {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.pick:hover { color: var(--red); }

/* —— Feedback modal —— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  background: #fff;
  width: min(720px, 100%);
  height: min(780px, 90vh);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
  position: relative;
  z-index: 2;
}
.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--navy);
  color: #fff;
}
.modal-bar h2 { font-size: 15px; font-weight: 700; }
.modal-card iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #f6f6f6;
}

.chat-bar { flex-wrap: wrap; }

@media (max-width: 640px) {
  .site-header { padding: 14px 16px 14px; padding-right: 168px; }
  .feedback { top: 10px; right: 8px; padding: 4px 6px 4px 8px; }
  .feedback .lbl { display: none; }
  .fb-btn { width: 32px; height: 32px; }
  .brand-text h1 { font-size: 18px; }
  .lede p { font-size: 17px; }
  .chat-card { min-height: 70vh; max-height: none; }
  .bubble { max-width: 88%; font-size: 14.5px; }
  .chips { padding-left: 12px; padding-right: 12px; }
  .rec { margin-left: 0; }
  .bar-actions { width: 100%; justify-content: flex-end; }
}


/* —— Added for the donor-chat mockup —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.drawer-lead {
  font-size: 13.5px;
  color: var(--navy);
  font-weight: 650;
  margin: 14px 0 2px;
  line-height: 1.4;
}
.pg-group.vehicles h3 { color: var(--navy); }
.pg-group .note {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.35;
}
.pg-group li .hint {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 1px;
}

.rec .line-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--red-soft);
  color: var(--red);
  padding: 3px 8px;
  border-radius: 999px;
  margin: 2px 0 4px;
}
.rec .line-tag.vehicle {
  background: #eef2f6;
  color: var(--navy);
}
.rec .line-tag.action {
  background: #e8f5ee;
  color: var(--smile-dark);
}

.modal-bar .icon-x { background: rgba(255,255,255,0.12); color: #fff; }
.modal-bar .icon-x:hover { background: rgba(255,255,255,0.22); }

.composer { position: relative; }

.overlay[hidden], .drawer[hidden] { display: none !important; }
.lede > .motto { margin-top: 8px; }

/* —— In-chat follow-up form —— */
.follow-form {
  margin: 4px 0 4px 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 14px;
  max-width: 560px;
  box-shadow: 0 10px 28px rgba(36, 56, 79, 0.08);
  animation: rise 0.32s ease;
}
.follow-form .follow-lead {
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.45;
}
.follow-form .field {
  margin-bottom: 10px;
}
.follow-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.follow-form label .opt {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.follow-form input,
.follow-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
}
.follow-form input:focus,
.follow-form textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
}
.follow-form textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.4;
}
.follow-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.follow-form .btn {
  appearance: none;
  -webkit-appearance: none;
}

@media (max-width: 640px) {
  .follow-form { margin-left: 0; }
}
