/*
 * mobile.css — mobile-first polish for classof2000.info (#50).
 * Loaded AFTER theme.css (which defines the --ghhs-* tokens + Bootstrap remap),
 * so it only adds; it never restyles Bootstrap components destructively.
 *
 * Provides: comfortable touch targets, iOS safe-area padding, a sticky mobile
 * bottom navigation bar (hidden >= lg), and the install / push button styling.
 */

/* ---- Safe-area + comfortable tap targets (touch only) ------------------- */
@media (hover: none) and (pointer: coarse) {
  .navbar-ghhs .nav-link,
  .dropdown-item,
  .btn { min-height: 44px; }              /* WCAG 2.5.5 target size */

  .navbar-ghhs .nav-link { display: flex; align-items: center; }

  /* Keep primary content clear of the bottom nav + the iOS home indicator. */
  body.has-bottom-nav main {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }
}

/* ---- Mobile bottom navigation ------------------------------------------ */
.c2k-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1030;
  display: flex;
  background: var(--ghhs-blue, #0B2C5C);
  border-top: 2px solid var(--ghhs-gold, #C9A227);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(11, 44, 92, .28);
}
.c2k-bottom-nav a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: .5rem .25rem;
  min-height: 3.5rem;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  font-size: .68rem;
  line-height: 1;
  position: relative;
}
.c2k-bottom-nav a .bi { font-size: 1.25rem; }
.c2k-bottom-nav a.active,
.c2k-bottom-nav a:active { color: var(--ghhs-gold-bright, #FFC72C); }
.c2k-bottom-nav a.active::before {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--ghhs-gold-bright, #FFC72C);
}
/* Unread/notification pip on a bottom-nav item. */
.c2k-bottom-nav a .c2k-pip {
  position: absolute; top: .35rem; right: 50%; margin-right: -1.15rem;
  min-width: 1rem; height: 1rem; padding: 0 .25rem;
  background: #E03131; color: #fff; border-radius: 1rem;
  font-size: .6rem; font-weight: 700; line-height: 1rem; text-align: center;
}
.c2k-bottom-nav a .c2k-pip.d-none { display: none; }

/* Show only on small screens; the top navbar is the desktop IA. */
@media (min-width: 992px) {
  .c2k-bottom-nav { display: none; }
  body.has-bottom-nav main { padding-bottom: 0; }
}

/* ---- Install ("Add to Home Screen") + push buttons --------------------- */
[data-pwa-install],
[data-push-toggle] { -webkit-tap-highlight-color: transparent; }

.c2k-install-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
  z-index: 1035;
  border: 0;
  border-radius: 999px;
  padding: .6rem 1.05rem;
  font-weight: 600;
  color: var(--ghhs-blue, #0B2C5C);
  background: var(--ghhs-gold-bright, #FFC72C);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
@media (min-width: 992px) {
  .c2k-install-fab { bottom: 1.25rem; }
}
[data-push-toggle].is-subscribed {
  background: var(--ghhs-blue-050, #EAF0F8);
  border-color: var(--ghhs-blue, #0B2C5C);
  color: var(--ghhs-blue, #0B2C5C);
}

/* ---- Small readability tweaks for phones -------------------------------- */
@media (max-width: 575.98px) {
  h1, .h1 { font-size: 1.6rem; }
  h2, .h2 { font-size: 1.3rem; }
  .card { border-radius: .75rem; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
}
