.gida-live-chat-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: "Helvetica", "Arial", sans-serif;
}

.gida-chat-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(145deg, #1f2520, #2e3932);
  color: #fff;
  box-shadow: 0 16px 36px rgba(12, 16, 13, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 1;
  color: #ffffff !important;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Helvetica", "Arial", sans-serif;
  position: relative;
  isolation: isolate;
  transition: transform .25s ease, box-shadow .25s ease;
}

.gida-chat-fab-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gida-chat-fab-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: #ffffff;
}

.gida-chat-fab::before,
.gida-chat-fab::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(31, 37, 32, 0.22);
  z-index: -1;
  animation: gidaChatWave 2.2s ease-out infinite;
}

.gida-chat-fab::after {
  animation-delay: 1.1s;
}

.gida-chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(12, 16, 13, 0.4);
}

.gida-chat-window {
  width: min(330px, calc(100vw - 24px));
  height: min(460px, calc(100vh - 120px));
  position: absolute;
  right: 0;
  bottom: 74px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(31, 37, 32, 0.1);
  box-shadow: 0 24px 60px rgba(12, 16, 13, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.98);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

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

.gida-chat-header {
  background: linear-gradient(160deg, #151c18, #232d27);
  color: #fff;
  padding: 11px 12px 10px;
}

.gida-chat-head-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gida-chat-header h4 {
  margin: 0 0 3px;
  font-size: 14px;
  color: #ffffff !important;
}

.gida-chat-header p {
  margin: 0;
  font-size: 11px;
  opacity: .86;
  color: #ffffff !important;
}

.gida-chat-close {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.gida-chat-messages {
  flex: 1;
  overflow: auto;
  padding: 10px;
  background: #f7f8f7;
  display: grid;
  align-content: start;
  gap: 8px;
}

.gida-chat-msg {
  max-width: 84%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.gida-chat-msg.bot {
  justify-self: start;
  background: #fff;
  border: 1px solid rgba(31, 37, 32, 0.1);
}

.gida-chat-msg.user {
  justify-self: end;
  background: #1f2520;
  color: #fff;
}

.gida-chat-msg img {
  max-width: 220px;
  border-radius: 10px;
  display: block;
}

.gida-chat-typing {
  padding: 0 10px 6px;
  font-size: 11px;
  color: #5f6761;
  min-height: 18px;
}

.gida-chat-preform {
  padding: 10px;
  border-top: 1px solid rgba(31, 37, 32, 0.08);
  display: grid;
  gap: 8px;
  background: #fff;
}

.gida-chat-preform-title {
  margin: 0;
  font-size: 12px;
  color: #2d332e;
}

.gida-chat-preform input {
  border: 1px solid rgba(31, 37, 32, 0.16);
  border-radius: 10px;
  padding: 9px;
  font-size: 12px;
}

.gida-chat-preform button {
  border: 0;
  border-radius: 10px;
  background: #1f2520;
  color: #fff;
  padding: 10px 12px;
  font-size: 12px;
  cursor: pointer;
}

.gida-chat-form {
  padding: 8px;
  border-top: 1px solid rgba(31, 37, 32, 0.08);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: #fff;
}

.gida-chat-form input {
  border: 1px solid rgba(31, 37, 32, 0.16);
  border-radius: 10px;
  padding: 9px;
  font-size: 12px;
}

.gida-chat-form button {
  border: 0;
  border-radius: 10px;
  background: #1f2520;
  color: #fff;
  padding: 0 12px;
  font-size: 12px;
  cursor: pointer;
}

.gida-chat-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gida-chat-emoji-toggle {
  border: 0;
  border-radius: 8px;
  background: #eef4ff;
  cursor: pointer;
}

.gida-chat-image-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eef4ff;
  cursor: pointer;
}

.gida-chat-image-btn input {
  display: none;
}

.gida-chat-emoji-picker {
  border-top: 1px solid rgba(31, 37, 32, 0.08);
  padding: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gida-chat-emoji-picker button {
  border: 1px solid rgba(31, 37, 32, 0.16);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.gida-chat-auth {
  border: 1px solid rgba(31, 37, 32, 0.12);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  font-size: 12px;
}

.gida-chat-auth p {
  margin: 0 0 8px;
}

.gida-chat-auth-actions {
  display: flex;
  gap: 8px;
}

.gida-chat-auth-btn {
  text-decoration: none;
  border: 1px solid #1f2520;
  background: #1f2520;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.gida-chat-auth-btn.secondary {
  background: #fff;
  color: #1f2520;
}

@media (max-width: 640px) {
  .gida-live-chat-root {
    right: 12px;
    bottom: 12px;
  }
  .gida-chat-window {
    right: -2px;
    bottom: 68px;
    width: min(330px, calc(100vw - 12px));
    height: min(440px, calc(100vh - 98px));
  }
}

@keyframes gidaChatWave {
  0% {
    transform: scale(1);
    opacity: .55;
  }
  70% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}
