/* "Need our help?" guide widget. All classes start with tg- so nothing on the page is affected. */
.tg-root, .tg-root * { box-sizing: border-box; line-height: 1.45; font-family: 'Poppins', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
.tg-root { --tg: var(--primary_color, #dc2626); --tg-ink: #0f172a; --tg-mute: #64748b; --tg-line: #e5e7eb; position: fixed; right: 18px; bottom: 18px; z-index: 99990; font-size: 15px; line-height: 1.45; color: var(--tg-ink); }

/* ---- the bubble ---- */
.tg-launch { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 14px; border: 0; border-radius: 999px; background: #111827; color: #fff; font-size: 15.5px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 28px rgba(15, 23, 42, .28); transition: transform .15s, box-shadow .15s; }
.tg-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(15, 23, 42, .34); }
.tg-launch .tg-ico { width: 32px; height: 32px; border-radius: 50%; background: var(--tg); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tg-launch .tg-ico svg { width: 18px; height: 18px; fill: #fff; }
.tg-launch.tg-attn { animation: tg-pulse 2.2s ease-out 2; }
@keyframes tg-pulse { 0% { box-shadow: 0 0 0 0 rgba(17, 24, 39, .45), 0 10px 28px rgba(15, 23, 42, .28); } 70% { box-shadow: 0 0 0 16px rgba(17, 24, 39, 0), 0 10px 28px rgba(15, 23, 42, .28); } 100% { box-shadow: 0 0 0 0 rgba(17, 24, 39, 0), 0 10px 28px rgba(15, 23, 42, .28); } }
.tg-launch.tg-mini { padding: 0; width: 56px; height: 56px; justify-content: center; }
.tg-launch.tg-mini .tg-label { display: none; }
.tg-launch.tg-mini .tg-ico { width: 34px; height: 34px; }
.tg-hide-pill { position: absolute; top: -9px; left: -9px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: #fff; color: #475569; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); display: none; align-items: center; justify-content: center; }
.tg-launch-wrap:hover .tg-hide-pill, .tg-hide-pill:focus { display: flex; }
.tg-launch-wrap { position: relative; display: inline-block; }
.tg-root.tg-open .tg-launch-wrap { display: none; }
.tg-root.tg-lift { bottom: 92px; }   /* the form has its own Back / Next bar at the bottom */
.tg-root.tg-lift.tg-open { bottom: 18px; }

/* ---- the panel ---- */
.tg-panel { display: none; flex-direction: column; width: 390px; height: min(620px, calc(100vh - 36px)); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); overflow: hidden; border: 1px solid var(--tg-line); }
.tg-root.tg-open .tg-panel { display: flex; animation: tg-in .2s ease-out; }
@keyframes tg-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.tg-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: var(--tg); color: #fff; }
.tg-head .tg-ico { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tg-head .tg-ico svg { width: 20px; height: 20px; fill: #fff; }
.tg-head .tg-t { flex: 1; min-width: 0; }
.tg-head .tg-t b { display: block; font-size: 16px; }
.tg-head .tg-t span { display: block; font-size: 12.5px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tg-iconbtn:hover { background: rgba(255, 255, 255, .3); }
.tg-iconbtn svg { width: 19px; height: 19px; fill: currentColor; }
.tg-iconbtn.tg-on { background: #fff; color: var(--tg); }

.tg-msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: #f8fafc; -webkit-overflow-scrolling: touch; }
.tg-m { max-width: 88%; margin: 0 0 10px; padding: 10px 14px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; }
.tg-m.bot { background: #fff; border: 1px solid var(--tg-line); border-bottom-left-radius: 5px; }
.tg-m.me { background: var(--tg); color: #fff; margin-left: auto; border-bottom-right-radius: 5px; }
.tg-m p { margin: 0 0 6px; } .tg-m p:last-child { margin: 0; }
.tg-note { text-align: center; font-size: 12.5px; color: var(--tg-mute); margin: 4px 0 10px; }
.tg-note b { color: #166534; }
.tg-typing { display: inline-flex; gap: 4px; padding: 4px 0; } .tg-typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: tg-b 1.1s infinite ease-in-out; } .tg-typing i:nth-child(2) { animation-delay: .15s; } .tg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tg-b { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

.tg-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 14px 12px; background: #f8fafc; }
.tg-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--tg); background: #fff; color: var(--tg); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; }
.tg-chip:hover { background: var(--tg); color: #fff; }
.tg-link { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; margin: 0 0 10px; border-radius: 10px; background: #111827; color: #fff !important; font-weight: 600; text-decoration: none !important; }

.tg-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--tg-line); background: #fff; }
.tg-input { flex: 1; min-width: 0; min-height: 46px; border: 1.5px solid #cbd5e1; border-radius: 999px; padding: 0 16px; font-size: 16px; color: var(--tg-ink); background: #fff; }
.tg-input:focus { outline: none; border-color: var(--tg); box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.tg-send, .tg-mic { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tg-send { background: var(--tg); color: #fff; } .tg-send:disabled { opacity: .5; cursor: default; }
.tg-mic { background: #f1f5f9; color: #334155; } .tg-mic.tg-rec { background: #dc2626; color: #fff; animation: tg-pulse 1.4s infinite; }
.tg-send svg, .tg-mic svg { width: 20px; height: 20px; fill: currentColor; }
.tg-foot { text-align: center; font-size: 11.5px; color: #94a3b8; padding: 0 10px 8px; background: #fff; }
.tg-stop { display: none; margin: 0 14px 8px; min-height: 38px; border-radius: 999px; border: 1.5px solid #dc2626; background: #fff; color: #dc2626; font-weight: 700; cursor: pointer; }
.tg-busy .tg-stop { display: block; }

/* ---- highlight on the page ---- */
.tg-ring { position: fixed; z-index: 99980; pointer-events: none; border-radius: 12px; border: 3px solid var(--tg); box-shadow: 0 0 0 6px rgba(220, 38, 38, .22), 0 0 0 9999px rgba(15, 23, 42, .28); transition: top .2s, left .2s, width .2s, height .2s; animation: tg-ring 1.4s ease-in-out infinite; }
@keyframes tg-ring { 50% { box-shadow: 0 0 0 11px rgba(220, 38, 38, .12), 0 0 0 9999px rgba(15, 23, 42, .28); } }
.tg-ring.tg-soft { box-shadow: 0 0 0 6px rgba(22, 163, 74, .3); border-color: #16a34a; animation: none; }
.tg-tip { position: fixed; z-index: 99985; max-width: min(320px, calc(100vw - 24px)); background: #111827; color: #fff; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.tg-tip button { margin-top: 8px; min-height: 36px; padding: 0 14px; border-radius: 8px; border: 0; background: #fff; color: #111827; font-weight: 700; cursor: pointer; }

/* ---- phones: the panel becomes a full-height sheet ---- */
@media (max-width: 767.98px) {
  .tg-root { right: 12px; bottom: 88px; }
  .tg-root.tg-open { right: 0; bottom: 0; left: 0; top: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; }
  .tg-root.tg-open .tg-panel { width: 100%; height: calc(100dvh - 24px); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .tg-launch { min-height: 50px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .tg-launch.tg-attn, .tg-ring, .tg-root.tg-open .tg-panel, .tg-typing i, .tg-mic.tg-rec { animation: none; } }
@media print { .tg-root, .tg-ring, .tg-tip { display: none !important; } }

/* ---- the always-visible buttons in the panel ---- */
.tg-modes { display: none; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--tg-line); }
.tg-mode { flex: 1 1 0; min-width: 0; min-height: 56px; border-radius: 14px; border: 1.5px solid #cbd5e1; background: #fff; color: var(--tg-ink); text-align: left; padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; }
.tg-mode b { font-size: 14.5px; display: block; } .tg-mode span { font-size: 12px; color: var(--tg-mute); display: block; }
.tg-mode:hover { border-color: var(--tg); }
.tg-mode.tg-mode-main { background: var(--tg); border-color: var(--tg); color: #fff; } .tg-mode.tg-mode-main span { color: rgba(255, 255, 255, .85); }

/* ---- the card above the Add Event form ---- */
.tg-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; background: #fff; border: 1.5px dashed #fca5a5; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; font-family: 'Poppins', -apple-system, Arial, sans-serif; }
.tg-inline-t { flex: 1 1 260px; } .tg-inline-t b { display: block; font-size: 16px; color: #0f172a; } .tg-inline-t span { display: block; font-size: 14px; color: #64748b; line-height: 1.4; margin-top: 2px; }
.tg-inline-b { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-inline-btn { min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1.5px solid #cbd5e1; background: #fff; color: #0f172a; font-weight: 700; font-size: 15px; cursor: pointer; }
.tg-inline-btn.tg-inline-main { background: #dc2626; border-color: #dc2626; color: #fff; }
@media (max-width: 575.98px) { .tg-inline-b { width: 100%; } .tg-inline-btn { flex: 1 1 0; } }
