/* AWP Help Bot */
.awp-bot { --bot-accent: #b84b27; --bot-ink: #1e1612; --bot-soft: #f4efeb; --bot-line: #e2d9d1; --bot-muted: #8a7870;
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 99990; font-family: 'Inter', Arial, sans-serif; color: var(--bot-ink); }
.awp-bot *, .awp-bot *::before, .awp-bot *::after { box-sizing: border-box; }
.awp-bot-launch { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: var(--bot-accent); color: #fff;
  padding: 12px 18px; font: 600 15px/1 inherit; font-family: inherit; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.awp-bot-launch:hover { filter: brightness(1.05); }
.awp-bot[data-state="open"] .awp-bot-launch { display: none; }

.awp-bot-panel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 380px; height: min(600px, calc(100vh - 32px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--bot-line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.22); overflow: hidden; }
.awp-bot-panel[hidden] { display: none !important; }
.awp-bot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--bot-accent); color: #fff; }
.awp-bot-title { font-weight: 700; font-size: 16px; }
.awp-bot-sub { font-size: 12px; opacity: .9; margin-top: 2px; }
.awp-bot-x { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 32px; height: 32px; border-radius: 8px; font-size: 22px; line-height: 1; cursor: pointer; flex: 0 0 auto; }

.awp-bot-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fbf9f7; }
.awp-bot-msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.awp-bot-msg p { margin: 0 0 6px; } .awp-bot-msg p:last-child { margin-bottom: 0; }
.awp-bot-msg ol, .awp-bot-msg ul { margin: 4px 0 6px; padding-left: 20px; } .awp-bot-msg li { margin: 2px 0; }
.awp-bot-msg a { color: var(--bot-accent); }
.awp-bot-msg.is-bot { align-self: flex-start; background: #fff; border: 1px solid var(--bot-line); border-bottom-left-radius: 4px; }
.awp-bot-msg.is-me  { align-self: flex-end; background: var(--bot-accent); color: #fff; border-bottom-right-radius: 4px; }
.awp-bot-msg.is-intro { background: var(--bot-soft); border-color: transparent; }
.awp-bot-msg.is-err { background: #fdf0f0; border-color: #f0c9c9; color: #7d1d22; }
.awp-bot-msg.is-ok  { background: #eef8f0; border-color: #c7e6cf; color: #1a5c2b; }
.awp-bot-msg.is-typing { color: var(--bot-muted); letter-spacing: 3px; animation: awpBotPulse 1s ease-in-out infinite; }
@keyframes awpBotPulse { 50% { opacity: .4; } }

.awp-bot-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; background: #fbf9f7; }
.awp-bot-chips:not(:empty) { padding-bottom: 10px; }
.awp-bot-chip { border: 1px solid var(--bot-line); background: #fff; color: var(--bot-ink); border-radius: 999px; padding: 6px 11px; font: 500 13px/1.2 inherit; font-family: inherit; cursor: pointer; }
.awp-bot-chip:hover { border-color: var(--bot-accent); color: var(--bot-accent); }

.awp-bot-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--bot-line); background: #fff; }
.awp-bot-in { flex: 1 1 auto; min-width: 0; resize: none; border: 1.5px solid #d0bbb4; border-radius: 10px; padding: 9px 11px; font: 16px/1.35 inherit; font-family: inherit; max-height: 120px; color: var(--bot-ink); background: #fff; }
.awp-bot-in:focus { outline: 2px solid var(--bot-accent); outline-offset: 0; border-color: transparent; }
.awp-bot-send { flex: 0 0 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bot-accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.awp-bot-foot { display: flex; justify-content: space-between; gap: 8px; padding: 0 12px 10px; background: #fff; }
.awp-bot-foot button { border: 0; background: none; padding: 4px 0; font: 600 13px/1.2 inherit; font-family: inherit; cursor: pointer; color: var(--bot-accent); }
.awp-bot-foot .awp-bot-clear { color: var(--bot-muted); font-weight: 500; }

.awp-bot-handoff { border-top: 1px solid var(--bot-line); padding: 12px; background: var(--bot-soft); display: flex; flex-direction: column; gap: 8px; }
.awp-bot-handoff[hidden] { display: none !important; }
.awp-bot-ho-title { font-weight: 700; font-size: 14px; }
.awp-bot-handoff label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.awp-bot-handoff label span { font-weight: 400; color: var(--bot-muted); }
.awp-bot-handoff input, .awp-bot-handoff textarea { border: 1.5px solid #d0bbb4; border-radius: 8px; padding: 8px 10px; font: 16px/1.3 inherit; font-family: inherit; background: #fff; color: var(--bot-ink); }
.awp-bot-ho-acts { display: flex; gap: 8px; }
.awp-bot-ho-send { border: 0; border-radius: 8px; background: var(--bot-accent); color: #fff; padding: 9px 18px; font: 600 14px inherit; font-family: inherit; cursor: pointer; }
.awp-bot-ho-cancel { border: 1px solid var(--bot-line); border-radius: 8px; background: #fff; padding: 9px 14px; font: 500 14px inherit; font-family: inherit; cursor: pointer; }

@media (max-width: 599px) {
  .awp-bot { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .awp-bot-launch span { display: none; }
  .awp-bot-launch { padding: 14px; }
  .awp-bot-panel { left: 0; right: 0; bottom: 0; top: 0; width: auto; height: auto; border-radius: 0; border: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-top: env(safe-area-inset-top, 0px); }
}
@media print { .awp-bot { display: none; } }
