/* Beat Outlaws Android-only app responsiveness helpers. */

.bo-app-refresh-indicator {
  position: fixed;
  z-index: 20050;
  top: max(.45rem, env(safe-area-inset-top, 0px));
  left: 50%;
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(9, 9, 121, .94);
  box-shadow: 0 .2rem .8rem rgba(0, 0, 0, .28);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4rem);
  transition: opacity .12s ease, transform .12s ease;
  will-change: transform, opacity;
}

.bo-app-refresh-indicator.is-visible {
  opacity: 1;
}

.bo-app-refresh-indicator.is-ready {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .2), 0 .2rem .8rem rgba(0, 0, 0, .28);
}

.bo-app-refresh-indicator.is-refreshing {
  opacity: 1;
  transform: translate(-50%, .15rem);
}

.bo-app-refresh-indicator__icon {
  display: block;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
}

.bo-app-refresh-indicator.is-refreshing .bo-app-refresh-indicator__icon {
  animation: bo-app-refresh-spin .72s linear infinite;
}

@keyframes bo-app-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Immediate tactile acknowledgement while a primary tab navigation starts. */
.bo-native-android-app .bo-app-primary__item.bo-app-tab-pending .bo-app-primary__link {
  opacity: .7;
  transform: scale(.96);
}

.bo-native-android-app .bo-app-primary__link {
  transition: opacity .08s ease, transform .08s ease;
}

@media (prefers-reduced-motion: reduce) {
  .bo-app-refresh-indicator,
  .bo-native-android-app .bo-app-primary__link {
    transition: none;
  }

  .bo-app-refresh-indicator.is-refreshing .bo-app-refresh-indicator__icon {
    animation-duration: 1.5s;
  }
}


/* --------------------------------------------------------------------------
 * Native Android persistent bottom navigation
 * --------------------------------------------------------------------------
 *
 * MainActivity now draws the visible four-tab bottom bar outside the WebView.
 * Keep Drupal's Beat Primary menu in the DOM so it can still provide route URLs,
 * active state, unread counts, and Service Worker fast-tab behavior, but do not
 * paint the duplicate web bar inside the Android app.
 *
 * The bo-native-android-app class is added only by bo_app_cache after the native
 * WebView has set bo_native_platform=android. Ordinary Chrome/Samsung Internet/
 * Firefox visits never receive this class and keep the existing responsive menu.
 */
@media (max-width: 767.98px) {
  html.bo-native-android-app .bo-app-primary,
  html.bo-native-android-app #preheader .bo-app-primary {
    display: none !important;
  }

  /* Reserve the same space on every app page, including unusual routes where
   * the web menu's :has() padding rule might not otherwise apply. */
  html.bo-native-android-app body {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}
