.groomai-virtual-admin {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99990;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24352c;
}

.groomai-chat-launcher {
  min-width: 228px;
  padding: 10px 15px 10px 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 18px 18px 18px 7px;
  background: #245b45;
  color: #fff;
  box-shadow: 0 18px 48px rgba(24, 53, 40, .28);
  cursor: pointer;
  text-align: left;
}

.groomai-chat-launcher.is-open {
  transform: translateY(-4px);
}

.groomai-chat-launcher__mark,
.groomai-chat-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 14px 14px 14px 5px;
  overflow: hidden;
  background: #fff;
  color: #245b45;
  font-size: 17px;
  font-weight: 950;
  object-fit: cover;
}

.groomai-chat-launcher > span:last-child {
  display: grid;
  gap: 2px;
}

.groomai-chat-launcher strong {
  font-size: 13px;
}

.groomai-chat-launcher small {
  color: rgba(255, 255, 255, .76);
  font-size: 9px;
}

.groomai-chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(390px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 120px));
  display: none;
  grid-template-rows: auto 1fr auto auto auto;
  overflow: hidden;
  border: 1px solid #dbe5df;
  border-radius: 24px 24px 24px 8px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(20, 36, 28, .28);
}

.groomai-chat-panel.is-open {
  display: grid;
}

.groomai-chat-header {
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5ebe7;
  background: linear-gradient(145deg, #edf7f1, #fffaf0);
}

.groomai-chat-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.groomai-chat-header > div > div {
  display: grid;
  gap: 2px;
}

.groomai-chat-header strong {
  font-size: 13px;
}

.groomai-chat-header small {
  color: #708078;
  font-size: 9px;
}

.groomai-chat-avatar {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  background: #f6eee7;
  color: #245b45;
  object-fit: cover;
}

.groomai-chat-header > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .7);
  color: #53645b;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.groomai-chat-messages {
  min-height: 0;
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 12% 5%, rgba(218, 238, 226, .65), transparent 29%),
    #fbfdfc;
}

.groomai-chat-message {
  width: 84%;
  padding: 11px 13px;
  align-self: flex-start;
  border: 1px solid #dde6e0;
  border-radius: 14px 14px 14px 5px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(28, 44, 36, .04);
}

.groomai-chat-message--customer {
  align-self: flex-end;
  border-color: #c8dfd1;
  border-radius: 14px 14px 5px 14px;
  background: #eaf5ef;
}

.groomai-chat-message--staff {
  border-color: #ccdaeb;
  background: #f0f6fd;
}

.groomai-chat-message--system {
  width: auto;
  max-width: 90%;
  align-self: center;
  border: 0;
  background: #f0f2f1;
  box-shadow: none;
  text-align: center;
}

.groomai-chat-message > span {
  display: block;
  margin-bottom: 4px;
  color: #74817a;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.groomai-chat-message p {
  margin: 0;
  color: #2d3f35;
  font-size: 12px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.groomai-chat-message button {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 0;
  border-radius: 10px;
  background: #245b45;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.groomai-chat-loading,
.groomai-chat-empty {
  margin: auto;
  padding: 28px;
  color: #718078;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.groomai-chat-compose {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-top: 1px solid #e4eae6;
  background: #fff;
}

.groomai-chat-compose textarea {
  min-height: 48px;
  max-height: 120px;
  padding: 10px 11px;
  border: 1px solid #d7e0db;
  border-radius: 11px;
  resize: none;
  color: #293b31;
  font: inherit;
  font-size: 12px;
}

.groomai-chat-compose textarea:focus {
  border-color: #2c7558;
  box-shadow: 0 0 0 3px rgba(44, 117, 88, .1);
  outline: none;
}

.groomai-chat-compose button,
.groomai-chat-resolved button {
  min-width: 68px;
  border: 0;
  border-radius: 11px;
  background: #245b45;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.groomai-chat-compose button:disabled,
.groomai-chat-compose textarea:disabled {
  cursor: wait;
  opacity: .55;
}

.groomai-chat-error {
  margin: 0 12px 10px;
  padding: 9px 11px;
  border: 1px solid #edcbc5;
  border-radius: 10px;
  background: #fff1ef;
  color: #8a342a;
  font-size: 10px;
  line-height: 1.5;
}

.groomai-chat-resolved {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e4eae6;
  color: #6f7c75;
  font-size: 10px;
}

.groomai-chat-resolved button {
  min-height: 36px;
  padding: 0 12px;
}

.groomai-chat-panel > footer {
  padding: 8px 12px;
  border-top: 1px solid #edf0ee;
  background: #fafbfa;
  color: #89938e;
  font-size: 8px;
  text-align: center;
}

@media (max-width: 520px) {
  .groomai-virtual-admin {
    right: 14px;
    bottom: 14px;
  }

  .groomai-chat-launcher {
    min-width: 0;
  }

  .groomai-chat-launcher > span:last-child {
    display: none;
  }

  .groomai-chat-panel {
    position: fixed;
    inset: 12px;
    width: auto;
    height: auto;
    border-radius: 22px;
  }
}
