/* NoorGhor App — front-end */
:root { --ng-green: #10214a; --ng-gold: #d4a017; }

/* Bottom navigation (mobile only) */
.ngapp-nav { display: none; }
@media (max-width: 768px) {
  .ngapp-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990;
    background: #fff; border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -4px 18px rgba(0,0,0,.06);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
  }
  .ngapp-has-nav body { padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important; }
  .ngapp-nav__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: #6b7a70 !important; text-decoration: none !important; font-size: 11.5px; line-height: 1.2;
    position: relative; padding: 4px 0; border-radius: 12px; -webkit-tap-highlight-color: transparent;
  }
  .ngapp-nav__item svg { width: 23px; height: 23px; }
  .ngapp-nav__item.is-active { color: var(--ng-green) !important; font-weight: 600; }
  .ngapp-nav__item.is-active::before {
    content: ''; position: absolute; top: -7px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ng-green);
  }
  .ngapp-nav__item.is-wa { color: #1c9d55 !important; }
  .ngapp-nav__item:active { background: rgba(15,110,60,.07); }
  .ngapp-badge {
    position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--ng-gold); color: #1d2a22; font-size: 10.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  }
  .ngapp-badge[data-count="0"] { display: none; }
  /* Push common floating buttons (chat widgets, back-to-top) above the nav */
  .ngapp-has-nav #scroll-top, .ngapp-has-nav .back-to-top, .ngapp-has-nav .scroll-to-top, .ngapp-has-nav #ast-scroll-top { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
}

/* Install popup */
.ngapp-install {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--ngapp-offset, 0px) + 14px); z-index: 99991;
  max-width: 440px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 12px 12px 12px 14px;
  box-shadow: 0 10px 34px rgba(0,0,0,.18); border: 1px solid rgba(0,0,0,.05);
  font-family: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
  animation: ngapp-up .35s ease-out;
}
.ngapp-install[hidden] { display: none; }
@media (min-width: 769px) { .ngapp-install { bottom: 20px; left: auto; right: 20px; } }
.ngapp-install img { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.ngapp-install__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ngapp-install__txt strong { font-size: 15px; color: #1d2a22; }
.ngapp-install__txt span { font-size: 12.5px; color: #5a6b60; line-height: 1.45; }
.ngapp-install__btn {
  flex: none; background: var(--ng-green); color: #fff; border: 0; border-radius: 10px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.ngapp-install__x {
  position: absolute; top: -9px; right: -6px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: #fff; color: #555; box-shadow: 0 2px 8px rgba(0,0,0,.18); font-size: 18px; line-height: 26px; padding: 0; cursor: pointer;
}
@keyframes ngapp-up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Floating "App download" button */
.ngapp-fab {
  position: fixed; left: 12px; bottom: calc(var(--ngapp-offset, 0px) + 12px); z-index: 99989;
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px 9px 11px;
  background: var(--ng-green); color: #fff; border: 2px solid var(--ng-gold); border-radius: 999px;
  font: 600 13.5px/1 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.2); -webkit-tap-highlight-color: transparent;
}
.ngapp-fab[hidden] { display: none; }
.ngapp-fab svg { flex: none; }
.ngapp-fab:active { transform: scale(.96); }
@media (min-width: 769px) { .ngapp-fab { left: 20px; bottom: 20px; } }
.ngapp-fab.is-covered { display: none; }
@media (display-mode: standalone) { .ngapp-fab { display: none !important; } }

/* Shortcode button */
.ngapp-cta {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ng-green); color: #fff;
  border: 2px solid var(--ng-gold); border-radius: 12px; padding: 11px 20px; font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.ngapp-cta svg { width: 20px; height: 20px; }
.ngapp-cta.is-installed { opacity: .7; }

/* When opened as an installed app */
@media (display-mode: standalone) {
  .ngapp-install { display: none !important; }
}
