/* Amar Kashimpur — Customer Mobile Navigation
 * Mobile only (<=767px). ONE clearance system via --ak-mnav-total-height.
 * Nav box includes safe-area in padding-bottom; measured height counts it once.
 */
:root {
  --ak-mnav-bar-height: 56px;
  /* Fallback before JS: bar + safe-area + gap */
  --ak-mnav-total-height: calc(56px + env(safe-area-inset-bottom, 0px) + 16px);
  --ak-mnav-teal: #0A7C6E;
  --ak-mnav-amber: #F59E0B;
  --ak-mnav-text: #17312D;
  --ak-mnav-muted: #6B7F7A;
  --ak-mnav-border: #DDE9E6;
}

#akc-mnav-spacer {
  display: none !important;
  height: 0 !important;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

/* Desktop: hide nav, no bottom clearance */
@media (min-width: 768px) {
  .akc-mnav-root { display: none !important; }
  body.akc-has-mnav {
    padding-bottom: 0 !important;
  }
}

/* Mobile: body reserves measured nav height so content scrolls above fixed nav */
@media (max-width: 767px) {
  body.akc-has-mnav {
    padding-bottom: var(--ak-mnav-total-height, 72px) !important;
    box-sizing: border-box;
  }

  /* Hide marketplace's own duplicate bottom nav */
  body.akc-has-mnav .akc-mp-bottom-nav {
    display: none !important;
  }

  /* Marketplace shell: modest internal pad only (body already clears nav) */
  body.akc-has-mnav .akc-mp-app {
    padding-bottom: 16px !important;
  }
}

.akc-mnav-root {
  font-family: "Noto Sans Bengali", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.akc-mnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  /* Bar content height; safe-area only via padding-bottom (counted once in total). */
  min-height: var(--ak-mnav-bar-height);
  height: auto;
  padding: 0 2px env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid var(--ak-mnav-border);
  box-shadow: 0 -4px 18px rgba(23, 49, 45, 0.07);
  box-sizing: border-box;
}

.akc-mnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 6px 2px;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--ak-mnav-muted);
  text-decoration: none !important;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.akc-mnav-item:focus-visible {
  outline: 2px solid var(--ak-mnav-teal);
  outline-offset: -2px;
  border-radius: 8px;
}
.akc-mnav-item.is-active {
  color: var(--ak-mnav-teal);
}
.akc-mnav-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}
.akc-mnav-ico svg {
  display: block;
}
.akc-mnav-lbl {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.akc-mnav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ak-mnav-amber);
  color: var(--ak-mnav-text);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.akc-mnav-badge.is-empty {
  display: none;
}

/* Search overlay */
.akc-mnav-search {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: #F4F8F7;
  display: flex;
  flex-direction: column;
  font-family: "Noto Sans Bengali", system-ui, sans-serif;
}
.akc-mnav-search[hidden] {
  display: none !important;
}
.akc-mnav-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0));
  background: #fff;
  border-bottom: 1px solid var(--ak-mnav-border);
  box-shadow: 0 2px 10px rgba(23, 49, 45, 0.04);
}
.akc-mnav-search-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #E6F4F1;
  color: var(--ak-mnav-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.akc-mnav-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F4F8F7;
  border: 1px solid var(--ak-mnav-border);
  border-radius: 999px;
  padding: 0 14px;
  min-height: 44px;
}
.akc-mnav-search-ico {
  color: var(--ak-mnav-muted);
  flex-shrink: 0;
}
.akc-mnav-search-field input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ak-mnav-text);
  min-width: 0;
  padding: 10px 0;
}
.akc-mnav-search-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 24px;
  -webkit-overflow-scrolling: touch;
}
.akc-mnav-search-hint,
.akc-mnav-search-empty,
.akc-mnav-search-err,
.akc-mnav-search-loading {
  color: var(--ak-mnav-muted);
  font-size: 14px;
  text-align: center;
  padding: 28px 12px;
  margin: 0;
}
.akc-mnav-search-sec {
  margin: 0 0 16px;
}
.akc-mnav-search-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ak-mnav-text);
  margin: 0 0 10px;
}
.akc-mnav-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--ak-mnav-border);
  border-radius: 14px;
  margin-bottom: 8px;
  text-decoration: none !important;
  color: inherit !important;
}
.akc-mnav-result-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #E6F4F1 center/cover no-repeat;
  flex-shrink: 0;
}
.akc-mnav-result-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ak-mnav-text);
  line-height: 1.3;
}
.akc-mnav-result-meta {
  font-size: 12px;
  color: var(--ak-mnav-muted);
  margin-top: 2px;
}

body.akc-mnav-search-open {
  overflow: hidden !important;
}

@media (min-width: 768px) {
  .akc-mnav-search { display: none !important; }
}
