/* ============================================
   CHATBOT WIDGET — Tirkey Corp
   CINEMATIC DESIGN — Premium Gold + Dark
   ============================================ */

:root {
  --tc-primary:        var(--color-amber, #c9a227);
  --tc-primary-dark:   var(--color-amber-dark, #a68520);
  --tc-primary-light:  rgba(201, 169, 110, 0.15);
  --tc-surface:        rgba(14, 14, 14, 0.95);
  --tc-surface-msg:    rgba(22, 22, 22, 0.9);
  --tc-text:           var(--color-text-primary, #f8f6f3);
  --tc-text-muted:     var(--color-text-muted, #6b6860);
  --tc-user-msg-bg:    var(--color-amber, #c9a227);
  --tc-user-msg-text:  var(--color-bg, #0a0a0a);
  --tc-border:         rgba(201,162,39,.12);
  --tc-radius-window:  24px;
  --tc-radius-msg:     20px;
  --tc-shadow:         0 30px 80px -15px rgba(0,0,0,.7), 0 0 40px rgba(201,162,39,.08);
  --tc-z-index:        9999;
  --tc-font:           var(--font-display, 'Space Grotesk', sans-serif);
  --tc-font-serif:     var(--font-display, 'Space Grotesk', sans-serif);
  --tc-transition:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Launcher FAB — with pulsing glow rings ── */
.tc-launcher {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  right: max(24px, env(safe-area-inset-right));
  width: 62px; height: 62px;
  min-width: 62px; min-height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tc-primary) 0%, var(--tc-primary-dark) 100%);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-bg, #0a0a0a);
  box-shadow:
    0 8px 32px rgba(201,162,39,.35),
    0 0 0 0 rgba(201,162,39,.4);
  z-index: var(--tc-z-index);
  pointer-events: auto;
  transition: transform .3s var(--tc-transition), box-shadow .3s var(--tc-transition);
  animation: launcherPulseRing 2.5s ease-out infinite;
}

@keyframes launcherPulseRing {
  0%   { box-shadow: 0 8px 32px rgba(201,162,39,.35), 0 0 0 0 rgba(201,162,39,.35); }
  70%  { box-shadow: 0 8px 32px rgba(201,162,39,.35), 0 0 0 18px rgba(201,162,39,0); }
  100% { box-shadow: 0 8px 32px rgba(201,162,39,.35), 0 0 0 0 rgba(201,162,39,0); }
}

.tc-launcher:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 14px 50px rgba(201,162,39,.5), 0 0 0 0 rgba(201,162,39,0);
  animation: none;
}
.tc-launcher:active { transform: scale(0.92); }
.tc-launcher:focus-visible { outline: 3px solid var(--tc-primary); outline-offset: 3px; }

.tc-launcher__icon { display: flex; align-items: center; justify-content: center; }
.tc-launcher__icon svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2; fill: none; }

.tc-launcher__icon--chat {
  animation: iconBreathe 3s ease-in-out infinite alternate;
}
@keyframes iconBreathe {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.tc-launcher__icon--close { display: none; }
.tc-launcher.is-open .tc-launcher__icon--chat { display: none; }
.tc-launcher.is-open .tc-launcher__icon--close {
  display: flex;
  animation: iconSpinIn .4s var(--tc-transition);
}
@keyframes iconSpinIn {
  from { transform: rotate(-90deg) scale(.5); opacity: 0; }
  to   { transform: rotate(0) scale(1); opacity: 1; }
}

.tc-launcher__badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: #ef4444; border-radius: 9999px;
  font-size: 11px; font-weight: 700; color: white;
  display: none; align-items: center; justify-content: center;
  border: 2px solid #0e0e0e;
  animation: badgeBounce .6s var(--tc-transition);
}
.tc-launcher__badge.is-visible { display: flex; }
@keyframes badgeBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ── Greeting Bubble — glassmorphism ── */
.tc-greeting {
  position: fixed;
  bottom: max(100px, calc(env(safe-area-inset-bottom) + 76px));
  right: max(24px, env(safe-area-inset-right));
  z-index: calc(var(--tc-z-index) - 1);
  background: rgba(14,14,14,.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201,162,39,.15);
  border-radius: 18px;
  padding: 16px 44px 16px 20px;
  max-width: 300px;
  box-shadow: 0 16px 50px rgba(0,0,0,.4), 0 0 30px rgba(201,162,39,.08);
  display: none; align-items: center; gap: 14px;
  opacity: 0; transform: translateY(12px) scale(0.9);
  transition: all .5s var(--tc-transition);
  cursor: pointer; pointer-events: none;
  overflow: visible;
}
/* Travelling glow on toast border */
.tc-greeting::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: 19px;
  background: conic-gradient(
    from var(--glow-angle, 0deg),
    transparent 0%,
    rgba(201,162,39,.25) 8%,
    rgba(201,162,39,.5) 12%,
    rgba(201,162,39,.25) 16%,
    transparent 25%,
    transparent 100%
  );
  z-index: -1; pointer-events: none;
  animation: borderGlowTravel 5s linear infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor; -webkit-mask-composite: xor;
  padding: 1px;
}
/* Ambient outer glow pulse */
.tc-greeting::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 22px; background: transparent;
  box-shadow: 0 0 25px rgba(201,162,39,.06);
  z-index: -2; pointer-events: none;
  animation: toastAmbient 3s ease-in-out infinite alternate;
}
@keyframes toastAmbient {
  0% { box-shadow: 0 0 20px rgba(201,162,39,.04); }
  100% { box-shadow: 0 0 40px rgba(201,162,39,.1); }
}
.tc-greeting.is-visible {
  display: flex; opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tc-greeting__avatar {
  width: 42px; height: 42px; min-width: 42px; min-height: 42px;
  border-radius: 50%;
  background: rgba(201,162,39,.1);
  border: 1.5px solid rgba(201,162,39,.3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  animation: avatarPulse 2s ease-in-out infinite alternate;
}
.tc-greeting__avatar img {
  width: 24px; height: 24px; object-fit: contain;
}
@keyframes avatarPulse {
  0% { box-shadow: 0 0 0 0 rgba(201,162,39,.3); }
  100% { box-shadow: 0 0 0 8px rgba(201,162,39,0); }
}

.tc-greeting__text { font-size: 14px; line-height: 1.5; color: var(--tc-text); }

.tc-greeting__dismiss {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  cursor: pointer; color: var(--tc-text-muted); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all .2s;
}
.tc-greeting__dismiss:hover {
  background: rgba(201,162,39,.15); color: var(--tc-primary);
  border-color: rgba(201,162,39,.2);
}

/* ── Chat Window — glassmorphism + traveling glow border ── */
.tc-chat-window {
  position: fixed;
  bottom: 100px; right: 24px;
  width: 400px; max-width: calc(100vw - 48px);
  height: 580px; max-height: calc(100dvh - 140px);
  background: rgba(12,12,12,.94);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(201,162,39,.1);
  border-radius: var(--tc-radius-window);
  box-shadow: var(--tc-shadow);
  display: none; flex-direction: column;
  z-index: 1000000;
  font-family: var(--tc-font);
  overflow: visible;
}

/* Traveling glow on border */
.tc-chat-window::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: calc(var(--tc-radius-window) + 1px);
  background: conic-gradient(
    from var(--glow-angle, 0deg),
    transparent 0%,
    rgba(201,162,39,.3) 10%,
    rgba(201,162,39,.6) 15%,
    rgba(201,162,39,.3) 20%,
    transparent 30%,
    transparent 100%
  );
  z-index: -1; pointer-events: none;
  animation: borderGlowTravel 4s linear infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor; -webkit-mask-composite: xor;
  padding: 1px;
}
@property --glow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes borderGlowTravel {
  to { --glow-angle: 360deg; }
}

/* Outer ambient glow */
.tc-chat-window::after {
  content: ''; position: absolute; inset: -6px;
  border-radius: calc(var(--tc-radius-window) + 6px);
  background: transparent;
  box-shadow: 0 0 40px rgba(201,162,39,.06), 0 0 80px rgba(201,162,39,.03);
  z-index: -2; pointer-events: none;
  animation: ambientPulse 3s ease-in-out infinite alternate;
}
@keyframes ambientPulse {
  0% { box-shadow: 0 0 30px rgba(201,162,39,.04), 0 0 60px rgba(201,162,39,.02); }
  100% { box-shadow: 0 0 50px rgba(201,162,39,.1), 0 0 100px rgba(201,162,39,.04); }
}

.tc-chat-window.is-open {
  display: flex;
  animation: tcWindowIn .5s cubic-bezier(.22,1,.36,1);
}

@keyframes tcWindowIn {
  from { opacity: 0; transform: translateY(30px) scale(0.9); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ── Header — animated gradient + light streak ── */
.tc-chat-header {
  flex: 0 0 auto;
  background:
    linear-gradient(135deg, #b8922a 0%, var(--tc-primary) 40%, var(--tc-primary-dark) 100%);
  background-size: 200% 100%;
  animation: headerShimmer 6s ease-in-out infinite;
  color: var(--color-bg, #0a0a0a);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--tc-radius-window) var(--tc-radius-window) 0 0;
  position: relative; overflow: hidden;
}
@keyframes headerShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Moving light streak on header */
.tc-chat-header::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  animation: headerStreak 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes headerStreak {
  0%   { left: -60%; }
  100% { left: 160%; }
}

/* Header particle dots */
.tc-chat-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 1px, transparent 1px),
    radial-gradient(circle at 60% 70%, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.07) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 100% 100%;
  animation: headerDots 8s linear infinite;
  pointer-events: none;
}
@keyframes headerDots {
  0%   { transform: translateX(0); }
  100% { transform: translateX(20px); }
}

.tc-chat-header__avatar {
  position: relative; flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  border: none; padding: 2px;
}
/* Rotating gradient ring on avatar */
.tc-chat-header__avatar::before {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(255,255,255,.1),
    rgba(255,255,255,.9),
    rgba(248,220,120,1),
    rgba(255,255,255,.9),
    rgba(255,255,255,.1),
    rgba(248,220,120,.6),
    rgba(255,255,255,.1)
  );
  animation: avatarRingSpin 3s linear infinite;
  z-index: 0;
  filter: blur(.5px);
}
@keyframes avatarRingSpin {
  to { transform: rotate(360deg); }
}
.tc-chat-header__avatar::after {
  content: ''; position: absolute; inset: 2px;
  border-radius: 50%; background: var(--tc-primary-dark, #a68520);
  z-index: 0;
}
.tc-chat-header__avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  position: relative; z-index: 1;
}

.tc-chat-header__status {
  position: absolute; bottom: -1px; right: -1px;
  width: 13px; height: 13px;
  background: #22c55e; border-radius: 50%;
  border: 2.5px solid #a68520;
  z-index: 2;
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  50%      { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

.tc-chat-header__info { flex: 1; }
.tc-chat-header__name {
  font-family: var(--tc-font);
  font-size: 14px; font-weight: 700;
  display: block; line-height: 1.3;
  letter-spacing: .15em;
}
.tc-chat-header__subtitle {
  font-family: var(--tc-font);
  font-size: 11px; font-weight: 500; opacity: .75;
  letter-spacing: .04em;
}

.tc-ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,10,10,.7);
  border: 1px solid rgba(201,162,39,.25);
  border-radius: 20px; padding: 5px 12px;
  font-family: var(--tc-font);
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tc-primary, #c9a227);
  position: relative; overflow: hidden;
}
/* Shimmer sweep on badge */
.tc-ai-badge::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  animation: badgeShimmer 3s ease-in-out infinite;
}
@keyframes badgeShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
/* Live dot inside badge */
.tc-ai-badge svg { display: none; }
.tc-ai-badge::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,.6);
  animation: badgeDotPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes badgeDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

.tc-chat-header__close {
  width: 36px; height: 36px; min-width: 36px; min-height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.12); border: none; border-radius: 50%;
  cursor: pointer; color: var(--color-bg, #0a0a0a);
  transition: all .25s var(--tc-transition);
}
.tc-chat-header__close:hover {
  background: rgba(0,0,0,.3);
  transform: rotate(90deg);
}
.tc-chat-header__close svg {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2; fill: none;
}

/* ── Messages ── */
.tc-chat-messages {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,162,39,.03) 0%, transparent 60%),
    linear-gradient(180deg, rgba(14,14,14,1) 0%, rgba(10,10,10,1) 100%);
}
.tc-chat-messages::-webkit-scrollbar { width: 4px; }
.tc-chat-messages::-webkit-scrollbar-thumb { background: rgba(201,162,39,.15); border-radius: 2px; }
.tc-chat-messages::-webkit-scrollbar-track { background: transparent; }

.tc-msg {
  max-width: 85%;
  display: flex; flex-direction: column; gap: 4px;
  animation: tcMsgIn .4s cubic-bezier(.22,1,.36,1);
}
@keyframes tcMsgIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.tc-msg--bot  { align-self: flex-start; }
.tc-msg--user { align-self: flex-end; }

.tc-msg__bubble {
  padding: 14px 18px;
  border-radius: var(--tc-radius-msg);
  font-family: var(--tc-font);
  font-size: 14px; line-height: 1.65;
  word-wrap: break-word;
  transition: transform .2s, box-shadow .2s;
}
.tc-msg__bubble:hover {
  transform: translateY(-1px);
}

.tc-msg--bot .tc-msg__bubble {
  background: rgba(22,22,22,.85);
  backdrop-filter: blur(8px);
  color: var(--tc-text);
  border: 1px solid rgba(201,162,39,.06);
  border-bottom-left-radius: 6px;
}
.tc-msg--user .tc-msg__bubble {
  background: linear-gradient(135deg, var(--tc-user-msg-bg) 0%, #b8922a 100%);
  color: var(--tc-user-msg-text);
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 20px rgba(201,162,39,.2);
}

.tc-msg__time {
  font-size: 11px; color: var(--tc-text-muted);
  padding: 0 4px; font-variant-numeric: tabular-nums;
}
.tc-msg--user .tc-msg__time { text-align: right; }

/* ── Typing Indicator — glowing dots ── */
.tc-typing-indicator {
  flex: 0 0 auto;
  padding: 10px 20px;
  display: none; align-items: center; gap: 5px;
}
.tc-typing-indicator.is-visible { display: flex; }

.tc-typing-indicator span {
  width: 8px; height: 8px;
  background: var(--tc-primary);
  border-radius: 50%;
  animation: tcTypingPulse 1.4s infinite ease-in-out;
  box-shadow: 0 0 8px rgba(201,162,39,.4);
}
.tc-typing-indicator span:nth-child(2) { animation-delay: .2s; }
.tc-typing-indicator span:nth-child(3) { animation-delay: .4s; }

@keyframes tcTypingPulse {
  0%, 60%, 100% { transform: translateY(0) scale(1); opacity: .4; box-shadow: 0 0 4px rgba(201,162,39,.2); }
  30% { transform: translateY(-10px) scale(1.2); opacity: 1; box-shadow: 0 0 16px rgba(201,162,39,.6); }
}

/* ── Quick Reply Chips — hover glow ── */
.tc-quick-replies {
  flex: 0 0 auto;
  padding: 14px 18px 12px;
  display: none; flex-wrap: wrap; gap: 8px;
  max-height: 120px; overflow-y: auto;
  background: rgba(14,14,14,.9);
  border-top: 1px solid var(--tc-border);
}
.tc-quick-replies.is-visible { display: flex; }

.tc-chip {
  background: rgba(201,162,39,.06);
  border: 1px solid rgba(201,162,39,.15);
  color: var(--tc-text);
  border-radius: 9999px;
  padding: 7px 16px;
  font-family: var(--tc-font);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all .25s var(--tc-transition);
  white-space: nowrap;
  min-height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tc-chip:hover {
  background: var(--tc-primary);
  border-color: var(--tc-primary);
  color: var(--color-bg, #0a0a0a);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(201,162,39,.35);
}

/* ── Input Bar — glowing focus ── */
.tc-chat-input-bar {
  flex: 0 0 auto;
  border-top: 1px solid var(--tc-border);
  background: rgba(14,14,14,.95);
}

.tc-input-form {
  display: flex; align-items: center;
  padding: 14px 18px; gap: 10px;
}

.tc-input {
  flex: 1;
  border: 1.5px solid rgba(201,162,39,.12);
  border-radius: 9999px;
  padding: 12px 20px;
  font-size: 14px; font-family: var(--tc-font);
  outline: none;
  transition: all .35s var(--tc-transition);
  background: rgba(22,22,22,.6);
  color: var(--tc-text);
  min-height: 48px;
}
.tc-input::placeholder { color: var(--tc-text-muted); }
.tc-input:focus {
  border-color: var(--tc-primary);
  background: rgba(22,22,22,.9);
  box-shadow:
    0 0 0 3px rgba(201,162,39,.1),
    0 0 20px rgba(201,162,39,.1),
    inset 0 0 20px rgba(201,162,39,.03);
}

.tc-send-btn {
  width: 48px; height: 48px; min-width: 48px; min-height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tc-primary), var(--tc-primary-dark));
  color: var(--color-bg, #0a0a0a);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .25s var(--tc-transition);
  position: relative; overflow: hidden;
}
.tc-send-btn::after {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.15) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: btnShine 3s ease-in-out infinite;
}
@keyframes btnShine {
  0%, 100% { background-position: -100% -100%; }
  50%      { background-position: 200% 200%; }
}

.tc-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(201,162,39,.35);
}
.tc-send-btn:active { transform: scale(0.92); }
.tc-send-btn:disabled {
  background: rgba(201,162,39,.15);
  cursor: not-allowed; transform: none;
  box-shadow: none;
}
.tc-send-btn:disabled::after { display: none; }

.tc-send-btn svg {
  width: 20px; height: 20px;
  stroke: currentColor; stroke-width: 2; fill: none;
  position: relative; z-index: 1;
}

.tc-input.is-busy { opacity: .5; }

/* ── Footer — subtle ── */
.tc-chat-footer-brand {
  flex: 0 0 auto;
  padding: 10px 18px;
  text-align: center;
  border-top: 1px solid var(--tc-border);
  background: rgba(10,10,10,.95);
}
.tc-chat-footer-brand a {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--tc-font);
  font-size: 11px; font-weight: 500;
  color: var(--tc-text-muted);
  text-decoration: none;
  transition: color .2s, text-shadow .2s;
}
.tc-chat-footer-brand a:hover {
  color: var(--tc-primary);
  text-shadow: 0 0 12px rgba(201,162,39,.3);
}

/* ── Mobile Responsive ── */
@media (max-width: 480px) {
  .tc-chat-window {
    bottom: 0; right: 0; left: 0;
    width: 100%; max-width: 100%;
    height: 85dvh;
    height: calc(85dvh - env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    transform-origin: bottom center;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tc-launcher {
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(20px, env(safe-area-inset-right));
  }
  .tc-greeting {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(90px, calc(env(safe-area-inset-bottom) + 66px));
    max-width: calc(100vw - 32px);
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .tc-launcher, .tc-greeting, .tc-chat-window,
  .tc-msg, .tc-typing-indicator span, .tc-chip,
  .tc-send-btn, .tc-input, .tc-chat-header,
  .tc-launcher__icon--chat {
    animation: none !important;
    transition: none !important;
  }
}