.matubot-widget,
.matubot-widget * {
  box-sizing: border-box;
}

.matubot-widget {
  --matubot-cyan: #00aeef;
  --matubot-magenta: #ec008c;
  --matubot-yellow: #f4cf00;
  --matubot-ink: #0b1737;
  --matubot-muted: #667085;
  --matubot-border: #dfe5ed;
  position: fixed;
  z-index: 70;
  right: 24px;
  bottom: 22px;
  color: var(--matubot-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

@media (min-width: 768px) {
  body.matu-has-floating-whatsapp .matubot-widget {
    right: 92px;
  }
}

.matubot-widget[hidden],
.matubot-panel[hidden],
.matubot-teaser[hidden],
.matubot-suggestions[hidden] {
  display: none !important;
}

.matubot-launcher {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding: 3px;
  overflow: hidden;
  cursor: pointer;
  appearance: none;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 50%;
  box-shadow: 0 16px 45px rgba(11, 23, 55, .24), 0 0 0 4px rgba(255, 255, 255, .78);
  transition: transform .2s ease, box-shadow .2s ease;
}

.matubot-launcher::before {
  position: absolute;
  z-index: 0;
  inset: -3px;
  content: "";
  background: conic-gradient(from 210deg, var(--matubot-cyan), var(--matubot-magenta), var(--matubot-yellow), var(--matubot-cyan));
}

.matubot-launcher::after {
  position: absolute;
  z-index: 1;
  inset: 3px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.matubot-launcher:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 50px rgba(11, 23, 55, .3), 0 0 0 5px rgba(255, 255, 255, .84);
}

.matubot-launcher:focus-visible,
.matubot-close:focus-visible,
.matubot-quick-button:focus-visible,
.matubot-related-button:focus-visible,
.matubot-suggestion:focus-visible,
.matubot-send:focus-visible,
.matubot-input:focus-visible {
  outline: 3px solid rgba(0, 174, 239, .32);
  outline-offset: 2px;
}

.matubot-launcher img {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.matubot-status {
  position: absolute;
  z-index: 3;
  right: 4px;
  bottom: 6px;
  width: 14px;
  height: 14px;
  background: #25c870;
  border: 3px solid #fff;
  border-radius: 50%;
}

.matubot-teaser {
  position: absolute;
  right: 96px;
  bottom: 14px;
  width: 258px;
  padding: 13px 38px 13px 15px;
  color: var(--matubot-ink);
  background: #fff;
  border: 1px solid var(--matubot-border);
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(11, 23, 55, .18);
  animation: matubot-in .28s ease-out both;
}

.matubot-teaser::after {
  position: absolute;
  right: -7px;
  bottom: 21px;
  width: 14px;
  height: 14px;
  content: "";
  background: #fff;
  border-top: 1px solid var(--matubot-border);
  border-right: 1px solid var(--matubot-border);
  transform: rotate(45deg);
}

.matubot-teaser strong,
.matubot-teaser span {
  display: block;
}

.matubot-teaser strong {
  margin-bottom: 2px;
  font-size: 13px;
}

.matubot-teaser span {
  color: var(--matubot-muted);
  font-size: 12px;
}

.matubot-teaser-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  color: #657087;
  cursor: pointer;
  background: #f4f6f9;
  border: 0;
  border-radius: 50%;
}

.matubot-panel {
  position: absolute;
  right: 0;
  bottom: 98px;
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100vw - 32px));
  max-height: min(690px, calc(100dvh - 132px));
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .13);
  border-radius: 24px;
  box-shadow: 0 28px 72px rgba(11, 23, 55, .28);
  animation: matubot-panel-in .25s ease-out both;
}

.matubot-panel::before {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--matubot-cyan) 0 34%, var(--matubot-magenta) 34% 68%, var(--matubot-yellow) 68% 100%);
}

.matubot-header {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 14px 14px 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--matubot-border);
}

.matubot-header-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #e5e9ef;
  border-radius: 18px;
}

.matubot-heading strong,
.matubot-heading span {
  display: block;
}

.matubot-heading strong {
  margin-bottom: 3px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.matubot-heading span {
  color: #637087;
  font-size: 12px;
}

.matubot-online {
  display: inline-flex !important;
  gap: 5px;
  align-items: center;
}

.matubot-online::before {
  width: 7px;
  height: 7px;
  content: "";
  background: #25c870;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(37, 200, 112, .12);
}

.matubot-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #526078;
  cursor: pointer;
  background: #f3f5f8;
  border: 1px solid #e2e7ee;
  border-radius: 50%;
  transition: color .18s ease, background .18s ease;
}

.matubot-close:hover {
  color: #0b1737;
  background: #e9eef4;
}

.matubot-messages {
  min-height: 210px;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 174, 239, .06), transparent 28%),
    radial-gradient(circle at 88% 92%, rgba(236, 0, 140, .05), transparent 30%),
    #f7f9fc;
  scrollbar-color: #c7d0dc transparent;
  scrollbar-width: thin;
}

.matubot-message {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.matubot-message.is-user {
  justify-content: flex-end;
}

.matubot-message-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #dfe5ed;
  border-radius: 50%;
}

.matubot-bubble {
  max-width: 84%;
  padding: 10px 12px;
  color: #18243d;
  white-space: pre-line;
  overflow-wrap: anywhere;
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 15px 15px 15px 4px;
  box-shadow: 0 5px 16px rgba(36, 50, 78, .06);
  font-size: 13px;
}

.matubot-message.is-user .matubot-bubble {
  color: #fff;
  background: linear-gradient(135deg, #087eb1, #00a7e5);
  border-color: transparent;
  border-radius: 15px 15px 4px 15px;
}

.matubot-bubble strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.matubot-bubble small {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  color: #647188;
  border-top: 1px solid #e8edf2;
  font-size: 11px;
  line-height: 1.5;
}

.matubot-bubble a {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin-top: 8px;
  color: #007ead;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.matubot-bubble a:hover {
  text-decoration: underline;
}

.matubot-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 18px;
}

.matubot-typing i {
  width: 6px;
  height: 6px;
  background: #7d8aa0;
  border-radius: 50%;
  animation: matubot-dot 1s infinite ease-in-out;
}

.matubot-typing i:nth-child(2) { animation-delay: .14s; }
.matubot-typing i:nth-child(3) { animation-delay: .28s; }

.matubot-related {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 12px 38px;
}

.matubot-related-button {
  padding: 6px 9px;
  color: #46546c;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dce3eb;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.matubot-related-button:hover {
  color: #007ead;
  border-color: #9edcf3;
}

.matubot-quick-actions {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid var(--matubot-border);
}

.matubot-quick-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 43px;
  padding: 6px 10px 6px 7px;
  color: #26344d;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dfe5ed;
  border-radius: 12px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.matubot-quick-button:hover {
  border-color: #a9dff3;
  box-shadow: 0 7px 18px rgba(0, 126, 174, .08);
  transform: translateY(-1px);
}

.matubot-quick-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #007ead;
  background: #e9f8fe;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 900;
}

.matubot-quick-button:nth-child(2) .matubot-quick-icon {
  color: #c40073;
  background: #fff0f8;
}

.matubot-quick-button:nth-child(3) .matubot-quick-icon {
  color: #8a7000;
  background: #fff9d8;
}

.matubot-quick-button span:not(.matubot-quick-icon) {
  font-size: 12px;
  font-weight: 750;
}

.matubot-quick-arrow {
  color: #8a96a8;
  font-size: 16px;
}

.matubot-form-wrap {
  position: relative;
  padding: 11px 12px 9px;
  background: #fff;
  border-top: 1px solid var(--matubot-border);
}

.matubot-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 43px;
  gap: 7px;
  align-items: end;
}

.matubot-input {
  width: 100%;
  min-height: 43px;
  max-height: 96px;
  padding: 11px 13px;
  color: #17233d;
  resize: none;
  background: #f7f9fc;
  border: 1px solid #dce3eb;
  border-radius: 13px;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
}

.matubot-input::placeholder {
  color: #8b96a7;
}

.matubot-input:focus {
  background: #fff;
  border-color: var(--matubot-cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, .1);
  outline: none;
}

.matubot-send {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #0098d1, #00aeef);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(0, 152, 209, .22);
}

.matubot-send:disabled {
  cursor: wait;
  opacity: .55;
}

.matubot-note {
  display: block;
  margin-top: 7px;
  color: #7d8899;
  text-align: center;
  font-size: 9px;
  line-height: 1.35;
}

.matubot-suggestions {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: calc(100% - 2px);
  left: 12px;
  padding: 5px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce3eb;
  border-radius: 13px;
  box-shadow: 0 15px 34px rgba(11, 23, 55, .18);
}

.matubot-suggestion {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  color: #334159;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 11px;
}

.matubot-suggestion:hover,
.matubot-suggestion.is-active {
  color: #007ead;
  background: #eefaff;
}

.matubot-suggestion::before {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  content: "";
  background: linear-gradient(135deg, var(--matubot-cyan), var(--matubot-magenta));
  border-radius: 50%;
}

@keyframes matubot-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes matubot-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes matubot-dot {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 640px) {
  .matubot-widget {
    right: 12px;
    bottom: 12px;
  }

  .matubot-launcher {
    width: 66px;
    height: 66px;
  }

  .matubot-launcher img {
    width: 58px;
    height: 58px;
  }

  .matubot-panel {
    position: fixed;
    right: 10px;
    bottom: 87px;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 102px);
    border-radius: 20px;
  }

  .matubot-header {
    grid-template-columns: 56px minmax(0, 1fr) 36px;
    min-height: 80px;
    padding: 11px 11px 10px 13px;
  }

  .matubot-header-image {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }

  .matubot-heading strong { font-size: 16px; }
  .matubot-heading span { font-size: 11px; }
  .matubot-messages { min-height: 170px; padding: 13px; }
  .matubot-quick-actions { padding: 9px 11px; }
  .matubot-quick-button { min-height: 39px; }
  .matubot-form-wrap { padding: 9px 10px 7px; }
  .matubot-teaser { right: 78px; bottom: 7px; width: min(245px, calc(100vw - 105px)); }
  .matubot-bubble { max-width: 88%; }
}

@media (max-height: 650px) and (min-width: 641px) {
  .matubot-panel { max-height: calc(100dvh - 112px); }
  .matubot-header { min-height: 76px; }
  .matubot-header-image { width: 52px; height: 52px; }
  .matubot-quick-button { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .matubot-panel,
  .matubot-teaser,
  .matubot-launcher,
  .matubot-quick-button,
  .matubot-typing i {
    animation: none !important;
    transition: none !important;
  }
}
