.pai-chatbot {
  --pai-main: #0f5b3e;
  --pai-gold: #d4af37;
  font-family: Arial, Helvetica, sans-serif;
  color: #26352f;
}

.pai-floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.pai-open {
  border: 0;
  background: var(--pai-main);
  color: #fff;
  border-radius: 999px;
  min-width: 160px;
  height: 66px;
  padding: 0 28px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 16px 35px rgba(15, 91, 62, 0.35);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  overflow: hidden;
}

.pai-window {
  width: min(390px, calc(100vw - 32px));
  max-height: min(700px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid #e1ded6;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(15, 47, 39, 0.22);
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.pai-floating.is-open .pai-open {
  display: none;
}

.pai-floating.is-open .pai-window {
  display: flex;
}

.pai-embedded .pai-window {
  display: flex;
  width: 100%;
  max-height: none;
}

.pai-header {
  background: linear-gradient(135deg, #0f2f27, #17483c);
  color: #fff;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.pai-header strong {
  display: block;
  font-size: 1rem;
}

.pai-header small {
  color: rgba(255,255,255,0.76);
}

.pai-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.pai-messages {
  padding: 16px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  max-height: 310px;
  background: #fbf7ef;
}

.pai-message {
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.pai-bot {
  background: #fff;
  border: 1px solid #e1ded6;
  justify-self: start;
}

.pai-user {
  background: var(--pai-main);
  color: #fff;
  justify-self: end;
}

.pai-small {
  font-size: 0.84rem;
  color: #60706a;
}

.pai-typing {
  color: #60706a;
}

.pai-lead-form,
.pai-chat-form {
  padding: 16px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.pai-lead-form input,
.pai-lead-form select,
.pai-lead-form textarea,
.pai-chat-form input {
  width: 100%;
  border: 1px solid #d7d5cd;
  border-radius: 14px;
  padding: 11px 12px;
  outline: none;
  font-size: 0.92rem;
}

.pai-lead-form textarea {
  resize: vertical;
}

.pai-lead-form input:focus,
.pai-lead-form select:focus,
.pai-lead-form textarea:focus,
.pai-chat-form input:focus {
  border-color: var(--pai-gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.16);
}

.pai-lead-form button,
.pai-chat-form button {
  border: 0;
  background: var(--pai-main);
  color: #fff;
  border-radius: 999px;
  padding: 12px 15px;
  font-weight: 800;
  cursor: pointer;
}

.pai-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.pai-whatsapp-button {
  background: #128c55 !important;
}

.pai-disclaimer {
  margin: 0;
  font-size: 0.78rem;
  color: #60706a;
  line-height: 1.35;
}

@media (max-width: 540px) {
  .pai-floating {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .pai-open {
    width: 100%;
    min-width: 0;
  }

  .pai-window {
    width: 100%;
  }

  .pai-input-row {
    grid-template-columns: 1fr;
  }
}
