/*
 * PWA install banner + iOS instructions overlay.
 *
 * Banner pinned to the top of the viewport with theme-pink (#ef589c)
 * background. Hidden by default; the install module adds the
 * `--visible` modifier when eligibility checks pass.
 *
 * iOS overlay is a centred modal panel triggered by the "Show me how"
 * action on iPhones / iPads (where there's no native install API).
 */

.th-pwa-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: #ef589c;
  color: #fff;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: "Quicksand", system-ui, sans-serif;
}

.th-pwa-banner--visible {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.th-pwa-banner__icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  box-sizing: border-box;
}

.th-pwa-banner__text {
  flex: 1 1 auto;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.25;
}

.th-pwa-banner__action {
  background: #fff;
  color: #ef589c;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.th-pwa-banner__action:hover,
.th-pwa-banner__action:focus {
  background: #f5f5f5;
}

.th-pwa-banner__dismiss {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 0.4rem;
  cursor: pointer;
}

.th-pwa-banner__dismiss:hover,
.th-pwa-banner__dismiss:focus {
  opacity: 0.85;
}

/* When the banner is visible, push the page content down so it doesn't
   sit underneath. body:has() is supported on all current Chrome / Safari /
   Firefox; on older browsers the banner overlays the top of the header
   until dismissed — acceptable degradation. */
body:has(.th-pwa-banner--visible) {
  padding-top: 56px;
}

/* iOS instructions overlay */

.th-pwa-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.th-pwa-overlay--visible {
  display: flex;
}

.th-pwa-overlay__panel {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  max-width: 380px;
  width: 100%;
  font-family: "Quicksand", system-ui, sans-serif;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.th-pwa-overlay__title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: #2c5e7a;
  font-weight: 600;
}

.th-pwa-overlay__steps {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
  color: #444;
  line-height: 1.55;
  font-size: 0.95rem;
}

.th-pwa-overlay__steps li {
  margin-bottom: 0.45rem;
}

.th-pwa-overlay__note {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: #777;
}

.th-pwa-overlay__close {
  background: #ef589c;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-size: 0.95rem;
}

.th-pwa-overlay__close:hover,
.th-pwa-overlay__close:focus {
  background: #e74c8d;
}

@media (max-width: 480px) {
  .th-pwa-banner__text {
    font-size: 0.88rem;
  }
  .th-pwa-banner__icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}
