/* TishTush site chat widget (site-chat-2.css)
   Bubble bottom-right -> panel, in the site's dark/copper system.
   While the consent banner is open (body.tt-consent-open) the
   bubble and panel lift above it.
   site-chat-2.css (2026-10-30): layout-only fix — the panel is a
   <section> and the brand stylesheet pads every section, which
   squeezed the message list and left the bubble over the open
   panel. Same defect/fix as the Blue Ridge Daniela panel. */
.tt-chat-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(212, 148, 108, 0.65);
  background: #0e1217;
  color: #d4946c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  transition: bottom 0.2s ease, background 0.15s ease;
}
.tt-chat-bubble:hover { background: #151b22; }
.tt-chat-bubble svg { width: 26px; height: 26px; display: block; }
body.tt-consent-open .tt-chat-bubble { bottom: 96px; }

.tt-chat-panel {
  /* padding:0 is load-bearing: the panel is a <section>, and the
     brand stylesheet gives every section padding:76px 0 on phones
     (clamp(84px,11vw,150px) 0 on desktop) — without this the panel
     interior carried that dead space above the header and below
     the form, squeezing the message list to ~135px at phone width
     (defect found 2026-10-30). */
  padding: 0;
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 99990;
  width: 380px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100dvh - 120px);
  background: #0e1217;
  border: 1px solid rgba(212, 148, 108, 0.4);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f2ede8;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: bottom 0.2s ease;
}
body.tt-consent-open .tt-chat-panel { bottom: 164px; }
.tt-chat-panel[hidden] { display: none; }
.tt-chat-bubble[hidden] { display: none; }

.tt-chat-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(242, 237, 232, 0.09);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.tt-chat-head-text { flex: 1 1 auto; min-width: 0; }
.tt-chat-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tt-chat-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #a89f96;
}
.tt-chat-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #a89f96;
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 8px;
}
.tt-chat-close:hover { color: #f2ede8; background: rgba(242, 237, 232, 0.07); }

.tt-chat-msgs {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tt-chat-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.tt-chat-msg.tt-chat-bot {
  align-self: flex-start;
  background: #171d24;
  border: 1px solid rgba(242, 237, 232, 0.07);
  border-bottom-left-radius: 4px;
}
.tt-chat-msg.tt-chat-user {
  align-self: flex-end;
  background: rgba(212, 148, 108, 0.18);
  border: 1px solid rgba(212, 148, 108, 0.35);
  border-bottom-right-radius: 4px;
}
.tt-chat-msg a { color: #d4946c; text-decoration: underline; text-underline-offset: 2px; }
.tt-chat-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.tt-chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #a89f96; opacity: 0.35;
  animation: tt-chat-blink 1.2s infinite;
}
.tt-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.tt-chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tt-chat-blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

.tt-chat-escalation {
  padding: 9px 14px;
  border-top: 1px solid rgba(242, 237, 232, 0.09);
  font-size: 12.5px;
  line-height: 1.5;
  color: #a89f96;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.tt-chat-escalation a {
  color: #d4946c;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tt-chat-escalation a:hover { text-decoration: underline; text-underline-offset: 2px; }

.tt-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(242, 237, 232, 0.09);
}
.tt-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  background: #07090c;
  border: 1px solid rgba(242, 237, 232, 0.16);
  border-radius: 999px;
  color: #f2ede8;
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
}
.tt-chat-input:focus { border-color: rgba(212, 148, 108, 0.7); }
.tt-chat-input::placeholder { color: #7d766e; }
.tt-chat-send {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #d4946c;
  color: #14100d;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  flex: 0 0 auto;
}
.tt-chat-send:hover { background: #e0a87e; }
.tt-chat-send:disabled { opacity: 0.55; cursor: default; }

@media (max-width: 560px) {
  .tt-chat-bubble { right: 14px; bottom: 14px; }
  body.tt-consent-open .tt-chat-bubble { bottom: 128px; }
  .tt-chat-panel {
    right: 12px;
    bottom: 80px;
    height: 62dvh;
    max-height: calc(100dvh - 108px);
  }
  body.tt-consent-open .tt-chat-panel { bottom: 196px; max-height: calc(100dvh - 220px); }
}
