/* ==========================================================================
   a2bid — NATIVE SHELL
   Chỉ có tác dụng khi web app chạy trong ứng dụng Android/iOS (Capacitor).
   Trên trình duyệt, các quy tắc dưới đây không khớp vì <html> không có
   class "is-native-app" — website giữ nguyên giao diện.
   ========================================================================== */

/* Vùng tai thỏ / thanh trạng thái: ribbon và header tự nới thêm khoảng an toàn
   để logo, ô tìm kiếm và nút đăng nhập không bị camera/notch che. */
html.is-native-app .demo-ribbon {
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
}

html.is-native-app .site-header {
  padding-top: env(safe-area-inset-top, 0px);
}

/* Tránh hiệu ứng kéo giãn/overscroll trắng của WebView khi vuốt ở đầu trang. */
html.is-native-app,
html.is-native-app body {
  overscroll-behavior-y: contain;
}

/* Thanh điều hướng dưới đã có env(safe-area-inset-bottom); thêm đệm để chữ
   không dính vạch home indicator trên iPhone. */
html.is-native-app .bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Banner mất mạng do native-shell.js chèn vào. */
.native-offline-banner {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #1f2a27;
  color: #f5f8f6;
  font: 600 13px/1.35 "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 14px 34px rgba(15, 32, 30, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.native-offline-banner.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.native-offline-banner .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c9a34a;
  flex: none;
}
