/* Force mobile layout when running as an installed PWA (home-screen app). */

html.bmp-pwa #mobile-menu-btn {
  display: inline-flex !important;
}

html.bmp-pwa #header-actions {
  display: none;
  position: absolute;
  right: 1rem;
  top: calc(100% + 0.25rem);
  width: min(92vw, 340px);
  min-width: 0;
  padding: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid var(--bmp-border);
  background: var(--bmp-bg);
  backdrop-filter: blur(10px);
  z-index: 45;
}

html.bmp-pwa #header-actions.mobile-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

html.bmp-pwa #header-actions.mobile-open > * {
  width: 100%;
  text-align: center;
  justify-content: center;
}

html.bmp-pwa #header-actions.mobile-open #auth-indicator {
  justify-content: center;
  flex-wrap: wrap;
}

html.bmp-pwa #domain-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.bmp-pwa main h1.font-headline.font-extrabold {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

/* History: card layout instead of wide table */
html.bmp-pwa .hist-table thead {
  display: none;
}

html.bmp-pwa .hist-table tbody tr {
  display: block;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px;
}

html.bmp-pwa .hist-table tbody td {
  display: block;
  border: none;
  padding: 6px 8px;
}

html.bmp-pwa .hist-table tbody td::before {
  content: attr(data-label);
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}
