/* LIVE CHAT WIDGET — floating bottom-right launcher + panel, shared across every page */
.ih-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #0B7A75;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 12px 28px rgba(11, 122, 117, 0.35);
  cursor: pointer;
  z-index: 9000;
  transition: transform 0.2s ease, background 0.2s ease;
  border: none;
}

.ih-chat-launcher:hover {
  background: #095F5B;
  transform: translateY(-2px);
}

.ih-chat-launcher i {
  display: flex;
}

.ih-chat-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF5A5A;
  border: 2px solid #fff;
}

.ih-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 43, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9001;
  font-family: 'Roboto', sans-serif;
}

.ih-chat-panel[hidden] {
  display: none;
}

.ih-chat-header {
  background: #0B7A75;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.ih-chat-title {
  font-weight: 700;
  font-size: 15px;
}

.ih-chat-subtitle {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

.ih-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  position: relative;
}

.ih-chat-close,
.ih-chat-more {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.ih-chat-close:hover,
.ih-chat-more:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ih-chat-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 30px;
  background: #fff;
  border: 1px solid #E3EAE9;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 43, 42, 0.2);
  padding: 6px;
  min-width: 170px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 9002;
}

.ih-chat-more-menu.open {
  display: flex;
}

.ih-chat-more-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: none;
  color: #0F2B2A;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.ih-chat-more-menu button:hover {
  background: #E6F3F2;
}

.ih-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F6F9F8;
}

.ih-chat-date-divider {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #8B9694;
  margin: 4px 0;
}

.ih-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ih-chat-msg.user {
  align-items: flex-end;
}

.ih-chat-msg.bot {
  align-items: flex-start;
}

.ih-chat-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
}

.ih-chat-timestamp {
  font-size: 10.5px;
  color: #8B9694;
  padding: 0 4px;
}

.ih-chat-msg.bot .ih-chat-bubble {
  background: #fff;
  border: 1px solid #E3EAE9;
  color: #0F2B2A;
  border-bottom-left-radius: 4px;
}

.ih-chat-msg.user .ih-chat-bubble {
  background: #0B7A75;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ih-chat-bubble a {
  color: inherit;
  text-decoration: underline;
}

.ih-chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid #E3EAE9;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.ih-chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8B9694;
  animation: ihChatBlink 1.2s infinite ease-in-out;
}

.ih-chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.ih-chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ihChatBlink {

  0%,
  80%,
  100% {
    opacity: 0.3;
  }

  40% {
    opacity: 1;
  }
}

.ih-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #E3EAE9;
  flex-shrink: 0;
}

.ih-chat-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #0B7A75;
  background: #E6F3F2;
  color: #095F5B;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
}

.ih-chat-chip:hover {
  background: #0B7A75;
  color: #fff;
}

.ih-chat-composer {
  border-top: 1px solid #E3EAE9;
  padding: 10px 14px 12px;
  flex-shrink: 0;
}

.ih-chat-input {
  width: 100%;
  border: 1px solid #E3EAE9;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: 'Roboto', sans-serif;
  outline: none;
  resize: none;
  min-height: 40px;
  max-height: 90px;
  line-height: 1.4;
  display: block;
}

.ih-chat-input:focus {
  border-color: #0B7A75;
}

.ih-chat-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.ih-chat-tools-spacer {
  flex: 1;
}

.ih-chat-tool-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #5B6B69;
  font-size: 16px;
  border-radius: 8px;
  flex-shrink: 0;
  position: relative;
}

.ih-chat-tool-btn:hover {
  background: #E6F3F2;
  color: #0B7A75;
}

.ih-chat-tool-btn.recording {
  color: #E14141;
  background: #FDEAEA;
}

.ih-chat-tool-btn.recording i {
  animation: ihChatMicPulse 1s infinite;
}

@keyframes ihChatMicPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.ih-chat-rec-timer {
  font-size: 12px;
  font-weight: 700;
  color: #E14141;
  font-family: 'Roboto', sans-serif;
}

.ih-chat-emoji-wrap {
  position: relative;
  display: flex;
}

.ih-chat-emoji-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid #E3EAE9;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 43, 42, 0.2);
  padding: 8px;
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  width: 244px;
  z-index: 9002;
}

.ih-chat-emoji-picker.open {
  display: grid;
}

.ih-chat-emoji-picker button {
  border: none;
  background: none;
  font-size: 18px;
  padding: 5px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}

.ih-chat-emoji-picker button:hover {
  background: #E6F3F2;
}

.ih-chat-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0B7A75;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
}

.ih-chat-send:hover {
  background: #095F5B;
}

.ih-chat-audio-bubble audio {
  max-width: 220px;
  height: 36px;
}

@media (max-width: 480px) {
  .ih-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 88px;
  }

  .ih-chat-launcher {
    right: 16px;
    bottom: 16px;
  }
}
