/* tf-feedback: the "Feedback" button and its panel. Colours and fonts come from tf-ordering's per-site tokens
   (--tfo-*), with plain fallbacks if tf-ordering is switched off. Everything is under #tffb because the Storefront theme
   styles bare button, input, label, h2 and p.
   Placement: phones and tablets bottom LEFT (the /shop steppers are on the right); desktop bottom RIGHT (the /shop
   category list is a tall sticky column on the left, the basket panel on the right is short). feedback.js lifts it
   above the bottom stack (cookie bar, basket bar) via --tffb-b, and hides it while the order form is on screen.
   z-index: below tf-ordering's basket bar (99990), consent bars (99999/100000) and menu drawer (100060). */
#tffb { --tffb-b: 16px; --tffb-brand: var(--tfo-brand, #283c4e); --tffb-ink: var(--tfo-ink, #1f2d3a); --tffb-ink2: var(--tfo-ink-2, #4a5864);
  --tffb-muted: var(--tfo-muted, #5f6b75); --tffb-line: var(--tfo-line, #e2ddcf); --tffb-surface: var(--tfo-surface, #fff);
  --tffb-star: var(--tfo-cta, #e8b04a); --tffb-star-edge: var(--tfo-accent, #8f6430); --tffb-radius: var(--tfo-radius, 12px); --tffb-radius-sm: var(--tfo-radius-sm, 8px);
  --tffb-font: var(--tfo-font-body, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  position: fixed; left: 12px; bottom: max(var(--tffb-b), calc(12px + env(safe-area-inset-bottom))); z-index: 99980;
  font: 400 15px/1.35 var(--tffb-font); color: var(--tffb-ink); }
#tffb[data-away] .tffb-tab { opacity: 0; visibility: hidden; pointer-events: none; }
/* the themes set letter-spacing, centring and backgrounds on bare p, h2, fieldset and label */
#tffb, #tffb * { letter-spacing: normal; word-spacing: normal; text-align: left; }
#tffb .tffb-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* the button: small pill, quiet colours */
#tffb .tffb-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; margin: 0; padding: 0 14px 0 11px;
  border: 1px solid var(--tffb-line); border-radius: 19px; background: var(--tffb-surface); color: var(--tffb-brand);
  font: 700 14px/1 var(--tffb-font); letter-spacing: normal; text-transform: none; box-shadow: 0 2px 10px rgba(0,0,0,.12);
  cursor: pointer; transition: opacity .2s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
#tffb .tffb-tab::after { content: ''; position: absolute; inset: -4px; }   /* 46 px tap target around a 38 px pill */
#tffb .tffb-tab:hover { box-shadow: 0 3px 14px rgba(0,0,0,.18); }
#tffb .tffb-tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
#tffb .tffb-tab[aria-expanded="true"] { visibility: hidden; }
#tffb button:focus-visible, #tffb a:focus-visible, #tffb textarea:focus-visible, #tffb input:focus-visible { outline: 3px solid var(--tffb-brand); outline-offset: 2px; }

/* the panel */
#tffb .tffb-panel { position: absolute; left: 0; bottom: 0; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - var(--tffb-b) - 24px);
  max-height: calc(100dvh - var(--tffb-b) - 24px); overflow-y: auto; box-sizing: border-box; padding: 16px 16px 12px; background: var(--tffb-surface);
  border: 1px solid var(--tffb-line); border-radius: var(--tffb-radius); box-shadow: 0 10px 34px rgba(0,0,0,.22); z-index: 99985; }
#tffb .tffb-panel[hidden] { display: none; }
#tffb .tffb-x { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  margin: 0; padding: 0; border: 0; border-radius: 20px; background: transparent; color: var(--tffb-ink2); cursor: pointer; box-shadow: none; }
#tffb .tffb-x:hover { background: rgba(0,0,0,.06); }
#tffb .tffb-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#tffb .tffb-form { margin: 0; padding: 0; }
#tffb .tffb-h { margin: 2px 40px 8px 0; padding: 0; font: 700 18px/1.25 var(--tffb-font); color: var(--tffb-brand); letter-spacing: normal; text-transform: none; }

/* stars: real radio buttons (arrow keys move between them), drawn as stars */
#tffb .tffb-stars { display: flex; gap: 2px; margin: 0 0 2px -4px; padding: 0; border: 0; min-width: 0; background: none; box-shadow: none; }
#tffb .tffb-stars label { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; cursor: pointer; border-radius: 10px; }
#tffb .tffb-stars svg { width: 32px; height: 32px; fill: transparent; stroke: var(--tffb-muted); stroke-width: 1.4; stroke-linejoin: round; transition: transform .12s, fill .12s; }
#tffb .tffb-stars label.is-on svg { fill: var(--tffb-star); stroke: var(--tffb-star-edge); }
#tffb .tffb-stars label.is-hover svg { transform: scale(1.08); }
#tffb .tffb-stars input:focus-visible + label { outline: 3px solid var(--tffb-brand); outline-offset: -2px; }
#tffb .tffb-rated { min-height: 18px; margin: 0 0 8px; font-size: 14px; color: var(--tffb-ink2); }

#tffb .tffb-l { display: block; margin: 0 0 4px; font: 700 14px/1.3 var(--tffb-font); color: var(--tffb-ink); letter-spacing: normal; text-transform: none; }
#tffb .tffb-l span { font-weight: 400; color: var(--tffb-muted); }
/* 16 px text in the fields: smaller makes iPhones zoom the page */
#tffb textarea, #tffb input[type="email"] { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 9px 11px; border: 1px solid var(--tffb-line);
  border-radius: var(--tffb-radius-sm); background: #fff; color: var(--tffb-ink); font: 400 16px/1.35 var(--tffb-font); box-shadow: none; }
#tffb textarea { min-height: 76px; resize: vertical; }
#tffb input[type="email"] { height: 44px; margin-bottom: 10px; }
#tffb [aria-invalid="true"] { border-color: #b3261e; }
#tffb .tffb-count { display: block; margin: 3px 0 8px; text-align: right; font-size: 12px; color: var(--tffb-muted); }
#tffb .tffb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#tffb .tffb-err { min-height: 0; margin: 0; font-size: 14px; color: #b3261e; }
#tffb .tffb-err:not(:empty) { margin: 0 0 8px; }
#tffb .tffb-send { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; margin: 0; padding: 0 16px; border: 0;
  border-radius: 22px; background: var(--tffb-brand); color: var(--tfo-brand-ink, #fff); font: 700 16px/1 var(--tffb-font);
  letter-spacing: normal; text-transform: none; cursor: pointer; box-shadow: none; }
#tffb .tffb-send:hover { filter: brightness(1.12); }
#tffb .tffb-send[disabled] { opacity: .6; cursor: default; }
#tffb .tffb-note { margin: 8px 0 0; font-size: 12px; color: var(--tffb-muted); text-align: center; }
#tffb .tffb-count { text-align: right; }
#tffb .tffb-note a { color: inherit; text-decoration: underline; }
#tffb .tffb-done { padding: 6px 0 8px; outline: none; }
#tffb .tffb-done[hidden] { display: none; }
#tffb .tffb-done p { margin: 0; color: var(--tffb-ink2); }
#tffb .tffb-done .tffb-h { margin-bottom: 6px; }

@media (min-width: 1024px) {
  #tffb { left: auto; right: 20px; bottom: max(var(--tffb-b), 20px); }
  #tffb .tffb-panel { left: auto; right: 0; }
}
@media (prefers-reduced-motion: reduce) { #tffb * { transition: none !important; } }
@media print { #tffb { display: none !important; } }
