/* Public John is isolated from the authenticated assistant and portal styles. */
.public-john {
  --john-navy: #102632;
  --john-gold: #dbb963;
  --john-muted: #54666e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--john-navy);
}
.public-john *, .public-john *::before, .public-john *::after { box-sizing: border-box; }
.public-john [hidden], .public-john[hidden] { display: none !important; }
.public-john button, .public-john a, .public-john textarea { font: inherit; }
.public-john button { margin: 0; cursor: pointer; }
.public-john button:disabled { cursor: wait; opacity: .55; }
.public-john button:focus-visible, .public-john a:focus-visible, .public-john textarea:focus-visible, .public-john-log:focus-visible { outline: 3px solid #a6781a; outline-offset: 3px; }
.public-john-launcher {
  position: fixed;
  z-index: 45;
  right: calc(max(22px, env(safe-area-inset-right)) + var(--john-viewport-right, 0px));
  bottom: calc(max(20px, env(safe-area-inset-bottom)) + var(--john-viewport-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  max-width: calc(var(--john-viewport-width, 100vw) - 36px);
  padding: 10px 17px 10px 11px;
  border: 1px solid var(--john-gold);
  border-radius: 16px;
  background: var(--john-navy);
  color: #fff;
  box-shadow: 0 5px 22px #071a2629;
  text-align: left;
}
.public-john-launcher:hover { background: #193949; }
.public-john-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--john-gold); color: var(--john-navy); }
.public-john-icon svg { display: block; width: 28px; height: 28px; }
.public-john-launcher-copy { display: grid; gap: 0; }
.public-john-launcher small { color: #d5dfe3; font-size: 11px; line-height: 1.4; }
.public-john-launcher strong { font-size: 14px; font-weight: 700; line-height: 1.5; }
.public-john-dialog {
  position: fixed;
  inset: auto 22px calc(22px + var(--john-viewport-bottom, 0px)) auto;
  margin: 0;
  padding: 0;
  width: min(430px, calc(100vw - 44px));
  max-width: none;
  height: min(680px, calc(var(--john-viewport-height, 100dvh) - 44px));
  max-height: calc(var(--john-viewport-height, 100dvh) - 44px);
  overflow: hidden;
  border: 1px solid #c9d4d8;
  border-radius: 18px;
  background: #fff;
  color: var(--john-navy);
  box-shadow: 0 20px 70px #071a264d;
}
.public-john-dialog:not([open]) { display: none; }
.public-john-dialog[open] { display: flex; flex-direction: column; }
.public-john-dialog::backdrop { background: #071a2659; backdrop-filter: none; }
.public-john-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; padding: 16px 16px 16px 20px; background: var(--john-navy); color: #fff; }
.public-john-header h2 { margin: 0; color: #fff; font-size: 21px; line-height: 1.3; font-weight: 750; }
.public-john-header p { margin: 3px 0 0; color: #c6d2d7; font-size: 11px; line-height: 1.5; }
.public-john-close { min-height: 44px; padding: 9px 11px; border: 1px solid #77909c; border-radius: 8px; background: transparent; color: #fff; font-size: 12px !important; flex-shrink: 0; }
.public-john-close:hover { background: #29424f; }
.public-john-log { flex: 1 1 auto; min-height: 70px; padding: 20px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.public-john-welcome { margin: 0 0 18px; font-size: 15px; line-height: 1.65; }
.public-john-message { margin: 0 0 16px; max-width: 95%; padding: 12px 14px; border-radius: 11px; background: #f0f4f5; overflow-wrap: anywhere; }
.public-john-message--user { margin-left: auto; background: #f3edda; }
.public-john-speaker { display: block; margin: 0 0 5px; font-size: 11px; font-weight: 750; color: var(--john-muted); }
.public-john-message p { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.public-john-starters, .public-john-routes { display: flex; gap: 7px; flex-wrap: wrap; flex: 0 0 auto; padding: 0 20px 12px; }
.public-john-routes:empty { display: none; }
.public-john-starter, .public-john-routes a { min-height: 44px; padding: 9px 11px; border: 1px solid #c3d1d7; border-radius: 8px; background: #fff; color: var(--john-navy); font-size: 12px !important; text-decoration: none; display: inline-flex; align-items: center; }
.public-john-starter:hover, .public-john-routes a:hover { background: #edf3f5; }
.public-john-status { flex: 0 0 auto; margin: 0; padding: 0 20px 10px; color: #755415; font-size: 12px; line-height: 1.5; }
.public-john-retry { align-self: flex-start; margin: 0 20px 12px !important; min-height: 44px; padding: 8px 12px; background: #f5f0e2; color: var(--john-navy); border: 1px solid #d6cba9; border-radius: 7px; }
.public-john-form { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin: 0; padding: 12px 20px; border-top: 1px solid #e1e7e9; }
.public-john-input-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.public-john-input { display: block; width: 100%; min-height: 56px; max-height: 120px; resize: vertical; padding: 10px 11px; margin: 0; border: 1px solid #adbec6; border-radius: 8px; background: #fff; color: var(--john-navy); font-size: 16px !important; line-height: 1.45; box-shadow: none; }
.public-john-input::placeholder { color: #647983; opacity: 1; }
.public-john-send { min-width: 66px; min-height: 56px; padding: 10px 13px; border: 1px solid var(--john-gold); border-radius: 8px; background: var(--john-gold); color: var(--john-navy); font-weight: 750 !important; }
.public-john-send:hover { background: #e6c977; }
.public-john-footer { flex: 0 0 auto; padding: 0 20px 14px; }
.public-john-contact { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 10px; }
.public-john-contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--john-navy); font-size: 12px; font-weight: 650; text-underline-offset: 3px; }
.public-john-email-hint { margin: 0; font-size: 11px; line-height: 1.5; color: var(--john-muted); }
.public-john-account { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 4px 0 0; color: var(--john-muted); font-size: 11px; }
.public-john-account a { display: inline-flex; align-items: center; min-height: 44px; color: var(--john-navy); font-weight: 650; text-underline-offset: 3px; }
@media (max-width: 600px) {
  .public-john-launcher { right: calc(max(14px, env(safe-area-inset-right)) + var(--john-viewport-right, 0px)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--john-viewport-bottom, 0px)); gap: 9px; padding: 8px 13px 8px 9px; }
  .public-john-dialog { inset: auto 10px calc(max(10px, env(safe-area-inset-bottom)) + var(--john-viewport-bottom, 0px)) 10px; width: auto; height: min(680px, calc(var(--john-viewport-height, 100dvh) - 20px - env(safe-area-inset-bottom) - env(safe-area-inset-top))); max-height: calc(var(--john-viewport-height, 100dvh) - 20px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); border-radius: 14px; }
  .public-john-header { padding: 13px 14px; }
  .public-john-log { padding: 16px 14px; }
  .public-john-starters, .public-john-routes { padding-inline: 14px; }
  .public-john-form { padding: 10px 14px; }
  .public-john-footer { padding: 0 14px 8px; }
  .public-john-status { padding-inline: 14px; }
}
@media (max-height: 520px) {
  .public-john-dialog { height: calc(var(--john-viewport-height, 100dvh) - 20px); max-height: calc(var(--john-viewport-height, 100dvh) - 20px); bottom: calc(10px + var(--john-viewport-bottom, 0px)); }
  .public-john-header { padding-block: 8px; }
  .public-john-header p, .public-john-email-hint { display: none; }
  .public-john-footer { padding-bottom: 5px; }
  .public-john-account { display: none; }
  .public-john-log { min-height: 40px; padding-block: 10px; }
}
.public-john[data-short-viewport="true"] .public-john-header { padding-block: 8px; }
.public-john[data-short-viewport="true"] .public-john-header p,
.public-john[data-short-viewport="true"] .public-john-email-hint,
.public-john[data-short-viewport="true"] .public-john-account,
.public-john[data-short-viewport="true"] .public-john-starters { display: none; }
.public-john[data-short-viewport="true"] .public-john-footer { padding-bottom: 5px; }
.public-john[data-short-viewport="true"] .public-john-log { min-height: 40px; padding-block: 10px; }
