/* R12-PWA (Trello #335): «Додати на екран телефону» (the footer link and
   the one-time hint), the «Немає інтернету…» note and the offline page.
   Loaded by every public page; uses the site tokens from styles.css, so both
   themes follow. The hint sits at the bottom like the cookie banner and never
   appears together with it (modules/pwa.mjs). */

.pwa-hint {
  position: fixed;
  inset: auto 12px calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--line-strong, #d9dde6);
  border-radius: var(--radius, 12px);
  background: var(--bg, #fff);
  color: var(--text, #0b1020);
  box-shadow: var(--shadow, 0 6px 20px rgba(16, 24, 40, 0.08));
  font-size: 15px;
  line-height: 1.45;
}

.pwa-hint__text,
.pwa-hint__steps {
  margin: 0;
  font-weight: 700;
}

.pwa-hint__steps {
  font-weight: 400;
}

.pwa-hint__note {
  margin: 0;
  color: var(--muted, #5b6476);
  font-size: 13px;
}

.pwa-hint__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pwa-hint__button {
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--line-strong, #d9dde6);
  border-radius: 999px;
  background: transparent;
  color: var(--text, #0b1020);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pwa-hint__button--primary {
  border-color: var(--link, #0057b7);
  background: var(--link, #0057b7);
  color: #fff;
}

[data-theme="dark"] .pwa-hint__button--primary {
  color: var(--bg, #0b1020);
}

.pwa-hint__button:focus-visible,
.footer__install:focus-visible {
  outline: 3px solid var(--focus, #0057b7);
  outline-offset: 2px;
}

.pwa-hint [hidden] {
  display: none;
}

/* The footer link is a button (it opens the steps); it looks like the
   other footer links next to it. */
.footer__install {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.footer__install[hidden] {
  display: none;
}

/* The offline page (offline.html). */
.pwa-offline-page {
  min-height: 100vh;
  margin: 0;
  background: var(--bg, #fff);
  color: var(--text, #0b1020);
}

.pwa-offline-page__main {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 420px;
  margin: 0 auto;
  padding: 72px 20px;
  text-align: center;
}

.pwa-offline-page__main img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
}

.pwa-offline-page__main p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}
