/* Live chat window. Uses the site's colour tokens from site.css. */
.tc-root { position: fixed; right: 24px; bottom: 24px; z-index: 75; font: 500 15px/1.5 var(--text); color: var(--ink); }
.tc-fab { position: relative; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--surface); box-shadow: var(--shadow-lift); display: grid; place-items: center; transition: transform .25s var(--ease); }
.tc-fab:hover { transform: translateY(-2px) scale(1.03); }
.tc-fab:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.tc-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; }
.tc-avatar-lg { width: 46px; height: 46px; }
.tc-avatar-sm { width: 28px; height: 28px; flex: none; align-self: flex-end; }
.tc-online { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 2px solid var(--surface); }
.tc-badge { position: absolute; top: -2px; left: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #fff; font: 800 12px/22px var(--head); text-align: center; }
.tc-badge[hidden] { display: none; }
.tc-tip { position: absolute; right: 74px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 8px 12px; border-radius: 12px; background: var(--glass-strong); color: var(--ink); font: 700 14px var(--head); box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none; transition: opacity .2s; }
.tc-fab:hover .tc-tip, .tc-fab:focus-visible .tc-tip { opacity: 1; }
.tc-panel { position: absolute; right: 0; bottom: 80px; width: min(380px, calc(100vw - 32px)); height: min(580px, 74vh); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lift); }
.tc-panel { padding: 0; }  /* the panel is a <section>, which the site gives 104px of padding */
.tc-panel[hidden] { display: none; }
.tc-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: linear-gradient(135deg, #ff8256 0%, #ff5f2c 100%); color: #fff; }
.tc-head .tc-avatar { border: 2px solid rgba(255,255,255,.7); }
.tc-who { flex: 1; min-width: 0; }
.tc-who b { display: block; font: 800 16px/1.2 var(--head); color: #fff; }
.tc-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.9); }
.tc-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #7dffb4; display: inline-block; }
.tc-online-dot.away { background: #ffe08a; }
.tc-close { width: 36px; height: 36px; border: 0; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; font: 400 24px/1 var(--head); cursor: pointer; }
.tc-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.tc-row { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.tc-row.me { align-self: flex-end; flex-direction: row-reverse; }
.tc-bubble { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.tc-row.me .tc-bubble { background: linear-gradient(135deg, #ff8256 0%, #ff5f2c 100%); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.tc-intro, .tc-compose { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.tc-compose { flex-direction: row; align-items: flex-end; }
.tc-intro[hidden], .tc-compose[hidden] { display: none; }
.tc-intro-text { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tc-field { display: flex; flex-direction: column; gap: 4px; font: 700 13px/1.3 var(--head); color: var(--ink); }
.tc-input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); font: 500 15px var(--text); resize: none; }
.tc-input:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,106,61,.14); }
.tc-compose .tc-input { flex: 1; max-height: 120px; }
.tc-send { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff8256 0%, #ff5f2c 100%); color: #fff; font: 700 15px var(--head); cursor: pointer; }
.tc-send:disabled { opacity: .7; cursor: progress; }
.tc-send:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.tc-intro .tc-send { align-self: flex-end; }
.tc-error { margin: 0; padding: 0 16px 10px; color: var(--red); font-size: 14px; font-weight: 600; background: var(--surface); }
.tc-error:empty { display: none; }
.tc-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  .tc-root { right: 16px; bottom: 92px; }
  .tc-fab { width: 58px; height: 58px; }
  .tc-avatar { width: 50px; height: 50px; }
  .tc-tip { display: none; }
  .tc-panel { position: fixed; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(78vh, 620px); }
  .tc-root.is-open .tc-fab { display: none; }  /* on phones the open window covers the button */
}
@media (prefers-reduced-motion: reduce) { .tc-fab { transition: none; } }
