/* Suds, the AI help desk: the chat panel (assets/js/suds.js). Desktop: a panel above the "Questions?" button. Phones: a
   sheet above the bottom bar, which rides up over the keyboard (--kb, set from visualViewport). */
.pl-suds { position: fixed; z-index: 75; right: 24px; bottom: 92px; width: 384px; height: min(620px, calc(100vh - 140px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--pl-surface); border: 1px solid var(--pl-line);
  box-shadow: 0 30px 70px -24px rgba(11, 20, 36, .45), 0 2px 8px rgba(11, 20, 36, .08); animation: pl-suds-in .28s cubic-bezier(.2, .8, .2, 1); }
.pl-suds[hidden] { display: none; }
@keyframes pl-suds-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.pl-suds__head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; color: #FFFFFF;
  background: radial-gradient(120% 140% at 0 0, #1B4C8C, #0A1F44 60%); }
.pl-suds__avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #7FE3F5;
  background: rgba(127, 227, 245, .14); box-shadow: 0 0 0 1px rgba(127, 227, 245, .45) inset, 0 0 18px -4px rgba(127, 227, 245, .8); }
.pl-suds__who { flex: 1; min-width: 0; }
.pl-suds__name { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.pl-suds__sub { margin: 2px 0 0; font: 500 11px/1.2 var(--pl-mono); letter-spacing: .08em; text-transform: uppercase; color: #7FE3F5; }
.pl-suds__x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: #FFFFFF; cursor: pointer; }
.pl-suds__x:hover { background: rgba(255, 255, 255, .1); }

.pl-suds__log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; background: var(--pl-bg, #F6F8FB); }
.pl-suds__msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-suds__msg--bot { align-self: flex-start; border-bottom-left-radius: 6px; background: #FFFFFF; color: var(--pl-ink); border: 1px solid var(--pl-line); }
.pl-suds__msg--me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--pl-navy); color: #FFFFFF; }
.pl-suds__msg { white-space: normal; }
.pl-suds__msg p { margin: 0; white-space: pre-wrap; }
.pl-suds__msg p + p, .pl-suds__msg p + ul, .pl-suds__msg ul + p { margin-top: 8px; }
.pl-suds__msg ul { margin: 6px 0 0; padding-left: 18px; }
.pl-suds__msg li { margin: 2px 0; }
.pl-suds__msg li::marker { color: var(--pl-blue); }
.pl-suds__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pl-suds__msg .pl-suds__link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--pl-navy); color: #FFFFFF; font-weight: 600; text-decoration: none; }
.pl-suds__msg .pl-suds__link:hover { background: var(--pl-navy-deep); color: #FFFFFF; }
.pl-suds__msg a { color: var(--pl-blue); font-weight: 600; }
.pl-suds__msg--me a { color: #BFF3FF; }
.pl-suds__alts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; white-space: normal; }
.pl-suds__alts a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--pl-line-strong); text-decoration: none; color: var(--pl-navy); }
.pl-suds__alts a:first-child { background: var(--pl-navy); border-color: var(--pl-navy); color: #FFFFFF; }
.pl-suds__typing { display: inline-flex; gap: 4px; padding: 14px; }
.pl-suds__typing i { width: 7px; height: 7px; border-radius: 50%; background: #9AA7B8; animation: pl-suds-dot 1.1s infinite ease-in-out; }
.pl-suds__typing i:nth-child(2) { animation-delay: .15s; } .pl-suds__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pl-suds-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

.pl-suds__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 4px; background: var(--pl-bg, #F6F8FB); }
.pl-suds__chips[hidden] { display: none; }
.pl-suds__chip { min-height: 38px; padding: 0 13px; border-radius: 999px; border: 1px solid rgba(31, 95, 255, .35); background: #FFFFFF; color: var(--pl-blue);
  font: 600 14px var(--pl-font); cursor: pointer; transition: background .15s, border-color .15s; }
.pl-suds__chip:hover { background: #EEF4FF; border-color: var(--pl-blue); }
.pl-suds__chip.is-choice { border-color: var(--pl-navy); color: var(--pl-navy); }
.pl-suds__chip.is-choice:last-child { background: var(--pl-navy); color: #FFFFFF; }

.pl-suds__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--pl-line); background: var(--pl-surface); }
.pl-suds__in { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--pl-line-strong); resize: none;
  font: 16px/1.35 var(--pl-font); color: var(--pl-ink); background: #FFFFFF; }   /* 16px: iOS does not zoom the page */
.pl-suds__in:focus { border-color: var(--pl-blue); }
.pl-suds__in:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--pl-blue); }   /* (2026-10-14) a solid ring; the 15% one was barely there */
.pl-suds__send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--pl-blue); color: #FFFFFF; cursor: pointer; }
.pl-suds__send:disabled { opacity: .5; cursor: default; }
.pl-suds__foot { margin: 0; padding: 0 14px 10px; font-size: 11.5px; line-height: 1.4; color: var(--pl-muted); background: var(--pl-surface); }

@media (max-width: 979.98px) {
  .pl-suds { left: 8px; right: 8px; width: auto; bottom: calc(92px + env(safe-area-inset-bottom)); height: min(72svh, 600px); border-radius: 18px; }
  html.pl-bar-min .pl-suds { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .pl-suds.is-kb { border-radius: 16px; }                /* top and height come from suds.js (the visible area above the keyboard) */
  .pl-suds.is-kb .pl-suds__foot { display: none; }        /* the note waits for the keyboard to close: every line counts here */
  html.pl-menu-open .pl-suds { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pl-suds, .pl-suds__typing i { animation: none; } }
@media print { .pl-suds { display: none !important; } }
