:root {
  --pa-ink: #203c42;
  --pa-cream: #faf7f0;
  --pa-sand: #e8decd;
  --pa-accent: #a0442e;
  --pa-mute: #536267;
  --pa-white: #ffffff;
}

#pa-assistant-root,
#pa-assistant-root * {
  box-sizing: border-box;
}

#pa-assistant-root {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 99990;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--pa-ink);
}

@media (max-width: 782px) {
  #pa-assistant-root {
    left: 12px;
    right: auto;
    bottom: 96px;
  }
}

.pa-launcher {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--pa-ink);
  color: var(--pa-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(32, 60, 66, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}

.pa-launcher:hover,
.pa-launcher:focus-visible {
  background: #162c31;
  transform: translateY(-1px);
  outline: 2px solid var(--pa-accent);
  outline-offset: 3px;
}

.pa-launcher svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.pa-panel {
  position: absolute;
  left: 0;
  bottom: 64px;
  width: min(360px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 140px));
  background: var(--pa-cream);
  border: 1px solid var(--pa-sand);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(32, 60, 66, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 782px) {
  .pa-panel {
    bottom: 64px;
    height: min(70vh, calc(100vh - 200px));
  }
}

.pa-panel[hidden],
.pa-launcher[hidden],
#pa-assistant-root[hidden] {
  display: none !important;
}

.pa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--pa-ink);
  color: var(--pa-white);
}

.pa-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.pa-header p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--pa-sand);
}

.pa-close {
  border: 0;
  background: transparent;
  color: var(--pa-white);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.pa-close:hover,
.pa-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: 2px solid var(--pa-sand);
}

.pa-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pa-msg {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.pa-msg a {
  color: var(--pa-accent);
  text-decoration: underline;
}

.pa-msg--bot {
  align-self: flex-start;
  background: var(--pa-white);
  border: 1px solid var(--pa-sand);
  color: var(--pa-ink);
}

.pa-msg--user {
  align-self: flex-end;
  background: var(--pa-ink);
  color: var(--pa-white);
}

.pa-privacy {
  margin: 0;
  padding: 0 14px 8px;
  font-size: 0.72rem;
  color: var(--pa-mute);
}

.pa-form,
.pa-composer {
  border-top: 1px solid var(--pa-sand);
  padding: 10px 12px 12px;
  background: var(--pa-white);
}

.pa-composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.pa-composer textarea,
.pa-form input,
.pa-form textarea {
  width: 100%;
  border: 1px solid var(--pa-sand);
  background: var(--pa-cream);
  color: var(--pa-ink);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  resize: none;
}

.pa-composer textarea:focus,
.pa-form input:focus,
.pa-form textarea:focus {
  outline: 2px solid var(--pa-ink);
  outline-offset: 1px;
  background: var(--pa-white);
}

.pa-send,
.pa-form button[type="submit"] {
  border: 0;
  border-radius: 10px;
  background: var(--pa-accent);
  color: var(--pa-white);
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.pa-send:hover,
.pa-send:focus-visible,
.pa-form button[type="submit"]:hover,
.pa-form button[type="submit"]:focus-visible {
  background: #7f3423;
  outline: 2px solid var(--pa-ink);
  outline-offset: 2px;
}

.pa-send:disabled,
.pa-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pa-form label {
  display: block;
  font-size: 0.8rem;
  margin: 0 0 8px;
  color: var(--pa-mute);
}

.pa-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.pa-error {
  color: var(--pa-accent);
  font-size: 0.8rem;
  margin: 0 0 8px;
}

.pa-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
