/* Tea & Silk · Private AI Travel Concierge Widget Styles */
.ts-concierge-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #18201c;
  color: #f7f3ea;
  border: 1px solid rgba(212, 175, 55, 0.75);
  padding: 8px 18px 8px 10px;
  border-radius: 40px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}
.ts-concierge-trigger:hover {
  background: #222d27;
  border-color: #d4af37;
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.65);
}
.ts-concierge-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.ts-concierge-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.6);
  display: block;
  object-fit: cover;
}
.ts-concierge-pulse {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  background: #25d366;
  border: 2px solid #18201c;
  border-radius: 50%;
  animation: tsPulse 2s infinite;
}
@keyframes tsPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.ts-concierge-label {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.ts-concierge-label strong {
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: normal;
  color: #f7f3ea;
  letter-spacing: 0.5px;
}
.ts-concierge-label small {
  font-size: 11px;
  color: #d4af37;
  letter-spacing: 0.3px;
}

/* Chat Drawer Box */
.ts-concierge-box {
  position: fixed;
  right: 24px;
  bottom: 84px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 550px;
  max-height: calc(100vh - 120px);
  background: #141b17;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.98);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ts-concierge-box.ts-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.ts-chat-header {
  background: #1c2621;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ts-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ts-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #d4af37;
}
.ts-header-text h4 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 15px;
  color: #f7f3ea;
  font-weight: normal;
  letter-spacing: 0.5px;
}
.ts-header-text span {
  display: block;
  font-size: 11px;
  color: #d4af37;
  margin-top: 2px;
}
.ts-close-btn {
  background: none;
  border: none;
  color: rgba(247, 243, 234, 0.6);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}
.ts-close-btn:hover {
  color: #f7f3ea;
}

/* Body */
.ts-chat-messages {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.ts-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}
.ts-msg.ts-agent {
  align-self: flex-start;
}
.ts-msg.ts-user {
  align-self: flex-end;
}
.ts-bubble {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.55;
}
.ts-msg.ts-agent .ts-bubble {
  background: #212c26;
  color: #f7f3ea;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-top-left-radius: 2px;
}
.ts-msg.ts-user .ts-bubble {
  background: #d4af37;
  color: #121815;
  font-weight: 500;
  border-top-right-radius: 2px;
}
.ts-msg-time {
  font-size: 10px;
  color: rgba(247, 243, 234, 0.4);
  margin-top: 4px;
}
.ts-msg.ts-user .ts-msg-time {
  text-align: right;
  color: rgba(212, 175, 55, 0.7);
}

/* Chips / Suggested Prompts */
.ts-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.ts-chip {
  background: rgba(33, 44, 38, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #f7f3ea;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ts-chip:hover {
  background: #28362f;
  border-color: #d4af37;
  color: #d4af37;
  transform: translateX(2px);
}

/* Call to Action buttons inside agent response */
.ts-action-group {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.ts-btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #fff;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.ts-btn-wa:hover { opacity: 0.9; }
.ts-btn-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.ts-btn-form:hover {
  background: #d4af37;
  color: #121815;
}

/* Lead Capture Card inside chat */
.ts-lead-card {
  background: #1c2621;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}
.ts-lead-card h5 {
  margin: 0 0 8px 0;
  font-family: Georgia, serif;
  color: #d4af37;
  font-size: 13px;
  font-weight: normal;
}
.ts-lead-card input {
  width: 100%;
  box-sizing: border-box;
  background: #141b17;
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #f7f3ea;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 8px;
  outline: none;
}
.ts-lead-card input:focus {
  border-color: #d4af37;
}
.ts-lead-card button {
  width: 100%;
  background: linear-gradient(135deg, #f5e197, #d4af37, #a8811b);
  border: none;
  color: #121815;
  font-weight: 600;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.ts-lead-card button:hover { opacity: 0.9; }

/* Typing indicator */
.ts-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: #212c26;
  border-radius: 10px;
  width: fit-content;
  border: 1px solid rgba(212, 175, 55, 0.15);
}
.ts-dot {
  width: 6px;
  height: 6px;
  background: #d4af37;
  border-radius: 50%;
  animation: tsBlink 1.4s infinite;
}
.ts-dot:nth-child(2) { animation-delay: 0.2s; }
.ts-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tsBlink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* Footer / Input Area */
.ts-chat-footer {
  padding: 12px;
  background: #18201c;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}
.ts-input-wrap {
  display: flex;
  gap: 8px;
}
.ts-input-wrap input {
  flex: 1;
  background: #141b17;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #f7f3ea;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.ts-input-wrap input:focus {
  border-color: #d4af37;
}
.ts-input-wrap button {
  background: #d4af37;
  border: none;
  color: #121815;
  padding: 0 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.ts-input-wrap button:hover { opacity: 0.88; }
.ts-footer-note {
  font-size: 10.5px;
  color: rgba(247, 243, 234, 0.45);
  text-align: center;
  margin-top: 8px;
}
.ts-footer-note a {
  color: #25d366;
  text-decoration: none;
}

@media (max-width: 480px) {
  .ts-concierge-trigger {
    right: 16px;
    bottom: 74px; /* above mobile sticky bar */
    padding: 7px 14px 7px 8px;
  }
  .ts-concierge-box {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 72px;
    height: 70vh;
  }
}
