.pm-assistant {
  --assistant-lift: 0px;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5150;
  transform: translateY(calc(-1 * var(--assistant-lift)));
  transition: transform .18s ease;
}

.pm-assistant [hidden] { display: none !important; }

.pm-assistant-launcher {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 14px 6px 7px;
  border: 2px solid #fff;
  border-radius: 30px;
  background: linear-gradient(135deg, #123d70, #1967b3);
  color: #fff;
  box-shadow: 0 9px 28px rgba(12, 54, 99, .38);
  cursor: pointer;
}

.pm-assistant-launcher:hover,
.pm-assistant-launcher:focus-visible,
.pm-assistant.is-open .pm-assistant-launcher {
  background: linear-gradient(135deg, #0d315d, #145493);
}

.pm-assistant-launcher-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: #fff;
  color: #145493;
  font-size: 21px;
  box-shadow: inset 0 0 0 3px rgba(20, 84, 147, .12);
}

.pm-assistant-launcher strong { font-size: 14px; white-space: nowrap; }

.pm-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(440px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(.98);
  border: 1px solid #cbd9e8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(13, 49, 93, .28);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}

.pm-assistant.is-open .pm-assistant-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.pm-assistant-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  background: linear-gradient(135deg, #123d70, #1967b3);
  color: #fff;
}

.pm-assistant-header div { display: grid; gap: 2px; }
.pm-assistant-header strong { font-size: 16px; }
.pm-assistant-header span { color: #dceeff; font-size: 11px; }
.pm-assistant-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.pm-assistant-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
}

.pm-assistant-intro {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px 12px 12px 3px;
  background: #edf5fc;
  color: #173b60;
  font-weight: 700;
  line-height: 1.4;
}

.pm-assistant-menu { display: grid; gap: 8px; }
.pm-assistant-message-form {
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid #b9d2e8;
  border-radius: 14px;
  background: #f5faff;
}
.pm-assistant-message-label {
  color: #173b60;
  font-size: 13px;
  font-weight: 850;
}
.pm-assistant-message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}
.pm-assistant-message-row textarea {
  min-width: 0;
  width: 100%;
  min-height: 88px;
  max-height: 180px;
  box-sizing: border-box;
  padding: 11px;
  border: 1px solid #9ebbd6;
  border-radius: 9px;
  background: #fff;
  color: #172b3c;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}
.pm-assistant-message-row textarea:focus {
  border-color: #1967b3;
  outline: 3px solid rgba(25, 103, 179, .16);
}
.pm-assistant-send {
  justify-self: end;
  min-width: 132px;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: #1967b3;
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.pm-assistant-message-help {
  color: #65798c;
  font-size: 11px;
  line-height: 1.3;
}
.pm-assistant-quick-label {
  margin: 4px 0 0;
  color: #5b6f82;
  font-size: 12px;
  font-weight: 750;
}
.pm-assistant-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.pm-assistant-quick-actions button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #d7e2ee;
  border-radius: 12px;
  background: #fff;
  color: #173b60;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.pm-assistant-quick-actions button:hover { border-color: #1967b3; background: #f5faff; }

.pm-assistant-view h3 { margin: 8px 0 12px; color: #173b60; font-size: 17px; }
.pm-assistant-back {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #1967b3;
  font-weight: 800;
}
.pm-assistant-view label { display: grid; gap: 5px; color: #263d53; font-size: 13px; font-weight: 750; }
.pm-assistant-view input,
.pm-assistant-view textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid #bacbdd;
  border-radius: 9px;
  background: #fff;
  color: #172b3c;
  font: inherit;
}
.pm-assistant-view input:focus,
.pm-assistant-view textarea:focus { border-color: #1967b3; outline: 3px solid rgba(25, 103, 179, .16); }
.pm-assistant-inline-form { display: grid; grid-template-columns: 1fr 46px; gap: 7px; }
.pm-assistant-inline-form button,
.pm-assistant-primary {
  border: 0;
  border-radius: 9px;
  background: #1967b3;
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.pm-assistant-inline-form button { font-size: 25px; }
.pm-assistant-primary { min-height: 43px; padding: 9px 14px; }
.pm-assistant-stacked-form { display: grid; gap: 11px; }
.pm-assistant-consent { grid-template-columns: 20px 1fr !important; align-items: start; font-weight: 600 !important; line-height: 1.35; }
.pm-assistant-consent input { width: 17px; margin-top: 2px; }
.pm-assistant-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }

.pm-assistant-output {
  margin-top: 12px;
  color: #233c52;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pm-assistant-menu-output:not(:empty) {
  min-height: 72px;
  font-size: 14px;
}
.pm-assistant-output:empty { display: none; }
.pm-assistant-status {
  padding: 10px 12px;
  border: 1px solid #c8dced;
  border-radius: 10px;
  background: #f4f9fd;
}
.pm-assistant-status.is-error { border-color: #efb4b4; background: #fff4f4; color: #8b1f1f; }
.pm-assistant-status.is-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: #9fc6e8;
  background: #eaf5ff;
  color: #123d70;
  font-weight: 800;
}
.pm-assistant-spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  box-sizing: border-box;
  border: 3px solid rgba(25, 103, 179, .22);
  border-top-color: #1967b3;
  border-radius: 50%;
  animation: pm-assistant-spin .8s linear infinite;
}
@keyframes pm-assistant-spin { to { transform: rotate(360deg); } }
.pm-assistant button:disabled,
.pm-assistant input:disabled,
.pm-assistant textarea:disabled {
  cursor: wait;
  opacity: .68;
}
.pm-assistant-product-list { display: grid; gap: 9px; }
.pm-assistant-product {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid #d7e2ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(20, 65, 105, .08);
  color: inherit;
  text-decoration: none;
}
.pm-assistant-product:hover { border-color: #1967b3; background: #f8fbff; }
.pm-assistant-product-image {
  grid-row: 1 / span 3;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 9px;
  background: #f6f8fa;
}
.pm-assistant-product-placeholder {
  display: grid;
  place-items: center;
  color: #6a7c8c;
  font-size: 10px;
}
.pm-assistant-product strong { display: block; color: #173b60; line-height: 1.3; }
.pm-assistant-product-meta { display: grid; gap: 2px; margin-bottom: 8px; font-size: 13px; }
.pm-assistant-product-action {
  width: max-content;
  padding: 6px 9px;
  border-radius: 7px;
  background: #1967b3;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}
.pm-assistant-contact-options { display: grid; gap: 8px; }
.pm-assistant-contact-options a,
.pm-assistant-callback {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d7e2ee;
  border-radius: 11px;
  background: #fff;
  color: #173b60;
  text-decoration: none;
  font-weight: 850;
}
.pm-assistant-contact-options a span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1967b3;
  color: #fff;
  font-size: 11px;
}
.pm-assistant-contact-options a.pm-assistant-call {
  border-color: #86d9a6;
  background: #effcf4;
  color: #116b36;
}
.pm-assistant-contact-options a.pm-assistant-call span { background: #138a4a; font-size: 16px; }
.pm-assistant-contact-options a:hover,
.pm-assistant-callback:hover { border-color: #1967b3; background: #f5faff; }
.pm-assistant-output a { color: #1260a7; font-weight: 850; }
.pm-assistant-lead-context { padding: 9px 11px; border-radius: 9px; background: #fff8de; color: #684f00; }
.pm-assistant-disclaimer { flex: 0 0 auto; padding: 9px 14px; border-top: 1px solid #e1e9f1; background: #f7fafc; color: #5d7183; font-size: 11px; line-height: 1.35; text-align: center; }
.pm-assistant-disclaimer span { display: block; }
.pm-assistant-disclaimer span + span { margin-top: 3px; }

.pm-assistant-launcher:focus-visible,
.pm-assistant button:focus-visible,
.pm-assistant a:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }

@media (max-width: 760px) {
  body.pm-assistant-open { overflow: hidden; }
  .pm-assistant { right: 16px; bottom: 20px; }
  .pm-assistant.is-open { transform: none; }
  .pm-assistant.is-open .pm-assistant-launcher { visibility: hidden; }
  .pm-assistant-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: min(88dvh, 760px);
    border-radius: 20px 20px 0 0;
  }
}

@media (max-width: 390px) {
  .pm-assistant-panel { width: 100vw; }
  .pm-assistant-send { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-assistant,
  .pm-assistant-panel { transition: none; }
  .pm-assistant-spinner { animation: none; }
}
