/* Zuma support chat widget — namespaced under `zuma-` so it never clashes with site styles. */

.zuma-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: #00a651;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.zuma-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.zuma-fab:active {
  transform: scale(0.96);
}

.zuma-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid #fff;
}

.zuma-fab svg {
  width: 26px;
  height: 26px;
  display: block;
}

.zuma-panel {
  position: fixed;
  z-index: 2147483000;
  right: 20px;
  bottom: 88px;
  left: 12px;
  width: auto;
  height: min(70vh, 600px);
  max-height: 600px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.zuma-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (min-width: 480px) {
  .zuma-panel {
    left: auto;
    width: 380px;
  }
}

.zuma-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #00a651, #00893f);
  color: #fff;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.zuma-header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.zuma-header__avatar svg {
  width: 19px;
  height: 19px;
}

.zuma-header__text {
  min-width: 0;
  flex: 1;
}

.zuma-header__title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zuma-header__subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.25;
}

.zuma-header__close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.zuma-header__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.zuma-header__close svg {
  width: 16px;
  height: 16px;
}

.zuma-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  font-size: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.15);
}

.zuma-banner svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.zuma-offline-note {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: #6b7280;
  font-size: 11.5px;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.zuma-offline-note svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.zuma-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f4f6f5;
}

.zuma-intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px;
}

.zuma-intro p {
  margin: 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.45;
}

.zuma-intro__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zuma-intro__field label {
  font-size: 11.5px;
  font-weight: 600;
  color: #4b5563;
}

.zuma-intro__field input {
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #f9fafb;
  color: #111827;
}

.zuma-intro__field input:focus {
  border-color: #00a651;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.12);
}

.zuma-intro__actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.zuma-btn {
  border: none;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.zuma-btn--primary {
  background: #00a651;
  color: #fff;
  flex: 1;
}

.zuma-btn--primary:hover {
  background: #00913f;
}

.zuma-btn--ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.zuma-btn--ghost:hover {
  background: #f3f4f6;
}

.zuma-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 85%;
}

.zuma-msg--user {
  align-items: flex-end;
  align-self: flex-end;
}

.zuma-msg--bot,
.zuma-msg--admin {
  align-items: flex-start;
  align-self: flex-start;
}

.zuma-msg__label {
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  color: #00a651;
}

.zuma-msg--admin .zuma-msg__label {
  color: #dc2626;
}

.zuma-msg__bubble {
  border-radius: 16px;
  padding: 9px 12px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.zuma-msg__link {
  color: #00a651;
  font-weight: 600;
  text-decoration: underline;
  word-break: break-all;
}

.zuma-msg--user .zuma-msg__link {
  color: #fff;
}

.zuma-msg--user .zuma-msg__bubble {
  background: #00a651;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.zuma-msg--bot .zuma-msg__bubble {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

.zuma-msg--admin .zuma-msg__bubble {
  background: #fff;
  color: #111827;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-bottom-left-radius: 4px;
}

.zuma-msg__time {
  font-size: 10px;
  color: #9ca3af;
  padding: 0 4px;
}

.zuma-typing {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 2px;
}

.zuma-typing span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #9ca3af;
  animation: zuma-typing-bounce 1.1s infinite ease-in-out;
}

.zuma-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.zuma-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes zuma-typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.zuma-faq {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.zuma-faq__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8faf9;
}

.zuma-faq__title {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.zuma-faq__hide {
  border: none;
  background: transparent;
  color: #00a651;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.zuma-faq__hide:hover {
  text-decoration: underline;
}

.zuma-faq__list {
  max-height: 240px;
  overflow-y: auto;
}

.zuma-faq__cat {
  border-bottom: 1px solid #e5e7eb;
}

.zuma-faq__cat:last-child {
  border-bottom: none;
}

.zuma-faq__cat-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
}

.zuma-faq__cat-btn:hover {
  background: #f3f4f6;
}

.zuma-faq__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.zuma-faq__cat.is-open .zuma-faq__chevron {
  transform: rotate(225deg);
}

.zuma-faq__items {
  list-style: none;
  margin: 0;
  padding: 0 0 4px;
}

.zuma-faq__item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #111827;
  cursor: pointer;
  font-family: inherit;
}

.zuma-faq__item:hover {
  background: rgba(0, 166, 81, 0.08);
  color: #00a651;
}

.zuma-faq__item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.zuma-faq-toggle {
  align-self: flex-start;
  border: 1px solid rgba(0, 166, 81, 0.3);
  background: rgba(0, 166, 81, 0.06);
  color: #00a651;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.zuma-faq-toggle:hover {
  background: rgba(0, 166, 81, 0.12);
}

.zuma-composer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.zuma-composer__hint {
  margin: 0;
  padding: 0 2px;
  font-size: 10px;
  line-height: 1.35;
  color: #6b7280;
}

.zuma-composer__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zuma-composer input {
  flex: 1;
  border: none;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  color: #111827;
  min-width: 0;
}

.zuma-composer input:focus {
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.15);
  background: #fff;
}

.zuma-composer input:disabled {
  opacity: 0.6;
}

.zuma-send {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: #00a651;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.zuma-send:hover {
  background: #00913f;
}

.zuma-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.zuma-send svg {
  width: 16px;
  height: 16px;
}

.zuma-body::-webkit-scrollbar {
  width: 6px;
}

.zuma-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}
