/**
 * ImpactRemit app-mode chrome — applied when html has class `app-mode`
 * (set by Capacitor bridge or ?app=1). Desktop browser stays unchanged.
 */
html.app-mode {
  /* Brand status strip (green + logo) — matches client mockup status bar */
  --ir-brandbar-h: calc(env(safe-area-inset-top, 0px) + 40px);
}

html.app-mode body {
  padding-top: var(--ir-brandbar-h) !important;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  background: #f7faf7;
}

/* Client mockup § status: deep green · clock left · logo top-right */
#ir-app-brandbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10040;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--ir-brandbar-h);
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 14px 8px;
  background: #0f5c14;
  color: #fff;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-sizing: border-box;
}

#ir-app-brandbar .ir-brand-time {
  min-width: 2.5em;
}

#ir-app-brandbar .ir-brand-mark {
  display: flex;
  align-items: center;
  margin-left: auto;
}

#ir-app-brandbar .ir-brand-mark img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  object-fit: contain;
}

/* Marketing hero banners (white text on image) — hide in shell; tabs + flow carry UX */
html.app-mode .small-img-bg-header {
  display: none !important;
}

html.app-mode .small-header-title,
html.app-mode .small-header-short-detail {
  color: #0f5c14 !important;
}

html.app-mode .navbar,
html.app-mode div.navbar,
html.app-mode .navbar-brand,
html.app-mode .navbar-toggler,
html.app-mode .navbar-collapse,
html.app-mode #navbarNav,
html.app-mode .navbar-nav,
html.app-mode nav.navbar,
html.app-mode .custom-nav,
html.app-mode .auth-buttons,
html.app-mode header,
html.app-mode .site-header,
html.app-mode .main-header,
html.app-mode .header,
html.app-mode .footer,
html.app-mode .footer_section,
html.app-mode footer,
html.app-mode .footer_social_media,
html.app-mode .cookie-banner,
html.app-mode #cookieConsent,
html.app-mode .cookie-notice,
html.app-mode [data-cookie-banner],
html.app-mode .site-promo-banner,
html.app-mode .eael-image-accordion,
html.app-mode .wp-site-blocks > header {
  display: none !important;
}

html.app-mode .exchange_form,
html.app-mode .container,
html.app-mode .container-fluid {
  max-width: 100% !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

html.app-mode input,
html.app-mode select,
html.app-mode textarea,
html.app-mode .form-control {
  font-size: 16px !important; /* avoid iOS zoom */
  max-width: 100%;
}

html.app-mode .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

html.app-mode .row > [class*="col-"] {
  padding-left: 6px;
  padding-right: 6px;
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
}

/* Bottom tab bar */
#ir-app-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid #d5ddd7;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 24px rgba(15, 92, 20, 0.08);
}

#ir-app-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #5a655e;
  text-decoration: none;
}

#ir-app-tabbar a.active {
  color: #0f5c14;
}

#ir-app-tabbar a .ir-tab-icon {
  font-size: 18px;
  line-height: 1;
}

html.app-mode .ir-offline-banner {
  position: sticky;
  top: var(--ir-brandbar-h);
  z-index: 10000;
  background: #7a5a12;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 13px;
}

html.app-mode .ir-app-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #f7f8f5;
  color: #1c231d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: calc(var(--ir-brandbar-h, 40px) + 12px) 20px 40px;
  overflow-y: auto;
}

html.app-mode .ir-lock-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

html.app-mode .ir-lock-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px -6px rgba(21, 125, 26, 0.35);
  margin: 8px auto 12px;
  display: block;
}

html.app-mode .ir-lock-logo {
  width: 56px;
  height: 56px;
  margin: 12px auto;
  border-radius: 14px;
  background: #e3f1e4;
  color: #0f5c14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

html.app-mode .ir-lock-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #1c231d;
  margin: 0 0 8px;
}

html.app-mode .ir-lock-sub,
html.app-mode .ir-lock-hint {
  margin: 0 0 12px;
  font-size: 14px;
  color: #5d6860;
  line-height: 1.45;
}

html.app-mode .ir-lock-cta {
  display: block;
  width: 100%;
  margin-top: 12px;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #157d1a;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  font-family: inherit;
}

html.app-mode .ir-lock-ghost {
  display: block;
  width: 100%;
  margin-top: 10px;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #5d6860;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
}

html.app-mode .ir-lock-err {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fde8e8;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

html.app-mode .ir-pin-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 16px;
}

html.app-mode .ir-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d9dfd9;
  background: #fff;
}

html.app-mode .ir-pin-dot.on {
  background: #157d1a;
  border-color: #157d1a;
}

html.app-mode .ir-pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

html.app-mode .ir-pin-key {
  min-height: 52px;
  border: 1px solid #d9dfd9;
  border-radius: 12px;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  color: #1c231d;
}

html.app-mode .ir-pin-key--empty {
  border: 0;
  background: transparent;
  min-height: 52px;
}

/* Biometric opt-in after OTP → /app/home */
html.app-mode .ir-bio-prompt {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(15, 92, 20, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
html.app-mode .ir-bio-prompt__card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px 16px;
  box-shadow: 0 12px 40px rgba(15, 92, 20, 0.25);
}
html.app-mode .ir-bio-prompt__card strong {
  display: block;
  font-size: 17px;
  color: #0f5c14;
  margin-bottom: 8px;
}
html.app-mode .ir-bio-prompt__card p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #5a655e;
  line-height: 1.45;
}
html.app-mode .ir-bio-prompt__card button {
  display: block;
  width: 100%;
  border-radius: 12px;
  padding: 14px;
  min-height: 48px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  margin-top: 8px;
  border: 0;
  cursor: pointer;
}
html.app-mode .ir-bio-prompt__card .ir-bio-yes {
  background: #157d1a;
  color: #fff;
}
html.app-mode .ir-bio-prompt__card .ir-bio-no {
  background: #fff;
  color: #0f5c14;
  border: 1.5px solid #157d1a;
}
