@font-face {
  font-family: PesabyToner;
  src: url(/pesaby/chat-fonts/Switzer-Regular.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: PesabyToner;
  src: url(/pesaby/chat-fonts/Switzer-Medium.woff2) format('woff2');
  font-weight: 500;
  font-display: swap;
}
/* Toner chat proportions and palette, scoped to Pesaby's marketing widget. */
.pesaby-chat {
  --pc-green: #06c995;
  --pc-cyan: #1ba8cc;
  --pc-blue: #4b93ff;
  --pc-text: #495057;
  position: fixed;
  right: 135px;
  bottom: 0;
  z-index: 1050;
  width: 360px;
  max-width: calc(100vw - 24px);
  font:
    14px/1.5 PesabyToner,
    Arial,
    sans-serif;
  color: var(--pc-text);
  text-align: left;
  letter-spacing: normal;
}
.pesaby-chat * {
  box-sizing: border-box;
}
.pesaby-chat button,
.pesaby-chat input {
  font: inherit;
}
.pesaby-chat button {
  cursor: pointer;
}
.pesaby-chat button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.pesaby-chat [hidden] {
  display: none !important;
}
.pesaby-chat button:focus-visible,
.pesaby-chat a:focus-visible {
  outline: 2px solid #137caa;
  outline-offset: 3px;
}
.pesaby-chat input:focus,
.pesaby-chat input:focus-visible {
  outline: none;
  box-shadow: none !important;
  background: #e9eff4;
}
.pesaby-chat-launcher {
  display: block;
  margin-left: auto;
  width: 200px;
  min-height: 42px;
  background: #f06548;
  color: white;
  border: 0;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 5px 20px #878a9940;
  font-weight: 500 !important;
  transition: background 0.2s;
}
.pesaby-chat-launcher:hover {
  background: #d9563c;
}
.pesaby-chat-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 5px;
  border-radius: 50%;
  background: #fff;
  color: #d9563c;
  font-size: 11px;
}
.pesaby-chat-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows 0.35s ease,
    visibility 0.35s;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  filter: drop-shadow(0 5px 20px #878a9926);
}
.pesaby-chat.is-open .pesaby-chat-panel {
  grid-template-rows: 1fr;
  visibility: visible;
}
.pesaby-chat.is-open .pesaby-chat-launcher {
  visibility: hidden;
}
.pesaby-chat-shell {
  overflow: hidden;
  min-height: 0;
  background: #fff;
  border-radius: 4px 4px 0 0;
}
.pesaby-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  background: var(--pc-green);
  color: #fff;
  min-height: 60px;
}
.pesaby-chat-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  flex: 1;
  color: inherit;
  line-height: 1.5;
}
.pesaby-chat .pesaby-chat-close {
  border: 0;
  background: none;
  color: #d2fff0;
  font-size: 27px;
  line-height: 1;
  width: 24px;
  height: 26px;
  padding: 0;
  opacity: 0.75;
}
.pesaby-chat-close:hover {
  opacity: 1;
}
.pesaby-chat-bar {
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #eff2f7;
  font-size: 11px;
  color: #878a99;
}
.pesaby-chat-bar button {
  border: 0;
  background: none;
  color: #1684a3;
  padding: 3px 0;
  font-size: 11px;
}
.pesaby-chat-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  background: var(--pc-green);
  border-radius: 50%;
}
.pesaby-chat-resume {
  border: 0;
  background: #f3f9fb;
  color: #1684a3;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
}
.pesaby-chat-resume[hidden] {
  display: none;
}
.pesaby-chat-log {
  height: 280px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: #c6cbd2 transparent;
}
.pesaby-chat-messages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pesaby-chat-message {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  animation: pesaby-message-in 0.18s ease-out;
}
.pesaby-chat-avatar {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #4b93ff;
  color: #4b93ff;
  font-size: 14px;
  font-weight: 700;
}
.pesaby-chat-content {
  max-width: calc(100% - 40px);
  min-width: 0;
}
.pesaby-chat-bubble {
  padding: 12px 20px;
  border-radius: 3px;
  background: #f3f6f9;
  box-shadow: 0 5px 20px -6px #878a991a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pesaby-chat-bubble p {
  margin: 0;
  font: inherit;
  color: inherit;
}
.pesaby-chat-meta {
  font-size: 11px;
  color: #878a99;
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.pesaby-chat-message.is-visitor {
  justify-content: flex-end;
}
.pesaby-chat-message.is-visitor .pesaby-chat-content {
  max-width: 82%;
}
.pesaby-chat-message.is-visitor .pesaby-chat-bubble {
  background: rgba(75, 147, 255, 0.2);
  color: var(--pc-blue);
  text-align: right;
}
.pesaby-chat-message.is-visitor .pesaby-chat-meta {
  justify-content: flex-end;
}
.pesaby-chat-check {
  color: #06c995;
}
.pesaby-chat-message.is-system .pesaby-chat-bubble {
  font-size: 12px;
  background: #f8fafb;
  color: #717b87;
}
.pesaby-chat-message.is-system .pesaby-chat-avatar {
  border-color: #b3bdc7;
  color: #8795a5;
}
.pesaby-chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #878a99;
  padding: 13px 16px;
  font-size: 12px;
}
.pesaby-chat-typing i {
  height: 5px;
  width: 5px;
  background: #9aa6b2;
  border-radius: 50%;
  animation: pesaby-typing 1s infinite;
}
.pesaby-chat-typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.pesaby-chat-typing i:nth-child(3) {
  animation-delay: 0.3s;
}
.pesaby-chat-typing span {
  margin-left: 6px;
}
.pesaby-chat-composer {
  border-top: 1px dashed #e9ebec;
  padding: 16px;
  display: flex;
  gap: 8px;
  margin: 0 !important;
}
.pesaby-chat-input {
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 4px;
  background: #f3f6f9;
  color: #495057;
  height: 40px;
  padding: 10px 15px;
  box-shadow: none !important;
  font-size: 13px !important;
  width: 100%;
}
.pesaby-chat-input::placeholder {
  color: #495057;
  opacity: 1;
}
.pesaby-chat-send {
  flex: none;
  height: 40px;
  width: 46px;
  border: 0;
  background: var(--pc-cyan);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
}
.pesaby-chat-send:hover {
  background: #168daa;
}
.pesaby-chat-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.pesaby-chat-error {
  padding: 8px 16px 0;
  color: #b13a26;
  font-size: 12px;
  margin: 0;
}
.pesaby-chat-contact {
  border-top: 1px solid #eff2f7;
  padding: 12px 16px;
  margin: 0 !important;
  display: grid;
  gap: 8px;
}
.pesaby-chat-contact p {
  margin: 0;
  font-size: 12px;
}
.pesaby-chat-contact input {
  padding: 10px 12px;
  border: 0;
  border-radius: 4px;
  background: #f3f6f9;
  color: #495057;
  height: 40px;
  transition: background-color 0.2s;
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
.pesaby-chat-contact button {
  background: var(--pc-cyan);
  color: #fff;
  border: 0;
  border-radius: 3px;
  padding: 8px 12px;
  font-size: 12px;
}
.pesaby-chat-contact label {
  font-size: 12px;
}
.pesaby-chat-closed {
  padding: 12px 16px;
  font-size: 12px;
}
.pesaby-chat-closed button {
  border: 0;
  border-radius: 3px;
  background: var(--pc-cyan);
  color: white;
  padding: 8px 12px;
}
@keyframes pesaby-message-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pesaby-typing {
  0%,
  70%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
.pesaby-chat-privacy {
  font-size: 10px;
  line-height: 1.4;
  color: #878a99;
  margin: 0;
  padding: 5px 16px 8px;
}
.pesaby-chat-privacy a {
  color: #1684a3;
  text-decoration: underline;
}
@media (max-width: 991px) {
  .pesaby-chat {
    right: 20px;
  }
  .pesaby-chat-launcher {
    min-height: 44px;
  }
}
@media (max-width: 480px) {
  .pesaby-chat {
    right: 12px;
    width: 360px;
  }
  .pesaby-chat-log {
    height: min(280px, calc(100dvh - 250px));
  }
  .pesaby-chat-panel {
    max-height: calc(100dvh - 16px);
  }
  .pesaby-chat-contact {
    max-height: 190px;
    overflow: auto;
  }
  .pesaby-chat-input {
    font-size: 16px !important;
  }
  .pesaby-chat-launcher {
    width: 160px;
  }
  .pesaby-chat-header {
    padding: 14px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pesaby-chat-panel,
  .pesaby-chat-message,
  .pesaby-chat-typing i {
    transition: none;
    animation: none;
  }
}
