/**
 * The shared install control: a small Install button on a phone, a scannable QR
 * on a desktop. Mobile-first: the button is the default, the QR takes over from
 * 768px where the shell's bottom bar gives way to the sidebar. The whole thing
 * is parked in the corner and carries no layout of its own.
 */
.install-app {
  position: fixed;
  z-index: 60;
  right: 12px;
  bottom: 84px;
  max-width: calc(100vw - 24px);
  padding: 6px 8px;
  border: 1px solid rgba(24, 24, 24, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 16px rgba(24, 24, 24, .10);
  color: #1c1c1c;
  font: 500 12px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.install-app[hidden] {
  display: none !important;
}

.install-app__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #c8a95f;
  border-radius: 999px;
  background: #fff;
  color: #6d5418;
  font: inherit;
  cursor: pointer;
}

.install-app__button:hover,
.install-app__button:focus-visible {
  background: #fbf5e5;
}

.install-app__icon {
  flex: 0 0 auto;
}

.install-app__qr {
  display: none;
  text-align: center;
}

.install-app__svg {
  display: block;
  width: 96px;
  height: 96px;
}

.install-app__caption {
  display: block;
  max-width: 118px;
  margin-top: 4px;
  color: #555;
  font-size: 10px;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .install-app {
    right: 16px;
    bottom: 16px;
    padding: 8px;
  }

  .install-app__button {
    display: none;
  }

  .install-app__qr {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .install-app__button {
    transition: none;
  }
}

/**
 * Public pages render the same control inside `.install-public`. They have no
 * dashboard bottom bar to sit above, so the control parks in the bottom-left
 * corner instead — small enough to stay out of the way on a phone. Checkout
 * renders no control at all (Page.astro), so it cannot cover the coupon row or
 * Place order. The dashboard rules above are untouched.
 */
.install-public .install-app {
  left: 12px;
  right: auto;
  bottom: 12px;
}

@media (min-width: 768px) {
  .install-public .install-app {
    left: 16px;
    bottom: 16px;
  }
}
