/* ==========================================================================
   TEH Assistant - Exact Reference Design with Google Fonts
   Headings: Plus Jakarta Sans | Body: Montserrat
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --teh-primary: #2563eb;
  --teh-primary-dark: #1d4ed8;
  --teh-bg-tint: #eff6ff;
  --teh-pill-bg: #e0f2fe;
  --teh-pill-text: #0369a1;
  --teh-bot-msg: #f1f5f9;
  --teh-text-dark: #0f172a;
  --teh-text-muted: #64748b;
  --teh-border: rgba(226, 232, 240, 0.8);
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   THEME & ELEMENTOR HARD CSS ISOLATION (ZERO LEAKAGE)
   Forces all chatbot buttons, links, inputs to resist Theme/Elementor overrides
   ========================================================================== */

#teh-chatbot-root,
#teh-chatbot-root *,
#teh-chatbot-root *::before,
#teh-chatbot-root *::after {
  box-sizing: border-box !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased;
}

#teh-chatbot-root a,
#teh-chatbot-root a:link,
#teh-chatbot-root a:visited,
#teh-chatbot-root a:active,
#teh-chatbot-root a:focus {
  text-decoration: none !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

#teh-chatbot-root button,
#teh-chatbot-root input[type="button"],
#teh-chatbot-root input[type="submit"],
#teh-chatbot-root input[type="reset"] {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: none;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  margin: 0;
}

/* Complete reset for all input text fields in the widget */
#teh-chatbot-root input,
#teh-chatbot-root input[type="text"],
#teh-chatbot-root input[type="tel"],
#teh-chatbot-root input[type="email"],
#teh-chatbot-root input[type="search"],
#teh-chatbot-root select,
#teh-chatbot-root textarea {
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, sans-serif) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0;
  max-width: 100%;
}

#teh-chatbot-root input:focus,
#teh-chatbot-root select:focus,
#teh-chatbot-root textarea:focus {
  outline: none !important;
  box-shadow: none !important;
}

#teh-chatbot-root form {
  margin: 0 !important;
  padding: 0 !important;
}

#teh-chatbot-root h1,
#teh-chatbot-root h2,
#teh-chatbot-root h3,
#teh-chatbot-root h4,
#teh-chatbot-root h5,
#teh-chatbot-root h6,
#teh-chatbot-root p {
  margin: 0;
  padding: 0;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Floating Launcher Button */
#teh-chatbot-root .teh-chat-launcher,
button.teh-chat-launcher {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: var(--teh-primary) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  z-index: 999999 !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-transform: none !important;
}

#teh-chatbot-root .teh-chat-launcher:hover,
button.teh-chat-launcher:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5) !important;
  background: var(--teh-primary) !important;
}

.teh-chat-launcher svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.teh-launcher-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

/* ==========================================================================
   Teaser Bubble / Tooltip (Exact Match to User Reference Image)
   ========================================================================== */
.teh-teaser-tooltip {
  position: fixed;
  bottom: 96px;
  right: 24px;
  background: #ffffff;
  border-radius: 18px;
  padding: 13px 38px 13px 18px;
  max-width: 280px;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.95);
  z-index: 999998;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--font-body);
}

.teh-teaser-tooltip.teh-teaser-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#teh-chatbot-root .teh-teaser-text,
#teh-chatbot-root p.teh-teaser-text,
.teh-teaser-text {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  padding: 0 !important;
  user-select: none !important;
}

#teh-chatbot-root .teh-teaser-close,
button.teh-teaser-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

#teh-chatbot-root .teh-teaser-close:hover,
button.teh-teaser-close:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.teh-teaser-close svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Downward speech bubble pointer tail pointing to the launcher button */
.teh-teaser-tooltip::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 26px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #ffffff;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.04));
}

/* Main Chat Window */
.teh-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 385px;
  height: 620px;
  max-height: calc(100vh - 120px);
  background: linear-gradient(180deg, var(--teh-bg-tint, #eff6ff) 0%, #ffffff 60%);
  border-radius: 28px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.teh-chat-window.teh-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Top Navigation Bar */
.teh-nav-bar {
  padding: 18px 22px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.teh-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.teh-logo-icon {
  display: flex;
  align-items: center;
}

.teh-nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

#teh-chatbot-root .teh-nav-btn,
button.teh-nav-btn {
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  padding: 6px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  transition: all 0.2s !important;
  width: 30px !important;
  height: 30px !important;
}

#teh-chatbot-root .teh-nav-btn:hover,
button.teh-nav-btn:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #1e293b !important;
}

.teh-nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Speaker Listen Button on Bot Messages */
.teh-msg-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

#teh-chatbot-root .teh-tts-btn,
button.teh-tts-btn {
  background: none !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  cursor: pointer !important;
  padding: 3px 8px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 11px !important;
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
  box-shadow: none !important;
  margin: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
}

#teh-chatbot-root .teh-tts-btn:hover,
button.teh-tts-btn:hover {
  color: var(--teh-primary) !important;
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

#teh-chatbot-root .teh-tts-btn.teh-speaking,
button.teh-tts-btn.teh-speaking {
  color: #dc2626 !important;
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  animation: teh-speak-pulse 1s infinite alternate;
}

@keyframes teh-speak-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.teh-tts-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   In-Chat Student Lead Capture Card
   ========================================================================== */
.teh-lead-card {
  background: #ffffff;
  border: 1.5px solid #e0f2fe;
  border-radius: 18px;
  padding: 18px 16px;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  font-family: var(--font-body);
  animation: teh-lead-fade 0.3s ease-out;
}

@keyframes teh-lead-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.teh-lead-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.teh-lead-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--teh-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.teh-lead-header h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.teh-lead-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.teh-lead-input-wrap {
  position: relative;
}

#teh-chatbot-root .teh-lead-input,
#teh-chatbot-root input.teh-lead-input,
#teh-chatbot-root select.teh-lead-input,
#teh-chatbot-root select.teh-lead-select,
#teh-chatbot-root input[type="text"].teh-lead-input,
#teh-chatbot-root input[type="tel"].teh-lead-input,
#teh-chatbot-root input[type="email"].teh-lead-input {
  width: 100% !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  font-size: 12.5px !important;
  font-family: var(--font-body) !important;
  color: #0f172a !important;
  outline: none !important;
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  transition: all 0.2s !important;
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  line-height: normal !important;
  box-shadow: none !important;
  text-transform: none !important;
  margin: 0 !important;
}

#teh-chatbot-root .teh-lead-input:focus,
#teh-chatbot-root select.teh-lead-input:focus,
#teh-chatbot-root input[type="text"].teh-lead-input:focus,
#teh-chatbot-root input[type="tel"].teh-lead-input:focus,
#teh-chatbot-root input[type="email"].teh-lead-input:focus {
  border-color: var(--teh-primary) !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

#teh-chatbot-root .teh-lead-submit-btn,
button.teh-lead-submit-btn {
  font-family: var(--font-heading) !important;
  background: var(--teh-primary) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
  transition: all 0.2s !important;
  margin-top: 4px !important;
  margin-bottom: 0 !important;
  width: 100% !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  outline: none !important;
}

#teh-chatbot-root .teh-lead-submit-btn:hover,
button.teh-lead-submit-btn:hover {
  background: var(--teh-primary-dark) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

#teh-chatbot-root .teh-lead-submit-btn:disabled,
button.teh-lead-submit-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.teh-lead-success-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 8px;
}

.teh-lead-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 32px !important;
}

/* 3-4 Chat Direct Human Counselor WhatsApp Banner */
.teh-wa-human-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.08);
  animation: teh-msg-appear 0.25s ease-out;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

.teh-wa-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.teh-wa-close-btn:hover {
  color: #ef4444;
  background: #f1f5f9;
}

.teh-wa-human-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 20px;
}

.teh-wa-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.teh-wa-header-text {
  flex: 1;
}

.teh-wa-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 3px;
}

.teh-wa-desc {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
}

#teh-chatbot-root a.teh-wa-human-btn,
#teh-chatbot-root .teh-wa-human-btn,
a.teh-wa-human-btn {
  background: #25d366 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--font-heading) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35) !important;
  transition: all 0.2s !important;
  box-sizing: border-box !important;
  width: 100% !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  outline: none !important;
  margin: 0 !important;
}

#teh-chatbot-root a.teh-wa-human-btn:hover,
#teh-chatbot-root .teh-wa-human-btn:hover,
a.teh-wa-human-btn:hover {
  background: #20bd5a !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45) !important;
}

/* Left Position Variant */
#teh-chatbot-root.teh-pos-left .teh-chat-launcher {
  right: auto;
  left: 24px;
}
#teh-chatbot-root.teh-pos-left .teh-chat-window {
  right: auto;
  left: 24px;
}
#teh-chatbot-root.teh-pos-left .teh-teaser-tooltip {
  right: auto;
  left: 24px;
}
#teh-chatbot-root.teh-pos-left .teh-teaser-tooltip::after {
  right: auto;
  left: 26px;
}

/* Chat Scrollable Body */
.teh-chat-body {
  flex: 1;
  padding: 10px 22px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  position: relative;
}

.teh-chat-body::-webkit-scrollbar {
  width: 5px;
}
.teh-chat-body::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.6);
  border-radius: 10px;
}

/* Hero Profile Section */
.teh-hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 10px 16px;
  margin-bottom: 6px;
}

/* Holographic / Iridescent 3D Sphere */
.teh-iridescent-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c4b5fd 0%, #93c5fd 35%, #6ee7b7 65%, #f472b6 90%);
  box-shadow: 0 8px 24px rgba(147, 197, 253, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.8), inset 0 -4px 8px rgba(0, 0, 0, 0.15);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  animation: teh-avatar-shimmer 6s infinite alternate ease-in-out;
}

.teh-iridescent-avatar::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 15%;
  width: 40%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
  transform: rotate(-30deg);
}

@keyframes teh-avatar-shimmer {
  0% { filter: hue-rotate(0deg) brightness(1); }
  100% { filter: hue-rotate(30deg) brightness(1.06); }
}

#teh-chatbot-root .teh-hero-title,
#teh-chatbot-root h2.teh-hero-title {
  font-family: var(--font-heading) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 6px !important;
  letter-spacing: -0.3px !important;
  line-height: 1.3 !important;
}

#teh-chatbot-root .teh-hero-desc,
#teh-chatbot-root p.teh-hero-desc {
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  color: #64748b !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  max-width: 290px !important;
}

#teh-chatbot-root .teh-date-divider {
  font-family: var(--font-heading) !important;
  text-align: center !important;
  margin: 14px 0 12px !important;
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
}

/* Messages Area */
.teh-messages-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teh-msg-row {
  display: flex;
  flex-direction: column;
  animation: teh-msg-appear 0.22s ease-out;
}

@keyframes teh-msg-appear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.teh-msg-row.teh-row-bot {
  align-self: flex-start;
  max-width: 86%;
}

.teh-msg-row.teh-row-user {
  align-self: flex-end;
  max-width: 84%;
}

.teh-msg-bubble {
  font-family: var(--font-body);
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
}

.teh-row-bot .teh-msg-bubble {
  background: #f1f5f9;
  color: #0f172a;
  border-top-left-radius: 4px;
}

.teh-row-user .teh-msg-bubble {
  background: var(--teh-primary);
  color: #ffffff;
  border-top-right-radius: 4px;
}

/* Action Button inside message */
#teh-chatbot-root a.teh-msg-action-btn,
#teh-chatbot-root .teh-msg-action-btn,
a.teh-msg-action-btn {
  font-family: var(--font-heading) !important;
  display: inline-block !important;
  margin-top: 10px !important;
  padding: 8px 16px !important;
  background: var(--teh-primary) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  border: none !important;
  transition: all 0.2s !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  outline: none !important;
}

#teh-chatbot-root a.teh-msg-action-btn:hover,
#teh-chatbot-root .teh-msg-action-btn:hover,
a.teh-msg-action-btn:hover {
  background: var(--teh-primary-dark) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

/* Suggestion Pills */
.teh-suggestions-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 6px;
}

#teh-chatbot-root .teh-suggest-pill,
#teh-chatbot-root button.teh-suggest-pill,
button.teh-suggest-pill {
  font-family: var(--font-heading) !important;
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid transparent !important;
  border-radius: 20px !important;
  padding: 9px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-align: left !important;
  outline: none !important;
  box-shadow: 0 1px 2px rgba(3, 105, 161, 0.05) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
  display: inline-block !important;
  margin: 0 !important;
}

#teh-chatbot-root .teh-suggest-pill:hover,
#teh-chatbot-root button.teh-suggest-pill:hover,
button.teh-suggest-pill:hover {
  background: #bae6fd !important;
  color: #0284c7 !important;
  transform: translateX(2px) !important;
}

/* Typing Indicator */
.teh-typing-bubble {
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 18px;
  border-top-left-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
}

.teh-typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: teh-dot-pulse 1.4s infinite ease-in-out both;
}

.teh-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.teh-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes teh-dot-pulse {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Bottom Input Area */
#teh-chatbot-root .teh-footer-container {
  padding: 12px 18px 8px !important;
  background: #ffffff !important;
  border-top: 1px solid rgba(241, 245, 249, 0.8) !important;
  box-sizing: border-box !important;
}

#teh-chatbot-root .teh-input-capsule,
#teh-chatbot-root form#tehChatForm,
.teh-input-capsule {
  display: flex !important;
  align-items: center !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 30px !important;
  padding: 4px 6px 4px 16px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  box-shadow: none !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#teh-chatbot-root .teh-input-capsule:focus-within,
#teh-chatbot-root form#tehChatForm:focus-within {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25) !important;
}

#teh-chatbot-root input.teh-text-input,
#teh-chatbot-root input#tehTextInput,
#teh-chatbot-root .teh-input-capsule input,
input#tehTextInput {
  font-family: var(--font-body) !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  border: none !important;
  border-width: 0 !important;
  outline: none !important;
  font-size: 13.5px !important;
  color: #0f172a !important;
  background: transparent !important;
  background-color: transparent !important;
  padding: 8px 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: unset !important;
  max-height: unset !important;
  line-height: normal !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

#teh-chatbot-root input.teh-text-input:focus,
#teh-chatbot-root input#tehTextInput:focus,
#teh-chatbot-root .teh-input-capsule input:focus,
input#tehTextInput:focus {
  border: none !important;
  border-width: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

#teh-chatbot-root input.teh-text-input::placeholder,
#teh-chatbot-root input#tehTextInput::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.teh-input-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

#teh-chatbot-root .teh-mic-btn,
button.teh-mic-btn {
  background: none !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  padding: 8px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s !important;
  box-shadow: none !important;
  margin: 0 !important;
}

#teh-chatbot-root .teh-mic-btn:hover,
button.teh-mic-btn:hover {
  color: var(--teh-primary) !important;
  background: #f1f5f9 !important;
}

#teh-chatbot-root .teh-mic-btn.teh-mic-active,
button.teh-mic-btn.teh-mic-active {
  color: #ef4444 !important;
  background: #fee2e2 !important;
  animation: teh-mic-pulse 1s infinite alternate;
}

@keyframes teh-mic-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

/* Live Audio Recording State & Equalizer Wave */
#teh-chatbot-root .teh-input-capsule.teh-capsule-recording {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
  background: #fef2f2 !important;
}

#teh-chatbot-root .teh-recording-wave {
  display: none !important;
  align-items: center !important;
  gap: 3px !important;
  height: 18px !important;
  margin-right: 6px !important;
}

#teh-chatbot-root .teh-recording-wave.teh-wave-active {
  display: flex !important;
}

#teh-chatbot-root .teh-recording-wave span {
  width: 3px !important;
  height: 100% !important;
  background-color: #ef4444 !important;
  border-radius: 3px !important;
  animation: teh-wave-anim 0.8s ease-in-out infinite alternate !important;
  display: inline-block !important;
}

#teh-chatbot-root .teh-recording-wave span:nth-child(1) { height: 6px !important; animation-delay: 0.1s !important; }
#teh-chatbot-root .teh-recording-wave span:nth-child(2) { height: 14px !important; animation-delay: 0.3s !important; }
#teh-chatbot-root .teh-recording-wave span:nth-child(3) { height: 18px !important; animation-delay: 0.2s !important; }
#teh-chatbot-root .teh-recording-wave span:nth-child(4) { height: 8px !important; animation-delay: 0.4s !important; }

@keyframes teh-wave-anim {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.teh-mic-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

#teh-chatbot-root .teh-up-send-btn,
button.teh-up-send-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #e2e8f0 !important;
  color: #64748b !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#teh-chatbot-root .teh-up-send-btn.teh-btn-active,
button.teh-up-send-btn.teh-btn-active {
  background: var(--teh-primary) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
}

.teh-up-send-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Spinner during processing */
.teh-spinner {
  animation: teh-spin 0.8s linear infinite;
  stroke: currentColor;
}

@keyframes teh-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.teh-input-capsule.teh-capsule-loading {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Powered by Footer */
.teh-powered-by {
  font-family: var(--font-heading);
  text-align: center;
  padding: 8px 0 6px;
  font-size: 11.5px;
  color: #94a3b8;
  background: #ffffff;
}

.teh-powered-by a {
  color: var(--teh-primary);
  text-decoration: none;
  font-weight: 600;
}

.teh-powered-by a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Reset Chat Confirmation Popup Modal (Inside Chat Window)
   ========================================================================== */
.teh-confirm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-in-out;
}

.teh-confirm-overlay.teh-modal-active {
  opacity: 1;
  pointer-events: auto;
}

.teh-confirm-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 22px;
  width: 100%;
  max-width: 310px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.92);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.teh-confirm-overlay.teh-modal-active .teh-confirm-box {
  transform: scale(1);
}

.teh-confirm-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--teh-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.teh-confirm-icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.teh-confirm-title {
  font-family: var(--font-heading);
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}

.teh-confirm-msg {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 18px;
}

.teh-confirm-actions {
  display: flex;
  gap: 10px;
}

#teh-chatbot-root .teh-btn-cancel,
button.teh-btn-cancel {
  flex: 1 !important;
  font-family: var(--font-heading) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #64748b !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  line-height: normal !important;
}

#teh-chatbot-root .teh-btn-cancel:hover,
button.teh-btn-cancel:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

#teh-chatbot-root .teh-btn-confirm,
button.teh-btn-confirm {
  flex: 1 !important;
  font-family: var(--font-heading) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  border: none !important;
  background: var(--teh-primary) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
  transition: all 0.2s !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
}

#teh-chatbot-root .teh-btn-confirm:hover,
button.teh-btn-confirm:hover {
  background: var(--teh-primary-dark) !important;
  transform: translateY(-1px) !important;
}

/* Mobile full view */
@media (max-width: 480px) {
  .teh-chat-window {
    width: 100%;
    height: 100%;
    max-height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  .teh-chat-launcher {
    bottom: 16px;
    right: 16px;
  }
}
