/**
 * App-shell chrome for mobile storefront screens (Cart, Orders, Order Detail).
 * Hides promo/logo/search/cats/footer; keeps bottom nav. OrangeNavHeader match.
 */

#home-page:has(.mm-app-chrome) .mm-topbar,
#home-page:has(.mm-app-chrome) .mm-header,
#home-page:has(.mm-app-chrome) .mm-nav,
#home-page:has(.mm-app-chrome) .mm-mobile-cats,
#home-page:has(.mm-app-chrome) .mm-footer {
  display: none !important;
}

/* Stack screens without tab bar (e.g. ReorderCart) */
#home-page:has(.mm-app-chrome--no-tabbar) .mm-bottom-nav {
  display: none !important;
}
#home-page:has(.mm-app-chrome--no-tabbar) .mm-od-bar {
  bottom: 0;
}
#home-page:has(.mm-app-chrome--no-tabbar) .mm-od,
#home-page:has(.mm-app-chrome--no-tabbar) .mm-od--has-bar {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

#home-page:has(.mm-app-chrome--no-tabbar) .mm-cart__foot {
  bottom: 0;
}

#home-page:has(.mm-app-chrome) .content-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  background: #fff !important;
}

#home-page:has(.mm-app-chrome) section.content {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Keep the last card's buttons above the fixed tab bar. */
#home-page:has(.mm-app-chrome:not(.mm-app-chrome--no-tabbar)) section.mm-app-chrome {
  padding-bottom: calc(16px + var(--mm-bottom-nav-h, 76px)) !important;
}

/* overflow-x on #home-page cancels sticky, so every orange bar is fixed. */
#home-page:has(.mm-app-chrome) section.content:has(> .mm-app-mhead) {
  padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
}

.mm-app-chrome > .mm-app-mhead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 480;
}

.mm-app-mhead {
  position: sticky;
  top: 0;
  z-index: 460;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--mm-primary, #F15E22);
  color: #fff;
}

.mm-app-mhead__row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 8px;
}

.mm-app-mhead__row--no-back {
  padding-left: 16px;
}

.mm-app-mhead__back,
.mm-app-mhead__bell {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
}

.mm-app-mhead__bell-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.mm-app-mhead__bell i {
  font-size: 22px;
  line-height: 1;
}

.mm-app-mhead__back:hover,
.mm-app-mhead__bell:hover {
  color: #fff;
  text-decoration: none;
}

.mm-app-mhead__title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Myanmar marks stack above and below the letters. A tight line box clips them into a pile. */
html[lang="mm"] .mm-app-mhead__title {
  font-family: "Noto Sans Myanmar", "Myanmar3", "Myanmar Text", "Padauk", sans-serif;
  font-weight: 400;
  font-synthesis: none;
  line-height: 40px;
  overflow-wrap: normal;
  word-break: keep-all;
}
html[lang="mm"] .mm-bottom-nav__link,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__link {
  font-family: "MMNotoMyanmar", "Myanmar3", "Myanmar Text", "Padauk", sans-serif;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.55;
  letter-spacing: 0;
}
html[lang="mm"] .mm-bottom-nav__link.active,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__link.active {
  font-weight: 400;
}
html[lang="mm"] .mm-bottom-nav__label,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__label {
  line-height: 1.55;
  overflow: visible;
  text-overflow: clip;
  font-weight: 500;
  font-synthesis: none;
}
html[lang="mm"] .mm-bottom-nav__link.active .mm-bottom-nav__label,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__link.active .mm-bottom-nav__label {
  font-weight: 600;
}
html[lang="mm"] .mm-bottom-nav__badge,
html[lang="mm"].mm-served-mobile .mm-bottom-nav__badge {
  font-family: "Open Sans", system-ui, sans-serif;
  font-weight: 700;
}

.mm-app-mhead__title--left {
  text-align: left;
}

/* Dedicated mobile pages keep the tab bar even when the window is wider than the phone breakpoint. */
html.mm-served-mobile {
  --mm-bottom-nav-h: calc(76px + env(safe-area-inset-bottom, 0px));
}
html.mm-served-mobile .mm-bottom-nav {
  display: flex;
  align-items: stretch;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  box-sizing: border-box;
  height: var(--mm-bottom-nav-h);
  background: #fff;
  border-top: 1px solid #E7E7E7;
  justify-content: space-around;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 8px rgba(19, 19, 19, 0.08);
}
html.mm-served-mobile .mm-bottom-nav__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  color: #898989;
  text-decoration: none;
  padding: 6px 2px 8px;
}
html.mm-served-mobile .mm-bottom-nav__link.active {
  color: #F15E22;
  font-weight: 700;
}
html.mm-served-mobile .mm-bottom-nav__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
}
html.mm-served-mobile .mm-bottom-nav__label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-app-mhead__bell-wrap .mm-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  border: 1px solid #fff;
  background: #2089dc;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
