/* Website help chat (owner request 2026-11-16) — chat.js. Self-contained:
   every class is prefixed idp-chat- so nothing on the pages is affected. */
.idp-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #15803d;
  color: #fff;
  font:
    700 15px/1 "Plus Jakarta Sans",
    system-ui,
    sans-serif;
  box-shadow: 0 8px 24px rgb(11 18 32 / 0.2);
  cursor: pointer;
}
.idp-chat-launcher:hover {
  background: #166534;
}
/* One-shot attention bounce shortly after load (owner request 2026-11-17). */
@keyframes idp-chat-launcher-bounce {
  0%,
  20% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-16px);
  }
  50% {
    transform: translateY(0);
  }
  62% {
    transform: translateY(-9px);
  }
  74% {
    transform: translateY(0);
  }
  84% {
    transform: translateY(-4px);
  }
  94%,
  100% {
    transform: translateY(0);
  }
}
.idp-chat-launcher--bounce {
  animation: idp-chat-launcher-bounce 1.4s ease-in-out 1.2s 1 both;
}
@media (prefers-reduced-motion: reduce) {
  .idp-chat-launcher--bounce {
    animation: none;
  }
}
.idp-chat-launcher span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.22);
  font-size: 13px;
}
.idp-chat-launcher[hidden],
.idp-chat[hidden],
.idp-chat-human[hidden],
.idp-chat-error[hidden] {
  display: none;
}
.idp-chat-launcher:focus-visible,
.idp-chat button:focus-visible,
.idp-chat a:focus-visible,
.idp-chat textarea:focus-visible,
.idp-chat input:focus-visible {
  outline: 2px solid #15803d;
  outline-offset: 2px;
}
.idp-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 40px));
  background: #fff;
  color: #0b1220;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgb(11 18 32 / 0.24);
  font:
    14px/1.45 "Plus Jakarta Sans",
    system-ui,
    sans-serif;
  overflow: hidden;
}
.idp-chat-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px 14px;
  background: #0b1220;
  color: #fff;
}
.idp-chat-sub {
  grid-column: 1;
  font-size: 12px;
  color: #cbd5e1;
}
.idp-chat-close {
  grid-column: 2;
  grid-row: 1 / span 2;
  border: 0;
  background: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}
.idp-chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.idp-chat-msg {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 88%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.idp-chat-msg.assistant {
  align-self: flex-start;
  background: #f6f8fb;
}
.idp-chat-msg.user {
  align-self: flex-end;
  background: #dcfce7;
}
.idp-chat-msg a {
  color: #15803d;
}
.idp-chat-typing {
  color: #5b6678;
  font-style: italic;
}
.idp-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 8px;
}
.idp-chat-trial,
.idp-chat-human,
.idp-chat-cancel {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font:
    600 13px/1.2 "Plus Jakarta Sans",
    system-ui,
    sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.idp-chat-trial.highlight {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}
.idp-chat-human.highlight {
  border-color: #15803d;
  color: #15803d;
  background: #dcfce7;
}
.idp-chat-input {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  align-items: flex-end;
}
.idp-chat-input textarea,
.idp-chat-contact input,
.idp-chat-contact textarea {
  flex: 1;
  resize: none;
  font:
    14px/1.4 "Plus Jakarta Sans",
    system-ui,
    sans-serif;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.idp-chat-send {
  border: 0;
  border-radius: 8px;
  background: #15803d;
  color: #fff;
  padding: 9px 14px;
  font:
    700 14px/1 "Plus Jakarta Sans",
    system-ui,
    sans-serif;
  cursor: pointer;
}
.idp-chat-send:disabled {
  opacity: 0.6;
  cursor: default;
}
.idp-chat-fine {
  font-size: 11px;
  color: #5b6678;
  margin: 6px 12px 10px;
}
.idp-chat-contact .idp-chat-fine {
  margin: 0;
}
.idp-chat-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.idp-chat-contact p {
  margin: 0;
}
.idp-chat-contact label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  font-size: 13px;
}
.idp-chat-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.idp-chat-row {
  display: flex;
  gap: 8px;
}
.idp-chat-error {
  color: #b3261e;
  font-size: 13px;
}
@media (max-width: 600px) {
  .idp-chat {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }
  .idp-chat-launcher {
    right: 12px;
    bottom: 12px;
  }
}
@media print {
  .idp-chat,
  .idp-chat-launcher {
    display: none;
  }
}
