/* Install-app chooser modal (Google Play, App Store, PWA) */

body.bh-pwa-modal-open {
  overflow: hidden;
}

.bh-nav-install {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.bh-pwa-prompt {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.bh-pwa-prompt[hidden],
.bh-pwa-prompt [hidden] {
  display: none !important;
}

.bh-pwa-prompt--visible {
  opacity: 1;
  pointer-events: auto;
}

.bh-pwa-prompt__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 24, 48, 0.45);
}

.bh-pwa-prompt__panel {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  margin-bottom: env(safe-area-inset-bottom, 0px);
  padding: 1.25rem 1.25rem 1rem;
  background: var(--bh-surface, #ffffff);
  color: var(--bh-ink, #0a1830);
  border: 1px solid var(--bh-border, #c5d6f0);
  border-radius: 16px 16px 12px 12px;
  box-shadow: var(--bh-shadow-lg, 0 18px 44px rgba(10, 24, 48, 0.13));
}

.bh-pwa-prompt__title {
  margin: 0;
  font-family: var(--bh-font, Outfit, system-ui, sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
}

.bh-pwa-prompt__body {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--bh-muted, #3d4f6b);
}

.bh-pwa-prompt__hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--bh-ink-soft, #1e3050);
  background: var(--bh-surface-raised, #f5f8fd);
  border-radius: 8px;
}

.bh-pwa-prompt__options {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.bh-pwa-prompt__option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 56px;
  padding: 0.7rem 0.85rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: var(--bh-surface-raised, #f5f8fd);
  border: 1px solid var(--bh-border, #c5d6f0);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
}

.bh-pwa-prompt__option:hover,
.bh-pwa-prompt__option:focus-visible {
  border-color: var(--bh-blue, #1b54b6);
  background: var(--bh-blue-light, #e8f0ff);
  color: inherit;
}

.bh-pwa-prompt__option-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.bh-pwa-prompt__option-icon--play {
  background: #188038;
}

.bh-pwa-prompt__option-icon--apple {
  background: #111111;
}

.bh-pwa-prompt__option-icon--pwa {
  background: var(--bh-blue, #1b54b6);
}

.bh-pwa-prompt__option-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.bh-pwa-prompt__option-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.bh-pwa-prompt__option-meta {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--bh-muted, #3d4f6b);
}

.bh-pwa-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.bh-pwa-prompt__actions .btn {
  font-weight: 600;
  min-height: 44px;
}

/* Beat Bootstrap / public_a11y `display: inline-flex !important` on .btn */
.bh-pwa-prompt.is-chooser #pwa-install-prompt-back,
.bh-pwa-prompt.is-chooser #pwa-install-prompt-accept,
.bh-pwa-prompt.is-pwa #pwa-install-chooser,
.bh-pwa-prompt.is-pwa:not(.has-back) #pwa-install-prompt-back,
.bh-pwa-prompt.is-pwa:not(.has-native-install) #pwa-install-prompt-accept {
  display: none !important;
}

@media (min-width: 576px) {
  .bh-pwa-prompt {
    align-items: center;
  }

  .bh-pwa-prompt__panel {
    border-radius: 16px;
    margin-bottom: 0;
  }
}

@media (display-mode: standalone), (display-mode: window-controls-overlay) {
  [data-pwa-install] {
    display: none !important;
  }
}
