/* Campaign AI Guide — floating mock chat */
.activation-chat {
  position: fixed;
  z-index: 1110;
  bottom: 0;
  right: 0;
  pointer-events: none;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.activation-chat * {
  box-sizing: border-box;
}

.activation-chat__launcher-wrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
  padding-right: max(0px, env(safe-area-inset-right));
  z-index: 1110;
}

.activation-chat__launcher-wrap.is-chat-open .activation-chat__launcher {
  display: none !important;
}

@media (min-width: 640px) {
  .activation-chat__launcher-wrap.is-chat-open {
    width: min(430px, calc(100vw - 48px));
    height: min(700px, calc(100dvh - 48px));
    max-height: calc(100dvh - 48px);
  }
}

.activation-chat__launcher {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  pointer-events: auto;
  flex-shrink: 0;
  padding: 8px;
}

.activation-chat__launcher img {
  width: 56px;
  height: 56px;
  border-radius: 0;
  object-fit: contain;
}

.activation-chat__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: auto;
  top: auto;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  pointer-events: auto;
}

.activation-chat__panel.is-open {
  display: flex;
  animation: activation-chat-slide-up 0.28s ease;
}

.activation-chat__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  background: #212529;
  color: #fff;
  min-width: 0;
  overflow: hidden;
}

.activation-chat__header .activation-chat__title,
.activation-chat__header h2.activation-chat__title {
  margin: 0;
  font-family: Raleway, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff !important;
}

.activation-chat__header .activation-chat__subtitle,
.activation-chat__header p.activation-chat__subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88) !important;
}

.activation-chat__header-logo {
  border-radius: 50%;
  flex-shrink: 0;
  background: #fff;
  padding: 2px;
}

.activation-chat__header-text {
  flex: 1;
  min-width: 0;
}

.activation-chat__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.activation-chat__demo-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #045bc1;
  color: #fff;
}

.activation-chat__close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}

.activation-chat__close:hover {
  color: #fff;
}

.activation-chat__close:focus-visible {
  outline: 2px solid #045bc1;
  outline-offset: 2px;
}

.activation-chat__thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  background: #f8f9fa;
  -webkit-overflow-scrolling: touch;
}

.activation-chat__home-extras,
.activation-chat__actions,
.activation-chat__builder,
.activation-chat__contact-options {
  max-width: 100%;
  overflow-x: hidden;
}

.activation-chat__bubble-wrap {
  margin-bottom: 12px;
}

.activation-chat__bubble {
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.activation-chat__bubble--bot {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  color: #212529;
}

.activation-chat__bubble--user {
  margin-left: auto;
  background: #045bc1;
  color: #fff;
}

.activation-chat__typing {
  font-size: 13px;
  color: #6c757d;
  padding: 4px 0 8px;
}

.activation-chat__section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6c757d;
  margin: 8px 0 10px;
}

.activation-chat__format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.activation-chat__format-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  padding: 10px;
  min-height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.activation-chat__format-card:hover,
.activation-chat__format-card:focus-visible {
  border-color: #045bc1;
  box-shadow: 0 2px 8px rgba(4, 91, 193, 0.12);
  outline: none;
}

.activation-chat__format-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: #045bc1;
}

.activation-chat__format-icon svg {
  width: 100%;
  height: 100%;
}

.activation-chat__format-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.activation-chat__format-text strong {
  font-size: 12px;
  line-height: 1.25;
  color: #212529;
}

.activation-chat__format-text span {
  font-size: 11px;
  line-height: 1.3;
  color: #6c757d;
}

.activation-chat__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.activation-chat__btn--block {
  width: 100%;
  margin-top: 6px;
}

.activation-chat__btn--primary {
  background: #045bc1;
  color: #fff;
  border-color: #045bc1;
}

.activation-chat__btn--primary:hover {
  background: #034a9e;
}

.activation-chat__btn--secondary {
  background: #fff;
  color: #045bc1;
  border-color: rgba(4, 91, 193, 0.35);
}

.activation-chat__btn--link {
  background: transparent;
  color: #045bc1;
  border: none;
  width: 100%;
  margin-top: 4px;
  font-weight: 600;
}

.activation-chat__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.activation-chat__footer {
  flex-shrink: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  min-height: 0;
}

.activation-chat__back {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid rgba(4, 91, 193, 0.3);
  border-radius: 8px;
  background: #fff;
  color: #045bc1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.activation-chat__back:hover {
  background: rgba(4, 91, 193, 0.06);
}

.activation-chat__back:focus-visible {
  outline: 2px solid #045bc1;
  outline-offset: 2px;
}

.activation-chat__composer {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 24px;
  padding: 4px 4px 4px 14px;
}

.activation-chat__composer-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  min-height: 40px;
  outline: none;
}

.activation-chat__composer-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(4, 91, 193, 0.15);
  color: #045bc1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activation-chat__composer-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.activation-chat__composer-send:not(:disabled):hover {
  background: rgba(4, 91, 193, 0.25);
}

.activation-chat__demo-note {
  margin: 8px 0 0;
  font-size: 11px;
  color: #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.activation-chat__builder-progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.activation-chat__builder-progress span {
  display: block;
  height: 100%;
  background: #045bc1;
  transition: width 0.25s ease;
}

.activation-chat__builder-question {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
}

.activation-chat__builder-options,
.activation-chat__builder-multi {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activation-chat__builder-opt {
  text-align: left;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.activation-chat__builder-opt.is-selected,
.activation-chat__builder-opt:hover {
  border-color: #045bc1;
  background: rgba(4, 91, 193, 0.06);
}

.activation-chat__direction-body {
  font-size: 14px;
  line-height: 1.55;
}

.activation-chat__direction-disclaimer {
  font-size: 12px;
  color: #6c757d;
  margin-top: 10px;
}

.activation-chat__brief-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #495057;
}

.activation-chat__input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  font-size: 14px;
}

.activation-chat__brief-boundary,
.activation-chat__brief-intro {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 10px;
}

.activation-chat__brief-summary pre {
  white-space: pre-wrap;
  font-size: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px;
  border-radius: 8px;
  max-height: 200px;
  overflow: auto;
}

.activation-chat__contact-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

body.activation-chat-open .language-switcher {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 639px) {
  html.activation-chat-mobile-open,
  body.activation-chat-mobile-open {
    overflow: hidden !important;
    overscroll-behavior: none;
    height: 100%;
  }

  body.activation-chat-mobile-open {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
  }

  .activation-chat.is-mobile-open {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    z-index: 1200;
    pointer-events: none;
  }

  .activation-chat__launcher-wrap {
    right: 16px;
    bottom: 16px;
    left: auto;
    top: auto;
    padding: 0;
    z-index: 1200;
  }

  .activation-chat__launcher-wrap.is-chat-open {
    position: fixed;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
    pointer-events: none;
  }

  .activation-chat__panel.is-open {
    position: fixed;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    pointer-events: auto;
    z-index: 1201;
  }

  .activation-chat__header {
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: calc(12px + env(safe-area-inset-left, 0px));
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
  }

  .activation-chat__header-logo {
    width: 32px;
    height: 32px;
  }

  .activation-chat__header .activation-chat__title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .activation-chat__header .activation-chat__subtitle {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .activation-chat__title-row {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .activation-chat__demo-badge {
    flex-shrink: 0;
    font-size: 9px;
  }

  .activation-chat__close {
    min-width: 40px;
    min-height: 40px;
    padding: 6px;
  }

  .activation-chat__thread {
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px 12px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .activation-chat__bubble {
    font-size: 13px;
    line-height: 1.45;
    padding: 10px 12px;
  }

  .activation-chat__section-label {
    font-size: 10px;
    margin: 4px 0 8px;
  }

  .activation-chat__footer {
    flex: 0 0 auto;
    padding: 8px 12px;
    padding-left: calc(12px + env(safe-area-inset-left, 0px));
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .activation-chat__back {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 6px;
  }

  .activation-chat__composer-input {
    font-size: 16px;
    min-height: 36px;
  }

  .activation-chat__demo-note {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.2;
  }

  .activation-chat__format-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .activation-chat__format-card {
    padding: 8px 10px;
  }

  .activation-chat__format-text strong {
    font-size: 13px;
  }

  .activation-chat__format-text span {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activation-chat__panel.is-open,
  .activation-chat__launcher {
    animation: none;
    transition: none;
  }
}

@keyframes activation-chat-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes activation-chat-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
