.smart-product-hero.account-number-menu-open {
  overflow: visible !important;
  z-index: 41 !important;
}

.account-number-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 0.75rem;
  background: #f1f5f9;
  color: #0f172a;
}

.account-number-card label {
  min-width: 0;
}

.account-number-card label > span {
  display: block;
}

.account-number-card input,
.account-number-card button {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: white;
  padding: 0.4rem 0.5rem;
}

.account-number-card input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font: 0.72rem ui-monospace, monospace;
}

.account-number-card button {
  color: #115e59;
  cursor: pointer;
}

.account-number-feedback {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .product-account-menu.has-account-number.is-mobile-open {
    position: relative;
  }

  .account-number-card {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 60;
    width: min(24rem, calc(100vw - 1.4rem));
    border: 1px solid #cbd5e1;
    background: white;
    box-shadow: 0 18px 45px rgb(15 23 42 / 0.18);
  }
}

@media (max-width: 767px) {
  .product-account-actions .product-account-menu.has-account-number.is-mobile-open .product-account-menu-panel {
    width: min(19rem, calc(100vw - 3rem)) !important;
  }

  .account-number-card {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The compact header hides account buttons and spans by default. */
  .product-account-actions .has-account-number .account-number-card button,
  .product-account-actions .has-account-number .account-number-card label > span,
  .product-account-actions .has-account-number .account-number-card .account-number-feedback {
    display: block !important;
  }
}
