/* A compact connection notice sits above content, away from the keyboard composer. */
.sevo-connection-banner {
  position: fixed;
  z-index: 110;
  top: max(8px, env(safe-area-inset-top, 0px));
  inset-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px));
  width: fit-content;
  max-width: min(660px, calc(100% - 20px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 4px 6px 4px 12px;
  border: 1px solid #d3d9e6;
  border-radius: 13px;
  background: #f7f9ff;
  color: #26324b;
  box-shadow: 0 5px 18px #18253818;
  font-family: var(--body, system-ui, sans-serif);
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}
.sevo-connection-banner[hidden],
.sevo-connection-banner [hidden] { display: none !important; }
.sevo-connection-banner[data-state="online"] {
  border-color: #c1dfd2;
  background: #f0faf5;
  color: #275c48;
  min-height: 40px;
  padding: 8px 14px;
}
.sevo-connection-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sevo-connection-message { min-width: 0; display: grid; gap: 2px; }
.sevo-connection-message strong { font: 700 12px/1.35 var(--body, system-ui, sans-serif); }
.sevo-connection-message span { color: #546079; font: 400 11px/1.4 var(--body, system-ui, sans-serif); }
.sevo-connection-retry {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 124px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #c8d2e3;
  border-radius: 9px;
  background: #fff;
  color: #2b3a55;
  font: 700 11px/1.35 var(--body, system-ui, sans-serif);
  text-align: center;
  white-space: normal;
  cursor: pointer;
}
.sevo-connection-retry:hover { background: #eef3fc; }
.sevo-connection-retry:focus-visible { outline: 3px solid #7663c1; outline-offset: 2px; }
/* A dialog is in the browser top layer; keep its status inside that same layer. */
dialog > .sevo-connection-banner {
  position: sticky;
  top: 0;
  inset-inline: auto;
  z-index: 6;
  align-self: stretch;
  flex: 0 0 auto;
  order: -1;
  grid-column: 1 / -1;
  width: auto;
  max-width: none;
  margin: 8px 10px;
}
@media (max-width: 480px) {
  .sevo-connection-banner { gap: 7px; padding-inline-start: 9px; border-radius: 11px; }
  .sevo-connection-icon { width: 17px; height: 17px; flex-basis: 17px; }
  .sevo-connection-message strong { font-size: 11px; }
  .sevo-connection-message span { font-size: 10px; }
  .sevo-connection-retry { font-size: 10px; max-width: 100px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sevo-connection-banner,
  .sevo-connection-retry { animation: none; transition: none; }
}
@media (forced-colors: active) {
  .sevo-connection-banner,
  .sevo-connection-retry { border-color: CanvasText; }
}
