/* Isolated styles: the existing site design stays independent of the chat. */
#pp-chat { --pp-chat-vh: 100dvh; --pp-chat-keyboard: 0px; color: #303b2c; font: 14px/1.5 'Segoe UI', Arial, sans-serif; }
#pp-chat *, #pp-chat *::before, #pp-chat *::after { box-sizing: border-box; }
#pp-chat [hidden] { display: none !important; }
#pp-chat button, #pp-chat textarea { font: inherit; }
#pp-chat button { cursor: pointer; }
#pp-chat button:disabled { cursor: not-allowed; opacity: .55; }
#pp-chat button:focus-visible, #pp-chat a:focus-visible, #pp-chat textarea:focus-visible, #pp-chat [tabindex]:focus-visible { outline: 3px solid #e9b33e; outline-offset: 3px; }
#pp-chat p, #pp-chat h2 { margin: 0; }
#pp-chat svg { display: block; width: 24px; height: 24px; }
#pp-chat .pp-chat-launcher { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); right: max(24px, env(safe-area-inset-right)); z-index: 1000; display: flex; align-items: center; gap: 11px; min-height: 58px; border: 1px solid #b0c4aa66; border-radius: 100px; padding: 14px 21px; color: #fff; background: linear-gradient(120deg, #51654a, #485942); box-shadow: 0 8px 30px #313c2d40; font-size: 15px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
#pp-chat .pp-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 35px #313c2d55; }
#pp-chat .pp-chat-spark { font-size: 17px; color: #c5d3c0; margin-left: 5px; }
#pp-chat .pp-chat-panel { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: calc(94px + var(--pp-chat-keyboard)); z-index: 1001; display: flex; flex-direction: column; width: min(410px, calc(100vw - 32px)); height: min(630px, calc(var(--pp-chat-vh) - 118px)); border: 1px solid #cdd9c9; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 22px 80px #2c362840, 0 4px 16px #2c362815; }
#pp-chat .pp-chat-header { flex: 0 0 auto; position: relative; display: flex; align-items: center; gap: 13px; padding: 22px 18px; color: #fff; background: linear-gradient(115deg, #2d372a, #44543e); }
#pp-chat .pp-chat-avatar { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border: 1px solid #ffffff45; background: #ffffff12; border-radius: 14px; }
#pp-chat .pp-chat-heading { min-width: 0; }
#pp-chat .pp-chat-heading p { font-size: 10px; letter-spacing: 1.7px; color: #cbd8c7; font-weight: 700; }
#pp-chat .pp-chat-heading h2 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 4px 0; letter-spacing: -.3px; text-transform: none; }
#pp-chat .pp-chat-heading > span { color: #d4dfd1; font-size: 11px; }
#pp-chat .pp-chat-close { margin-left: auto; align-self: flex-start; padding: 0; flex: 0 0 32px; height: 32px; border: 0; border-radius: 50%; background: #ffffff12; color: #fff; font-size: 25px; line-height: 1; }
#pp-chat .pp-chat-toolbar { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 18px; background: #f6f8f6; border-bottom: 1px solid #eaefe8; font-size: 11px; }
#pp-chat .pp-chat-status { color: #52654b; }
#pp-chat .pp-chat-reset { background: none; border: 0; color: #4a5b44; padding: 4px 0 4px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
#pp-chat .pp-chat-messages { flex: 1 1 auto; min-height: 70px; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 10px; background: #fff; scrollbar-width: thin; }
#pp-chat .pp-chat-message { width: fit-content; max-width: 94%; margin-bottom: 15px; }
#pp-chat .pp-chat-author { display: block; margin: 0 0 5px 2px; color: #586d51; font-size: 10px; font-weight: 600; }
#pp-chat .pp-chat-message p { border-radius: 3px 15px 15px 15px; background: #f3f6f2; padding: 12px 14px; color: #374332; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
#pp-chat .pp-chat-user { margin-left: auto; }
#pp-chat .pp-chat-user .pp-chat-author { text-align: right; margin-right: 3px; }
#pp-chat .pp-chat-user p { border-radius: 15px 3px 15px 15px; background: #4b5d44; color: #fff; }
#pp-chat .pp-chat-thinking p { color: #5b7053; font-style: italic; }
#pp-chat .pp-chat-suggestions { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 4px 18px 13px; }
#pp-chat .pp-chat-suggestions button { padding: 10px; border: 1px solid #cedaca; border-radius: 9px; background: #fff; color: #4a5b43; font-size: 12px; text-align: left; }
#pp-chat .pp-chat-suggestions button:hover:not(:disabled) { background: #f6f8f6; border-color: #6a8461; }
#pp-chat .pp-chat-disclosure { flex: 0 0 auto; padding: 0 18px 10px; color: #54684d; font-size: 10px; line-height: 1.5; }
#pp-chat .pp-chat-disclosure a { color: #4a5b44; text-decoration: underline; }
#pp-chat .pp-chat-form { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 8px; margin: 0 14px; padding: 7px; border: 1px solid #cbd8c7; border-radius: 13px; background: #fff; }
#pp-chat .pp-chat-form:focus-within { border-color: #4f6248; box-shadow: 0 0 0 2px #566a4e18; }
#pp-chat textarea { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 40px; max-height: 104px; border: 0; border-radius: 6px; padding: 9px 6px; resize: none; background: transparent; color: #303b2c; font-size: 16px; line-height: 22px; }
#pp-chat textarea::placeholder { color: #5b7153; font-size: 14px; }
#pp-chat textarea:disabled { background: #f8faf8; }
#pp-chat .pp-chat-send { display: grid; place-items: center; flex: 0 0 40px; height: 40px; padding: 0; border: 0; border-radius: 9px; background: #4e6148; color: #fff; }
#pp-chat .pp-chat-bottom { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 18px 13px; font-size: 10px; color: #586d51; }
#pp-chat .pp-chat-bottom a { color: #4a5b44; font-weight: 700; font-size: 12px; }
#pp-chat .pp-chat-error { flex: 0 0 auto; margin: 0 18px 9px; padding: 9px 11px; background: #fff4df; border-radius: 8px; color: #664814; font-size: 12px; }
#pp-chat .pp-chat-reconnect { align-self: flex-start; margin: 0 18px 10px; padding: 0; background: none; color: #4a5b44; text-decoration: underline; font-size: 12px; border: 0; }
#pp-chat .pp-chat-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pp-chat-contact-button { margin: 12px 8px; }
#pp-chat.pp-chat-compact .pp-chat-suggestions { display: none; }
#pp-chat.pp-chat-compact .pp-chat-header { padding: 10px 16px; }
#pp-chat.pp-chat-compact .pp-chat-heading > span, #pp-chat.pp-chat-compact .pp-chat-avatar { display: none; }
#pp-chat.pp-chat-compact .pp-chat-toolbar { padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 540px) {
  #pp-chat .pp-chat-launcher { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); min-height: 54px; padding: 12px 17px; font-size: 14px; }
  #pp-chat .pp-chat-launcher.pp-chat-open { visibility: hidden; }
  #pp-chat .pp-chat-panel { right: 8px; bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--pp-chat-keyboard)); width: calc(100vw - 16px); height: min(650px, calc(var(--pp-chat-vh) - 24px - env(safe-area-inset-bottom))); border-radius: 18px; }
  #pp-chat .pp-chat-header { padding: 16px; gap: 10px; }
  #pp-chat .pp-chat-heading h2 { font-size: 17px; }
  #pp-chat .pp-chat-close { flex-basis: 36px; height: 36px; }
  #pp-chat .pp-chat-bottom { padding-bottom: 12px; }
}
@media (max-height: 580px) {
  #pp-chat .pp-chat-panel { bottom: calc(8px + var(--pp-chat-keyboard)); height: calc(var(--pp-chat-vh) - 16px); }
  #pp-chat .pp-chat-header { padding: 10px 16px; }
  #pp-chat .pp-chat-heading > span, #pp-chat .pp-chat-avatar { display: none; }
  #pp-chat .pp-chat-suggestions { display: none; }
  #pp-chat .pp-chat-toolbar { padding-top: 5px; padding-bottom: 5px; }
  #pp-chat .pp-chat-disclosure { padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { #pp-chat *, #pp-chat *::before, #pp-chat *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { #pp-chat, .pp-chat-contact-button { display: none !important; } }
