/* ==========================================================================
   mobile-nav.css — মোবাইলে প্রতিটি পেজের নেভবার (টপবার) এক লাইনে রাখার নিয়ম
   শুধু মোবাইল/ছোট পর্দায় কাজ করে; ডেস্কটপ লেআউট অপরিবর্তিত।
   ব্যবহার: নেভবার এলিমেন্টে class="nb-bar" থাকতে হবে।
   ধাপ:  ≤768px  এক লাইন + শিরোনাম ellipsis + সাব-টাইটেল লুকানো
         ≤600px  তারিখের পিল লুকানো
         ≤520px  বাটনগুলো আইকন-অনলি (টুলটিপ থাকে)
   ========================================================================== */
@media (max-width: 768px) {
  .nb-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 56px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)) !important;
    box-sizing: border-box;
  }

  /* বাম অংশ: মেনু বাটন + শিরোনাম */
  .nb-bar > :first-child {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
  .nb-bar .hd-l {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }
  .nb-bar .hd-l > div,
  .nb-bar > div:first-child {
    min-width: 0;
  }
  .nb-bar .menu-btn { flex: 0 0 auto !important; }

  .nb-bar h1 {
    display: block !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .nb-bar .sub { display: none !important; }

  /* ডান অংশ: বাটন/পিল */
  .nb-bar > :last-child:not(:first-child) {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 0 !important;
  }
  .nb-bar .pill,
  .nb-bar .back-link,
  .nb-bar .sync-status {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 7px 10px !important;
    font-size: 12.5px !important;
    line-height: 1.2 !important;
  }
}

/* ছোট ফোন: তারিখের পিল লুকানো */
@media (max-width: 600px) {
  .nb-bar .pill.dt,
  .nb-bar .pill.date { display: none !important; }
}

/* ফোন: বাটন আইকন-অনলি */
@media (max-width: 520px) {
  .nb-bar h1 { font-size: 14.5px !important; }

  .nb-bar .pill:not(.av):not(.pill-txt):not(.dt):not(.date),
  .nb-bar .back-link,
  .nb-bar .sync-status {
    font-size: 0 !important;          /* টেক্সট লুকায়, আইকন নিচে ফিরিয়ে আনা হয় */
    gap: 0 !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
  }
  .nb-bar .pill:not(.av):not(.pill-txt):not(.dt):not(.date) i,
  .nb-bar .back-link i,
  .nb-bar .sync-status i {
    font-size: 15px !important;
    margin: 0 !important;
  }
  .nb-bar .pill:not(.pill-txt) .dot { margin: 0 !important; }

  /* অ্যাভাটার পিল: শুধু ছবি */
  .nb-bar .pill.av { padding: 3px !important; gap: 0 !important; }
  .nb-bar .pill.av > i { display: none !important; }

  /* অপেক্ষমান ব্যাজ: আইকন + সংখ্যা */
  .nb-bar #pendingBadge {
    font-size: 0 !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
  }
  .nb-bar #pendingBadge #pendingCount { font-size: 12px !important; }
}

@media (max-width: 360px) {
  .nb-bar { gap: 6px !important; padding-left: 10px !important; padding-right: 10px !important; }
  .nb-bar h1 { font-size: 14px !important; }
  .nb-bar > :last-child:not(:first-child) { gap: 4px !important; }
}
