/* The tea finder page (/find-your-tea/, cms/finder.py): canvas design "L1 · Moving rows of examples".
   The page is one screen: the nav, then the chat filling the rest, with the box to type in at the bottom. */

html:has(body.tf-body), body.tf-body { height: 100%; overflow: hidden; }
body.tf-body { background: #faf6ef; }

.tf {
  position: fixed; left: 0; right: 0; top: 65px; bottom: 0;
  display: flex; flex-direction: column;
  background: #faf6ef; color: #333;
  font-family: var(--font-sans, Helveticaneue, Helvetica, Arial, sans-serif);
}
.tf-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tf-intro, .tf-log, .tf-form, .tf-note { max-width: 680px; margin-left: auto; margin-right: auto; box-sizing: border-box; }

/* ---- intro ---- */
.tf-intro { padding: 26px 20px 20px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid #ece4d6; }
.tf-intro[hidden] { display: none; }
.tf-eyebrow { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #A30B1F; }
.tf-title { margin: 0; display: flex; flex-direction: column; font-size: 32px; line-height: 36px; }
.tf-title__soft { font-family: var(--font-serif, Charter, Georgia, serif); font-style: italic; font-weight: 400; }
.tf-title__bold { font-weight: 700; }
.tf-lede { margin: 0; font-weight: 300; font-size: 15px; line-height: 23px; color: #4a463f; }

.tf-examples { margin: 0 -20px; display: flex; flex-direction: column; gap: 8px; }
.tf h2.tf-examples__label { margin: 0; padding: 0 20px; font-weight: 700; font-size: 13px; line-height: 18px; }
.tf-strip { overflow: hidden; padding: 1px 0; }
.tf-track { display: flex; gap: 8px; width: max-content; padding-right: 8px; animation: tf-left 46s linear infinite; }
.tf-track--rev { animation-name: tf-right; }
.tf-strip:hover .tf-track, .tf-strip:focus-within .tf-track { animation-play-state: paused; }
@keyframes tf-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tf-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.tf-ex {
  flex: none; height: 38px; padding: 0 14px; box-sizing: border-box; border-radius: 50px; border: 1px solid #ddd5c6; background: #fff; color: #333;
  display: inline-flex; align-items: center;
  font-family: var(--font-serif, Charter, Georgia, serif); font-style: italic; font-size: 15px; white-space: nowrap;
}
button.tf-ex { cursor: pointer; }
button.tf-ex:hover { border-color: #A30B1F; color: #A30B1F; }
@media (prefers-reduced-motion: reduce) {
  .tf-track { animation: none; }
  .tf-strip { overflow-x: auto; }
  .tf-track .tf-ex[aria-hidden="true"] { display: none; }
}

/* ---- the bar that replaces the intro once a chat starts ---- */
.tf-bar { height: 52px; flex: none; padding: 0 8px 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #ece4d6; background: #fff; }
.tf-bar[hidden] { display: none; }
.tf-bar__title { display: flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--font-serif, Charter, Georgia, serif); font-style: italic; font-size: 17px; white-space: nowrap; }
.tf-reset { height: 44px; padding: 0 10px; border: 0; background: none; color: #6b655c; font-family: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; flex: none; }

/* ---- conversation ---- */
.tf-log { padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.tf-avatar { width: 26px; height: 26px; border-radius: 13px; background: #A30B1F; display: flex; align-items: center; justify-content: center; flex: none; }
.tf-avatar img { width: 15px; height: auto; }
.tf-msg-bot { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.tf-bot-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tf-bot-text { margin: 2px 0 0; font-weight: 300; font-size: 16px; line-height: 25px; white-space: pre-line; }
.tf-msg-me { align-self: flex-end; max-width: 80%; padding: 10px 16px; border-radius: 20px; background: #ece4d6; font-size: 15px; line-height: 21px; overflow-wrap: anywhere; }
.tf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-opts[hidden] { display: none; }
.tf-opt {
  min-height: 40px; padding: 6px 16px; border-radius: 50px; border: 1.5px solid #A30B1F; background: #fff; color: #A30B1F;
  font-family: inherit; font-weight: 700; font-size: 14px; line-height: 18px; cursor: pointer; text-align: left;
}
.tf-opt:hover { background: #A30B1F; color: #fff; }
.tf-typing { font-size: 20px; letter-spacing: 3px; color: #6b655c; }
.tf-card {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 16px; gap: 12px; align-items: start; padding: 10px; border-radius: 18px;
  background: #fff; border: 1px solid #ece4d6; color: inherit; text-decoration: none;
}
.tf-card > svg { align-self: center; }
.tf-card img, .tf-card-mark { width: 72px; height: 90px; object-fit: cover; border-radius: 12px; display: block; background: #A30B1F; }
.tf-card-mark { display: flex; align-items: center; justify-content: center; }
.tf-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tf-card-top { font-family: var(--font-serif, Charter, Georgia, serif); font-style: italic; font-size: 13px; line-height: 16px; }
.tf-card-name { font-weight: 700; font-size: 17px; line-height: 20px; }
.tf-card-stats { font-weight: 300; font-size: 12px; color: #6b655c; }
.tf-card-why { margin-top: 4px; font-weight: 300; font-size: 13px; line-height: 18px; }
.tf-find { align-self: flex-start; height: 40px; padding: 0 16px; border-radius: 50px; background: #A30B1F; color: #fff; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }
.loc-body a.tf-find { color: #fff; }

/* ---- the box to type in ---- */
.tf-dock { flex: none; padding: 10px 12px 12px; background: #faf6ef; border-top: 1px solid #ece4d6; display: flex; flex-direction: column; gap: 8px; }
.tf-form {
  width: 100%; margin: 0 auto; height: 52px; background: #fff; border: 1px solid #ddd5c6; border-radius: 26px; box-shadow: 0 4px 18px rgba(0,0,0,.06);
  padding: 0 6px 0 18px; display: flex; align-items: center; gap: 8px;
}
.tf-form:focus-within { border-color: #A30B1F; }
.tf .tf-form input, .tf .tf-form input:focus {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: none; box-shadow: none; background: transparent;
  font-family: inherit; font-size: 16px; color: #333;
}
.tf-send { width: 40px; height: 40px; border: 0; border-radius: 20px; background: #A30B1F; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.tf-send:disabled { background: #d6ccbc; cursor: default; }
.tf-note { width: 100%; margin: 0 auto; font-weight: 300; font-size: 11px; line-height: 15px; color: #6b655c; text-align: center; }

/* ---- larger screens ---- */
@media (min-width: 701px) {
  .tf-intro { padding: 48px 24px 28px; gap: 16px; }
  .tf-title { font-size: 44px; line-height: 50px; }
  .tf-lede { font-size: 17px; line-height: 27px; }
  .tf-examples { margin: 0 -24px; }
  .tf h2.tf-examples__label { padding: 0 24px; }
  .tf-strip { -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
  .tf-log { padding: 24px; }
  .tf-dock { padding: 12px 24px 14px; }
}
