.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: #ffffff;
  background: #022260;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(1, 22, 56, 0.28);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.chat-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 55px rgba(1, 22, 56, 0.34);
}
.chat-launcher span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}
.chat-launcher strong {
  font-size: 14px;
}
.chat-launcher i {
  width: 9px;
  height: 9px;
  background: #1f65e8;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.chat-invite {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 119;
  width: min(360px, calc(100vw - 48px));
  padding: 18px;
  background: #ffffff;
  border: 1px solid #dde3ec;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(1, 22, 56, 0.16);
  animation: chatRise 0.4s ease;
}
.chat-invite p {
  margin: 0;
  color: #596579;
  font-size: 14px;
}
.chat-invite p + p { margin-top: 8px; }
.chat-invite strong { color: #101828; }
.chat-invite div {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.chat-invite button {
  flex: 1;
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid #dde3ec;
  background: #ffffff;
  color: #022260;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chat-invite button:first-child {
  color: #ffffff;
  background: #022260;
  border-color: #022260;
}

.campaign-desk {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 121;
  width: min(410px, calc(100vw - 48px));
  max-height: min(620px, calc(100vh - 128px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dde3ec;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(1, 22, 56, 0.22);
  animation: chatRise 0.35s ease;
}
.campaign-desk.is-auto-open {
  animation: chatPopOpen 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.campaign-desk[hidden],
.chat-invite[hidden] { display: none; }
.campaign-desk header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  color: #ffffff;
  background: #022260;
}
.campaign-desk h2 {
  margin: 0;
  color: #ffffff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
}
.campaign-desk header p,
.campaign-desk header span {
  display: block;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}
.campaign-desk header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}
.chat-body {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  overflow-y: auto;
}
.chat-msg {
  max-width: 92%;
  padding: 12px 13px;
  background: #f5f7fa;
  border: 1px solid #dde3ec;
  border-radius: 12px;
  color: #344054;
  font-size: 14px;
}
.chat-msg.user {
  justify-self: end;
  color: #ffffff;
  background: #022260;
  border-color: #022260;
}
.chat-options {
  display: grid;
  gap: 8px;
}
.chat-options button,
.chat-input-row button {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dde3ec;
  border-radius: 10px;
  background: #ffffff;
  color: #022260;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.chat-options button:hover,
.chat-input-row button:hover {
  background: #eaf1ff;
}
.chat-input-row {
  display: grid;
  gap: 8px;
}
.chat-input-row input,
.chat-input-row textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dde3ec;
  border-radius: 10px;
  resize: vertical;
}
.chat-consent {
  display: flex;
  gap: 8px;
  color: #596579;
  font-size: 13px;
}
.chat-error {
  color: #b42318;
  font-size: 13px;
}
@keyframes chatRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes chatPopOpen {
  0% { opacity: 0; transform: translateY(22px) scale(0.92); }
  65% { opacity: 1; transform: translateY(-3px) scale(1.015); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .chat-launcher {
    right: 16px;
    bottom: 16px;
    width: 54px;
    padding: 0;
    justify-content: center;
  }
  .chat-launcher strong { display: none; }
  .chat-invite {
    right: 16px;
    bottom: 84px;
    width: calc(100vw - 32px);
  }
  .campaign-desk {
    right: 16px;
    left: 16px;
    bottom: 84px;
    width: auto;
    max-height: calc(100vh - 118px);
  }
}
