/* ── Chat widget ─────────────────────────────────────────────────────────── */

#thc {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
}

/* Bubble pill button */
.thc-bubble {
  height: 48px;
  padding: 0 20px 0 16px;
  border-radius: 28px;
  background: #0C3D5C;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 20px rgba(12,61,92,.45), 0 1px 4px rgba(0,0,0,.15);
  transition: transform .18s, box-shadow .18s, background .18s;
  position: relative;
  white-space: nowrap;
}
.thc-bubble:hover {
  background: #164F76;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(12,61,92,.5);
}
.thc-bubble-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }
.thc-bubble-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
}

/* Pulse dot (replaces number badge) */
.thc-pulse {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E07000;
  border: 2px solid #fff;
}
.thc-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #E07000;
  animation: thcPulse 1.8s ease-out infinite;
}
@keyframes thcPulse {
  0%   { transform: scale(1); opacity: .8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Panel */
.thc-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 530px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 44px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.thc-panel--open {
  opacity: 1;
  transform: none;
  pointer-events: all;
}

/* Header */
.thc-head {
  position: relative;
  color: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

/* Photo banner */
.thc-head-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

/* Dark gradient over photo */
.thc-head-img::after { content: ''; }
.thc-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12,61,92,.25) 0%, rgba(12,61,92,.72) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Info row sits over the photo */
.thc-head-row {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
}

.thc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.7);
  flex-shrink: 0;
  background: #0C3D5C;
}
.thc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.thc-title { font-weight: 700; font-size: .92rem; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.thc-sub   { font-size: .72rem; opacity: .85; margin-top: 1px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

.thc-x {
  margin-left: auto;
  background: rgba(0,0,0,.25);
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: .85;
  padding: 5px;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 50%;
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
}
.thc-x:hover { opacity: 1; background: rgba(0,0,0,.45); }
.thc-x svg   { width: 16px; height: 16px; }

/* Messages area */
.thc-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

/* Welcome block */
.thc-welcome p {
  margin: 0 0 10px;
  color: #2a3a4a;
  line-height: 1.5;
  font-size: .9rem;
}
.thc-sugs       { display: flex; flex-wrap: wrap; gap: 6px; }
.thc-sug {
  background: #eef3f8;
  border: 1px solid #c8d8e8;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .8rem;
  cursor: pointer;
  color: #0C3D5C;
  transition: background .15s;
  font-family: inherit;
}
.thc-sug:hover { background: #d4e4f0; }

/* Message bubbles */
.thc-msg {
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 12px;
  line-height: 1.46;
  font-size: .88rem;
  word-break: break-word;
}
.thc-msg--user {
  background: #0C3D5C;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.thc-msg--bot {
  background: #f0f4f8;
  color: #1a2530;
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

/* Typing dots */
.thc-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px !important;
}
.thc-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a8aaa;
  animation: thcDot 1.2s infinite;
}
.thc-typing span:nth-child(2) { animation-delay: .18s; }
.thc-typing span:nth-child(3) { animation-delay: .36s; }

@keyframes thcDot {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-4px); }
}

/* Input row */
.thc-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 11px 13px;
  border-top: 1px solid #e2eaf0;
  flex-shrink: 0;
}
.thc-in {
  flex: 1;
  border: 1px solid #c8d8e8;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: .88rem;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.45;
  max-height: 110px;
  overflow-y: auto;
  color: #1a2530;
}
.thc-in:focus { border-color: #0C3D5C; }
.thc-in::placeholder { color: #94a8b8; }

.thc-send {
  width: 36px;
  height: 36px;
  background: #0C3D5C;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.thc-send:hover { background: #164F76; }
.thc-send svg   { width: 17px; height: 17px; }

/* Booking CTA link */
.thc-book {
  display: inline-block;
  margin-top: 8px;
  background: #E07000;
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .84rem;
  transition: background .15s;
}
.thc-book:hover { background: #c56000; }

/* Mobile */
@media (max-width: 420px) {
  #thc               { bottom: 14px; right: 14px; }
  .thc-panel         { width: calc(100vw - 28px); max-height: 480px; }
}

/* Lift chatbot above sticky CTA bar when it's visible on mobile */
@media (max-width: 640px) {
  body:has(.cta-bar.is-on) #thc {
    bottom: 80px;
    transition: bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
}
