/* ==========================================================================
   TurbonX BD — the "Install app" bar (assets/js/app.js) and the in-app push toast.
   Sits at the bottom of the page above the mascot, below every dialog; follows the light / dark theme through the tokens.
   ========================================================================== */
.app-install {
  position: fixed; z-index: 300;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 520px; margin-inline: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px;
  background: var(--surface-raised); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
  opacity: 0; transform: translateY(24px);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.app-install.is-open { opacity: 1; transform: translateY(0); }
.app-install__icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--surface-sunken); object-fit: cover; }
.app-install__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-install__text b { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.app-install__text > span { font-size: 12.5px; line-height: 1.4; color: var(--text-secondary); }
.app-install__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.app-install__x {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--text-tertiary);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.app-install__x:hover { background: var(--surface-sunken); color: var(--text-primary); }
.app-install__steps { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12.5px; color: var(--text-secondary); }
.app-install__steps li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.app-install__steps b { color: var(--text-primary); }
.app-install__share { flex-shrink: 0; color: #2563eb; }
:root[data-theme="dark"] .app-install__share { color: #60a5fa; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-install__share { color: #60a5fa; } }

/* the back-to-top button steps up while the bar is on screen, so it does not hide behind it */
@media (max-width: 639px) { .has-install-bar .back-to-top { translate: 0 -84px; } }

@media (prefers-reduced-motion: reduce) { .app-install { transition: opacity 120ms linear; transform: none; } }

/* a push that arrives while the site is open: a small toast with the message, tap to read it */
.push-toast {
  position: fixed; z-index: 1100; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px));
  max-width: 420px; margin-inline: auto;
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: var(--surface-raised); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-pop, 0 12px 40px rgba(0, 0, 0, 0.22));
  cursor: pointer; text-align: left;
  opacity: 0; transform: translateY(-16px); transition: opacity 220ms ease, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.push-toast.is-open { opacity: 1; transform: translateY(0); }
.push-toast__icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--surface-sunken); object-fit: cover; }
.push-toast__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.push-toast__text b { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.push-toast__text span { font-size: 12px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
