/* Mobile app install prompt */
.app-install-prompt {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1075;
  max-width: 420px;
  margin: 0 auto;
  background: var(--bh-surface, #ffffff);
  color: var(--bh-ink, #0a1830);
  border: 1px solid var(--bh-border, #c5d6f0);
  border-radius: var(--bh-radius-lg, 16px);
  box-shadow: var(--bh-shadow-lg, 0 18px 44px rgba(10, 24, 48, 0.13));
  overflow: hidden;
}

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

.app-install-prompt-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
}

.app-install-prompt-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: var(--bh-radius-sm, 8px);
  background: linear-gradient(145deg, var(--bh-blue, #1b54b6), var(--bh-navy, #0b1f42));
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.app-install-prompt-body {
  min-width: 0;
  flex: 1 1 auto;
}

.app-install-prompt-title {
  margin: 0 0 4px;
  font-family: var(--bh-font, "Outfit", system-ui, sans-serif);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--bh-ink, #0a1830);
}

.app-install-prompt-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--bh-muted, #3d4f6b);
}

.app-install-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.app-install-prompt-actions .btn {
  font-weight: 600;
}

.app-install-prompt-dismiss {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--bh-muted-soft, #5a6b86);
  width: 32px;
  height: 32px;
  border-radius: var(--bh-radius-sm, 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.app-install-prompt-dismiss:hover,
.app-install-prompt-dismiss:focus {
  background: var(--bh-surface-raised, #f5f8fd);
  color: var(--bh-ink, #0a1830);
}

/* Sit above the cookie banner when both are present */
body.cookie-consent-visible .app-install-prompt {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px) + 120px);
}

@media (min-width: 576px) {
  .app-install-prompt {
    left: auto;
    right: 16px;
    bottom: 16px;
    margin: 0;
  }

  body.cookie-consent-visible .app-install-prompt {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px) + 100px);
  }
}
