.pk-chat-customer,
.pk-chat-customer *,
.pk-chat-customer *::before,
.pk-chat-customer *::after {
  box-sizing: border-box;
}

body.pk-chat-customer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.pk-chat-customer {
  --pk-chat-espresso: #21160f;
  --pk-chat-espresso-soft: #33231a;
  --pk-chat-paper: #fff9ef;
  --pk-chat-paper-soft: #f5ead9;
  --pk-chat-muted: #78695e;
  --pk-chat-tomato: #ef5b35;
  --pk-chat-tomato-dark: #c93d20;
  --pk-chat-lime: #dcea78;
  --pk-chat-line: rgba(33, 22, 15, .13);
  --pk-chat-danger: #b93824;
  position: fixed;
  inset: 0;
  z-index: 2140;
  pointer-events: none;
  color: var(--pk-chat-espresso);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.pk-chat-customer [hidden] {
  display: none !important;
}

.pk-chat-customer button,
.pk-chat-customer input,
.pk-chat-customer textarea {
  margin: 0;
  font: inherit;
}

.pk-chat-customer button {
  -webkit-tap-highlight-color: transparent;
}

.pk-chat-customer .pk-chat-launcher {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(255, 249, 239, .22);
  border-radius: 18px;
  color: var(--pk-chat-paper);
  background: var(--pk-chat-espresso);
  box-shadow: 0 15px 38px rgba(22, 13, 8, .28);
  cursor: pointer;
  pointer-events: auto;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.pk-chat-customer.pk-chat-has-cart .pk-chat-launcher,
.pk-chat-customer.pk-chat-has-mobile-dock .pk-chat-launcher {
  bottom: calc(88px + env(safe-area-inset-bottom));
}

.pk-chat-customer .pk-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 19px 45px rgba(22, 13, 8, .34);
}

.pk-chat-customer .pk-chat-launcher:focus-visible,
.pk-chat-customer .pk-chat-close:focus-visible,
.pk-chat-customer .pk-chat-send:focus-visible,
.pk-chat-customer .pk-chat-retry:focus-visible {
  outline: 3px solid rgba(220, 234, 120, .82);
  outline-offset: 3px;
}

.pk-chat-customer .pk-chat-launcher-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--pk-chat-lime);
}

.pk-chat-customer .pk-chat-launcher-icon .pk-chat-bubble-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pk-chat-customer .pk-chat-launcher-icon .pk-chat-bubble-dot {
  fill: var(--pk-chat-espresso);
}

.pk-chat-customer .pk-chat-launcher-label {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.pk-chat-customer .pk-chat-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border: 2px solid var(--pk-chat-paper);
  border-radius: 999px;
  color: #fff;
  background: var(--pk-chat-tomato);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.pk-chat-customer .pk-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: rgba(20, 12, 8, .52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  pointer-events: none;
  transition: opacity .22s ease;
}

.pk-chat-customer .pk-chat-dialog {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2;
  display: flex;
  width: min(420px, calc(100vw - 28px));
  height: min(690px, calc(100dvh - 36px));
  max-height: 780px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 26px;
  opacity: 0;
  color: var(--pk-chat-espresso);
  background: var(--pk-chat-paper);
  box-shadow: 0 28px 90px rgba(13, 7, 3, .36);
  pointer-events: none;
  transform: translateY(18px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease;
}

.pk-chat-customer.pk-chat-open .pk-chat-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.pk-chat-customer.pk-chat-open .pk-chat-dialog {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.pk-chat-customer.pk-chat-open .pk-chat-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.pk-chat-customer .pk-chat-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 58px 14px 16px;
  color: var(--pk-chat-paper);
  background:
    radial-gradient(150px 85px at 5% 0, rgba(239, 91, 53, .28), transparent 75%),
    var(--pk-chat-espresso);
}

.pk-chat-customer .pk-chat-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 14px;
  color: var(--pk-chat-espresso);
  background: var(--pk-chat-lime);
  font-size: 19px;
  font-weight: 900;
}

.pk-chat-customer .pk-chat-heading {
  min-width: 0;
}

.pk-chat-customer .pk-chat-title {
  margin: 0;
  color: inherit;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.pk-chat-customer .pk-chat-presence {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  color: rgba(255, 249, 239, .72);
  font-size: 12px;
}

.pk-chat-customer .pk-chat-presence-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pk-chat-lime);
  box-shadow: 0 0 0 4px rgba(220, 234, 120, .11);
}

.pk-chat-customer .pk-chat-close {
  position: absolute;
  top: 17px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  color: var(--pk-chat-paper);
  background: rgba(255, 255, 255, .09);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.pk-chat-customer .pk-chat-notice {
  margin: 0;
  padding: 9px 14px;
  color: #6a5617;
  border-bottom: 1px solid rgba(133, 111, 24, .18);
  background: #f4efca;
  font-size: 12px;
  font-weight: 700;
}

.pk-chat-customer .pk-chat-notice.pk-chat-notice-error {
  color: #812c1e;
  border-color: rgba(185, 56, 36, .18);
  background: #ffe2dc;
}

.pk-chat-customer .pk-chat-messages {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 15px 12px;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 15% 18%, rgba(220, 234, 120, .17) 0 2px, transparent 2.5px),
    linear-gradient(180deg, #fffaf2 0%, #f7eddf 100%);
  background-size: 31px 31px, auto;
}

.pk-chat-customer .pk-chat-empty {
  max-width: 300px;
  margin: auto;
  padding: 48px 14px 30px;
  text-align: center;
  color: var(--pk-chat-muted);
}

.pk-chat-customer .pk-chat-empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  border-radius: 18px;
  color: var(--pk-chat-espresso);
  background: var(--pk-chat-lime);
  font-size: 23px;
}

.pk-chat-customer .pk-chat-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--pk-chat-espresso);
  font-size: 15px;
}

.pk-chat-customer .pk-chat-empty p {
  margin: 0;
  font-size: 13px;
}

.pk-chat-customer .pk-chat-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 10px;
}

.pk-chat-customer .pk-chat-message.pk-chat-message-own {
  align-items: flex-end;
}

.pk-chat-customer .pk-chat-bubble {
  max-width: min(84%, 330px);
  padding: 10px 12px 8px;
  border: 1px solid var(--pk-chat-line);
  border-radius: 7px 17px 17px 17px;
  color: var(--pk-chat-espresso);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 16px rgba(33, 22, 15, .055);
}

.pk-chat-customer .pk-chat-message-own .pk-chat-bubble {
  border-color: rgba(131, 145, 47, .2);
  border-radius: 17px 7px 17px 17px;
  background: #e8efb2;
}

.pk-chat-customer .pk-chat-message-pending .pk-chat-bubble {
  opacity: .7;
}

.pk-chat-customer .pk-chat-message-author {
  display: block;
  margin-bottom: 3px;
  color: var(--pk-chat-tomato-dark);
  font-size: 11px;
  font-weight: 850;
}

.pk-chat-customer .pk-chat-message-body {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 14px;
}

.pk-chat-customer .pk-chat-message-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  color: rgba(33, 22, 15, .56);
  font-size: 10px;
}

.pk-chat-customer .pk-chat-loading {
  padding: 12px;
  text-align: center;
  color: var(--pk-chat-muted);
  font-size: 12px;
}

.pk-chat-customer .pk-chat-composer {
  flex: 0 0 auto;
  padding: 11px 12px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--pk-chat-line);
  background: var(--pk-chat-paper);
}

.pk-chat-customer .pk-chat-name-wrap {
  margin-bottom: 8px;
}

.pk-chat-customer .pk-chat-name-label {
  display: block;
  margin: 0 0 5px 2px;
  color: var(--pk-chat-muted);
  font-size: 11px;
  font-weight: 800;
}

.pk-chat-customer .pk-chat-name,
.pk-chat-customer .pk-chat-textarea {
  width: 100%;
  border: 1px solid rgba(33, 22, 15, .18);
  border-radius: 13px;
  outline: 0;
  color: var(--pk-chat-espresso);
  background: #fff;
  box-shadow: none;
}

.pk-chat-customer .pk-chat-name {
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
}

.pk-chat-customer .pk-chat-compose-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: end;
  gap: 8px;
}

.pk-chat-customer .pk-chat-textarea {
  min-height: 46px;
  max-height: 118px;
  resize: none;
  padding: 11px 12px;
  overflow-y: auto;
  line-height: 1.4;
  font-size: 14px;
}

.pk-chat-customer .pk-chat-name:focus,
.pk-chat-customer .pk-chat-textarea:focus {
  border-color: rgba(201, 61, 32, .58);
  box-shadow: 0 0 0 3px rgba(239, 91, 53, .12);
}

.pk-chat-customer .pk-chat-send {
  display: grid;
  place-items: center;
  width: 48px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--pk-chat-tomato);
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.pk-chat-customer .pk-chat-send:hover {
  background: var(--pk-chat-tomato-dark);
}

.pk-chat-customer .pk-chat-send:disabled,
.pk-chat-customer .pk-chat-name:disabled,
.pk-chat-customer .pk-chat-textarea:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.pk-chat-customer .pk-chat-help {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 2px 0;
  color: var(--pk-chat-muted);
  font-size: 10px;
}

.pk-chat-customer .pk-chat-retry {
  padding: 0;
  border: 0;
  color: var(--pk-chat-danger);
  background: transparent;
  cursor: pointer;
  font-size: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pk-chat-customer .pk-chat-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pk-chat-customer .pk-chat-beta-note {
  margin: 4px 2px 0;
  color: var(--pk-chat-muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

body.pk-chat-customer-open {
  overflow: hidden;
}

body.no-scroll .pk-chat-customer:not(.pk-chat-open) .pk-chat-launcher {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  .pk-chat-customer .pk-chat-launcher {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
    min-height: 48px;
    padding: 0 14px 0 11px;
    border-radius: 16px;
  }

  .pk-chat-customer.pk-chat-has-cart .pk-chat-launcher,
  .pk-chat-customer.pk-chat-has-mobile-dock .pk-chat-launcher {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .pk-chat-customer .pk-chat-dialog {
    right: 7px;
    bottom: max(7px, env(safe-area-inset-bottom));
    left: 7px;
    width: auto;
    height: calc(100dvh - 14px - env(safe-area-inset-bottom));
    max-height: none;
    border-radius: 24px;
    transform-origin: bottom center;
  }

  .pk-chat-customer .pk-chat-header {
    min-height: 72px;
    padding-block: 11px;
  }

  .pk-chat-customer .pk-chat-bubble {
    max-width: 88%;
  }
}

@media (max-width: 370px) {
  .pk-chat-customer .pk-chat-launcher-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .pk-chat-customer .pk-chat-launcher {
    width: 48px;
    padding: 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-chat-customer .pk-chat-launcher,
  .pk-chat-customer .pk-chat-backdrop,
  .pk-chat-customer .pk-chat-dialog {
    transition: none;
  }

  .pk-chat-customer .pk-chat-messages {
    scroll-behavior: auto;
  }
}
