/* A quiet sign that something typed in a form is not saved yet (public/js/keepdraft.js). */
.draft-chip {
  position: fixed;
  left: 50%;
  /* at the top of the window (the owner, 25. 11. 2026: „aby bylo nahoře s ikonkou“), over the head of the page, never under a finger */
  top: max(12px, env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--card, #fff);
  color: var(--ink, #1f2937);
  border: 1px solid var(--sd-color-orange-500, #f59e0b);
  box-shadow: 0 1px 4px #0002;
  pointer-events: none;
}
.draft-chip > i {
  color: var(--sd-color-orange-500, #f59e0b);
}
.draft-chip[hidden] {
  display: none;
}
.draft-kept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
/* on a phone the top bar holds the sandwich, the logo and three buttons (64 px): the sign goes right under it */
@media (max-width: 860px) {
  .draft-chip {
    top: calc(72px + env(safe-area-inset-top));
  }
}
/* the badge at the heading of a form and at the head of its folded card that holds the unsaved text */
.draft-mark {
  margin-left: 8px;
  white-space: nowrap;
}
/* the words take the free room, so they start where the words of every other notice start (a floating one too: after its tick) and the
   button stands at the right end (the owner, 2. 12. 2026: „text v ose s ostatními hláškami“) */
.draft-kept > span {
  flex: 1 1 12rem;
  min-width: 0;
}
/* floating, on a narrow window the button goes under the words and starts with them (after the tick of 22 px and the gap of 12 px) */
html.sd .toasts .toast > .notice.draft-kept > button {
  margin-left: 34px;
}
/* Finance: the cross of a floating notice stands over its right edge (app.css .toast-close, 44 px at 2 px): the button keeps clear of it */
html.sd .toasts .toast > .notice.draft-kept {
  padding-right: 52px;
}
/* the head of a folded card is one line (app.css details.fold > summary, flex): on a phone its badges go to the next line instead of past the
   edge of the window */
html.sd details > summary:has(> .draft-mark) {
  flex-wrap: wrap;
}
