#tp-chat-root {
  --tp-navy: #203d65;
  --tp-navy-deep: #172f4f;
  --tp-orange: #e56f3d;
  --tp-paper: #fffdf8;
  --tp-line: #e2d9cc;
  --tp-muted: #73808f;
  color: #263d59;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
}

#tp-chat-root,
#tp-chat-root * {
  box-sizing: border-box;
}

.tp-chat-launcher {
  align-items: center;
  background: var(--tp-navy);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(20, 44, 74, 0.28);
  color: #fff;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  gap: 9px;
  margin-left: auto;
  min-height: 52px;
  padding: 0 18px 0 13px;
  position: relative;
}

.tp-chat-launcher:hover {
  background: var(--tp-navy-deep);
}

.tp-chat-launcher:focus-visible,
.tp-chat-close:focus-visible,
.tp-chat-primary:focus-visible,
.tp-chat-delete:focus-visible,
#tp-chat-root input:focus-visible,
#tp-chat-root textarea:focus-visible {
  outline: 3px solid rgba(229, 111, 61, 0.35);
  outline-offset: 2px;
}

.tp-chat-launcher-icon {
  align-items: center;
  background: var(--tp-orange);
  border-radius: 50%;
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.tp-chat-launcher-icon svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.tp-chat-unread {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--tp-orange);
  display: flex;
  font-size: 10px;
  height: 19px;
  justify-content: center;
  min-width: 19px;
  padding: 0 5px;
  position: absolute;
  right: -2px;
  top: -4px;
}

.tp-chat-panel {
  background: var(--tp-paper);
  border: 1px solid var(--tp-line);
  border-radius: 18px;
  bottom: 66px;
  box-shadow: 0 24px 70px rgba(18, 37, 61, 0.24);
  display: flex;
  flex-direction: column;
  max-height: min(690px, calc(100vh - 110px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(380px, calc(100vw - 28px));
}

.tp-chat-panel[hidden],
.tp-chat-form[hidden],
.tp-chat-conversation[hidden],
.tp-chat-error[hidden],
.tp-chat-unread[hidden] {
  display: none;
}

.tp-chat-header {
  align-items: center;
  background: var(--tp-navy);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 17px 18px;
}

.tp-chat-header strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.tp-chat-status {
  color: #b8dece;
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: 4px;
  text-transform: uppercase;
}

.tp-chat-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.09);
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 23px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.tp-chat-body {
  min-height: 0;
  overflow-y: auto;
}

.tp-chat-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.tp-chat-intro {
  color: var(--tp-muted);
  font-size: 13px;
  margin: 0 0 2px;
}

.tp-chat-form label {
  display: grid;
  gap: 6px;
}

.tp-chat-form label > span {
  color: #55657a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tp-chat-form input,
.tp-chat-form textarea,
.tp-chat-composer textarea {
  background: #fff;
  border: 1px solid #d8cfc2;
  border-radius: 10px;
  color: #263d59;
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

.tp-chat-form textarea {
  min-height: 88px;
}

.tp-chat-form .tp-chat-consent {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 17px minmax(0, 1fr);
}

.tp-chat-consent input {
  accent-color: var(--tp-orange);
  height: 16px;
  margin: 2px 0 0;
  min-height: 0;
  width: 16px;
}

.tp-chat-consent span {
  color: #667384;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.55;
  text-transform: none;
}

.tp-chat-consent a {
  color: var(--tp-navy);
  text-decoration: underline;
}

.tp-chat-primary {
  background: var(--tp-orange);
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  min-height: 43px;
  padding: 10px 16px;
}

.tp-chat-primary:hover {
  filter: brightness(0.94);
}

.tp-chat-primary:disabled {
  cursor: wait;
  opacity: 0.58;
}

.tp-chat-error {
  background: #fff0ed;
  border-radius: 9px;
  color: #a7473d;
  font-size: 11px;
  margin: 0;
  padding: 9px 11px;
}

.tp-chat-conversation {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tp-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 455px;
  min-height: 280px;
  overflow-y: auto;
  padding: 18px;
  scroll-behavior: smooth;
}

.tp-chat-message {
  align-self: flex-start;
  max-width: 86%;
}

.tp-chat-message-visitor {
  align-self: flex-end;
}

.tp-chat-message p {
  background: #fff;
  border: 1px solid var(--tp-line);
  border-radius: 13px 13px 13px 4px;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.tp-chat-message-visitor p {
  background: var(--tp-navy);
  border-color: var(--tp-navy);
  border-radius: 13px 13px 4px 13px;
  color: #fff;
}

.tp-chat-message-label {
  color: #8a929d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding-left: 4px;
  text-transform: uppercase;
}

.tp-chat-composer {
  background: #f6f1e8;
  border-top: 1px solid var(--tp-line);
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
}

.tp-chat-composer textarea {
  max-height: 120px;
  min-height: 42px;
  resize: none;
}

.tp-chat-composer .tp-chat-primary {
  align-self: stretch;
  padding: 10px 14px;
}

.tp-chat-attach {
  align-self: stretch;
  background: #fff;
  border: 1px solid #d8cfc2;
  border-radius: 9px;
  color: #315f8e;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  min-height: 42px;
  width: 42px;
}

.tp-chat-pending {
  background: #f6f1e8;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 12px 0;
}

.tp-chat-pending[hidden] {
  display: none;
}

.tp-chat-pending-item {
  align-items: center;
  background: #fff;
  border: 1px solid #ded5c8;
  border-radius: 8px;
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  max-width: 210px;
  padding: 6px 8px;
}

.tp-chat-pending-item span {
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-chat-pending-item button {
  background: none;
  border: 0;
  color: #a7473d;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.tp-chat-media-frame {
  overflow: hidden;
  border: 1px solid var(--tp-line);
  border-radius: 13px;
  background: #fff;
}

.tp-chat-media {
  display: block;
  max-height: 260px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.tp-chat-footer {
  background: #f6f1e8;
  padding: 0 12px 10px;
  text-align: right;
}

.tp-chat-delete {
  background: none;
  border: 0;
  color: #9b6258;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  padding: 3px;
  text-decoration: underline;
}

@media (max-width: 520px) {
  #tp-chat-root {
    bottom: max(14px, env(safe-area-inset-bottom));
    right: 14px;
  }

  .tp-chat-launcher {
    min-height: 50px;
    padding-right: 15px;
  }

  .tp-chat-panel {
    bottom: 62px;
    max-height: calc(100vh - 88px);
    width: calc(100vw - 28px);
  }

  .tp-chat-messages {
    max-height: calc(100vh - 345px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tp-chat-messages {
    scroll-behavior: auto;
  }
}
