/* Neyyi Store customer brand header: fixed across every customer page. */
:root {
  --neyyi-brand-header-height: 56px;
  --neyyi-brand-header-max: 520px;
}

body.home-customer-page,
body.review-page-body {
  --neyyi-brand-header-height: 56px;
  --neyyi-brand-header-max: 430px;
}

body.check-page-body,
body.menu-page-body {
  --neyyi-brand-header-height: 66px;
  --neyyi-brand-header-max: 520px;
}

body.payment-page-body {
  --neyyi-brand-header-height: 70px;
  --neyyi-brand-header-max: 430px;
}

:is(.neyyi-header, .check-header, .menu-header, .payment-header, .customer-review-brand) {
  position: fixed !important;
  top: 0;
  left: 50%;
  z-index: 1000;
  width: 100%;
  max-width: var(--customer-width, var(--neyyi-brand-header-max, 520px));
  height: calc(var(--neyyi-brand-header-height, 56px) + env(safe-area-inset-top, 0px));
  min-height: 0 !important;
  margin: 0 !important;
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
  transform: translateX(-50%);
  background: rgba(255, 250, 251, .97);
  border-bottom: 1px solid rgba(241, 213, 223, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform .2s ease, opacity .2s ease;
}

.neyyi-header,
.check-header,
.menu-header,
.customer-review-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-review-brand {
  text-align: center;
  color: #e76aa0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

/* Keep the first content block below the fixed header. */
body.home-customer-page .neyyi-page,
body.review-page-body .neyyi-page {
  padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
}

body.check-page-body .check-page,
body.menu-page-body .menu-page {
  padding-top: calc(66px + env(safe-area-inset-top, 0px)) !important;
}

body.payment-page-body .payment-page {
  padding-top: calc(70px + env(safe-area-inset-top, 0px)) !important;
}

body.customer-responsive .review-write {
  padding-top: calc(84px + env(safe-area-inset-top, 0px)) !important;
}

/* Hide the brand and bottom navigation while a mobile keyboard is open. */
body.keyboard-open :is(.neyyi-header, .check-header, .menu-header, .payment-header, .customer-review-brand) {
  transform: translate(-50%, -110%);
  opacity: 0;
  pointer-events: none;
}

body.keyboard-open .customer-bottom-nav {
  transform: translate(-50%, 110%) !important;
  pointer-events: none;
}

@media (min-width: 1024px) {
  body.customer-responsive {
    --neyyi-brand-header-height: 80px;
  }

  body.customer-responsive.home-customer-page .neyyi-page,
  body.customer-responsive.review-page-body .neyyi-page,
  body.customer-responsive .review-write {
    padding-top: calc(84px + env(safe-area-inset-top, 0px)) !important;
  }

  body.customer-responsive.check-page-body .check-page,
  body.customer-responsive.menu-page-body .menu-page,
  body.customer-responsive.payment-page-body .payment-page {
    padding-top: calc(80px + env(safe-area-inset-top, 0px)) !important;
  }
}
