.f2h-agent { --g: #2e7d32; --g-dark: #1b5e20; --bg: #fff; --ink: #1f2a1f; --muted: #f1f6ef; --line: #dfe9dc; --warn: #b45309;
  position: fixed; right: 16px; bottom: 16px; z-index: 99999; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", "Noto Sans Tamil", sans-serif; color: var(--ink); }
.f2h-agent *, .f2h-agent *::before, .f2h-agent *::after { box-sizing: border-box; }
.f2h-agent [hidden] { display: none !important; }

/* Themes style every button/input/link; reset what breaks the widget. */
.f2h-agent button, .f2h-agent input, .f2h-agent select, .f2h-agent textarea { font: inherit; margin: 0; text-transform: none; letter-spacing: normal; line-height: 1.3; min-height: 0; min-width: 0; width: auto; height: auto; box-shadow: none; }
.f2h-agent button { cursor: pointer; }
.f2h-agent a { text-decoration: none; }
.f2h-agent p { margin: 0 0 6px; }
.f2h-agent p:last-child { margin-bottom: 0; }
.f2h-agent ul { margin: 4px 0 6px 18px; padding: 0; }
.f2h-agent :focus-visible { outline: 2px solid var(--g-dark); outline-offset: 2px; }

/* dock */
.f2h-dock { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.f2h-agent .f2h-launcher { width: 76px !important; height: 76px !important; padding: 0 !important; border-radius: 50% !important; border: 0 !important;
  background: transparent !important; display: block !important; flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.28));
  transition: transform .2s; animation: f2h-bob 3s ease-in-out 2s 3; }
.f2h-agent .f2h-launcher:hover { transform: scale(1.06); }
.f2h-agent .f2h-launcher img { display: block; width: 100%; height: 100%; }
@keyframes f2h-bob { 50% { transform: translateY(-6px); } }
.f2h-agent .f2h-teaser { background: var(--bg) !important; color: var(--ink) !important; border: 0 !important; padding: 10px 14px !important; max-width: 240px;
  border-radius: 20px 20px 4px 20px; box-shadow: 0 4px 16px rgba(0,0,0,.18); font-weight: 600; text-align: left; animation: f2h-pop .3s ease-out; }
.f2h-agent .f2h-teaser.f2h-offer { background: #fff8e1 !important; border: 2px solid #f0b429 !important; }
@keyframes f2h-pop { from { transform: translateX(8px); opacity: 0; } }
.f2h-wa-float { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.22); flex-shrink: 0; }
.f2h-wa-float img { width: 26px; height: 26px; display: block; }

/* panel */
.f2h-panel { width: 380px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 32px); background: var(--bg);
  border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.f2h-head { background: var(--g); color: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.f2h-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid #fff; flex-shrink: 0; }
.f2h-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.f2h-title span { font-size: 12px; opacity: .85; }
.f2h-agent .f2h-lang { background: rgba(255,255,255,.18) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.5) !important; border-radius: 14px !important; padding: 3px 9px !important; font-size: 12px; }
.f2h-wa { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.f2h-wa img { width: 22px; height: 22px; display: block; }
.f2h-agent .f2h-close { background: none !important; border: 0 !important; color: #fff !important; font-size: 24px; line-height: 1; padding: 0 4px !important; }

.f2h-cartbar { background: #f7faf6; border-bottom: 1px solid var(--line); padding: 8px 12px; font-size: 13px; flex-shrink: 0; }
.f2h-cart-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.f2h-agent .f2h-cart-go { background: var(--g); color: #fff !important; padding: 3px 12px; border-radius: 14px; font-weight: 600; font-size: 12px; }
.f2h-ship-text { margin-top: 4px; color: var(--g-dark); font-weight: 600; font-size: 12px; }
.f2h-progress { height: 6px; background: #e3ece0; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.f2h-progress i { display: block; height: 100%; background: var(--g); border-radius: 3px; transition: width .4s; }

.f2h-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #fafcf9; }
.f2h-log > * { flex-shrink: 0; } /* long chats must scroll, not squash tables and cards */
.f2h-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; word-wrap: break-word; position: relative; }
.f2h-assistant { background: var(--muted); align-self: flex-start; border-bottom-left-radius: 4px; padding-right: 30px; }
.f2h-user { background: var(--g); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.f2h-typing { opacity: .6; font-style: italic; padding-right: 12px; }
.f2h-agent .f2h-speak { position: absolute; top: 6px; right: 4px; background: none !important; border: 0 !important; padding: 2px !important; font-size: 13px; opacity: .55; }
.f2h-agent .f2h-speak:hover { opacity: 1; }
.f2h-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.f2h-card { display: flex; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px; align-self: flex-start; width: 94%; }
.f2h-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.f2h-img-link { flex-shrink: 0; }
.f2h-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.f2h-agent .f2h-name { color: var(--ink) !important; font-weight: 600; font-size: 13px; line-height: 1.3; }
.f2h-price { font-size: 13px; font-weight: 600; }
.f2h-price s { color: #888; font-weight: 400; }
.f2h-stars { color: #b7791f; font-weight: 400; font-size: 12px; }
.f2h-low { color: var(--warn); font-size: 12px; font-weight: 600; }
.f2h-tip { color: var(--g-dark); font-size: 12px; background: #eef7ec; border-radius: 6px; padding: 2px 6px; align-self: flex-start; }
.f2h-oos { color: #999; font-size: 12px; }
.f2h-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.f2h-agent .f2h-size { border: 1px solid #cfdccb !important; border-radius: 8px !important; padding: 4px 6px !important; font-size: 12px; max-width: 100%; background: #fff; color: var(--ink); }
.f2h-agent .f2h-cta { background: var(--g) !important; color: #fff !important; border: 0 !important; font-size: 12px; font-weight: 600; padding: 6px 12px !important; border-radius: 16px !important; display: inline-block; }
.f2h-agent .f2h-cta:hover { background: var(--g-dark) !important; }
.f2h-agent .f2h-cta:disabled { opacity: .7; cursor: default; }
.f2h-agent .f2h-link { background: none !important; border: 0 !important; padding: 2px 0 !important; color: var(--g) !important; font-weight: 600; font-size: 12px; text-align: left; align-self: flex-start; }
.f2h-agent .f2h-small { font-weight: 400; color: #5b6b58 !important; }
.f2h-added { font-size: 12px; }
.f2h-agent .f2h-action { align-self: flex-start; background: #fff !important; border: 1px solid var(--g) !important; color: var(--g) !important; border-radius: 16px !important; padding: 6px 12px !important; font-weight: 600; font-size: 13px; }

.f2h-combo, .f2h-reviews, .f2h-block, .f2h-compare { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; align-self: flex-start; width: 94%; }
.f2h-combo-title { font-weight: 700; margin-bottom: 4px; }
.f2h-agent .f2h-combo a, .f2h-agent .f2h-compare a { color: var(--ink) !important; }
.f2h-combo-total { font-weight: 600; margin: 4px 0 8px; }
.f2h-reviews blockquote { margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid #eef3ec; border-left: 0; font-style: normal; }
.f2h-reviews blockquote p { margin: 2px 0; font-size: 13px; }
.f2h-reviews cite { font-size: 11px; color: #666; font-style: normal; }
.f2h-compare { overflow-x: auto; padding: 6px; }
.f2h-compare table { border-collapse: collapse; font-size: 12px; min-width: 100%; margin: 0; }
.f2h-compare th, .f2h-compare td { border: 1px solid #eef3ec; padding: 5px 6px; text-align: left; vertical-align: top; }
.f2h-compare tr th:first-child { background: #f7faf6; white-space: nowrap; }

.f2h-formbox form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.f2h-agent .f2h-formbox input, .f2h-agent .f2h-formbox textarea { border: 1px solid #cfdccb !important; border-radius: 8px !important; padding: 8px 10px !important; font-size: 16px; width: 100%; background: #fff; color: var(--ink); }
.f2h-agent .f2h-formbox textarea { min-height: 70px; resize: vertical; }
.f2h-agent .f2h-formbox .f2h-cta { align-self: flex-start; font-size: 13px; }
.f2h-formmsg { color: #b42318; font-size: 12px; }
.f2h-track { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 4px 0 0; font-size: 13px; }
.f2h-track dt { font-weight: 600; color: #5b6b58; }
.f2h-track dd { margin: 0; }

.f2h-chips { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #eef3ec; overflow-x: auto; flex-shrink: 0; scrollbar-width: thin; }
.f2h-agent .f2h-chip { white-space: nowrap; flex-shrink: 0; background: var(--bg) !important; border: 1px solid var(--g) !important; color: var(--g) !important; border-radius: 20px !important; padding: 5px 10px !important; font-size: 12px; }
.f2h-agent .f2h-chip:hover { background: var(--muted) !important; }
.f2h-agent .f2h-chip:disabled { opacity: .5; cursor: default; }

.f2h-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #eef3ec; flex-shrink: 0; align-items: center; }
.f2h-agent .f2h-form input { flex: 1; min-width: 0; border: 1px solid #cfdccb !important; border-radius: 20px !important; padding: 9px 14px !important; font-size: 16px; background: #fff; color: var(--ink); }
.f2h-agent .f2h-form input:focus { outline: 2px solid var(--g); outline-offset: 1px; }
.f2h-agent .f2h-send { background: var(--g) !important; color: #fff !important; border: 0 !important; border-radius: 20px !important; padding: 9px 16px !important; }
.f2h-agent .f2h-mic { background: var(--muted) !important; border: 0 !important; border-radius: 50% !important; width: 38px !important; height: 38px !important; padding: 0 !important; font-size: 16px; flex-shrink: 0; }
.f2h-agent .f2h-mic.f2h-on { background: #fde2e2 !important; animation: f2h-pulse 1s infinite; }
@keyframes f2h-pulse { 50% { transform: scale(1.08); } }
.f2h-ts:empty { display: none; }
.f2h-ts { padding: 0 10px 8px; }

@media (prefers-reduced-motion: reduce) { .f2h-agent *, .f2h-agent .f2h-launcher { animation: none !important; transition: none !important; } }
@media (max-width: 480px) {
  .f2h-agent { right: 12px; bottom: 12px; }
  .f2h-panel { height: calc(100vh - 24px); height: calc(100dvh - 24px); }
  .f2h-agent .f2h-teaser { padding: 8px 12px !important; font-size: 13px; max-width: 190px; }
}
