/* Offline status (handoff 18, docs/offline.md §5). Shown only on a device with the offline layer. */

/* Out of the header's grid: a small pill just under it, visible at phone width too. */
.offline-chip {
  position: fixed;
  z-index: 30;
  top: calc(var(--shell-top, 4.75rem) + var(--space-2));
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-1) var(--space-3);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 650;
  background: color-mix(in srgb, var(--color-caution) 18%, var(--color-surface-raised));
  border: 1px solid color-mix(in srgb, var(--color-caution) 45%, transparent);
  border-radius: 999px;
  box-shadow: var(--shadow-cover);
  cursor: pointer;
}

.offline-chip[hidden] {
  display: none;
}

body.reader-open .offline-chip {
  top: calc(env(safe-area-inset-top, 0px) + var(--space-2));
}

.offline-row {
  align-items: flex-start;
}

.offline-row small {
  display: grid;
  gap: var(--space-1);
}

.offline-line {
  display: block;
}

.offline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* The reader's notice when a book's text is not on this device. */
.reader-offline-notice {
  display: grid;
  place-content: center;
  gap: var(--space-3);
  min-height: 60vh;
  padding: var(--space-8);
  text-align: center;
}

.reader-offline-notice p {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--color-muted);
}
