.alfares-otp-keypad {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  margin-top: 10px;
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

.alfares-otp-keypad__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #c9d7ec;
  border-radius: 11px;
  background: linear-gradient(145deg, #f8fbff, #eef5ff);
  box-shadow: 0 7px 18px rgba(30, 64, 175, .08);
  color: #2459ad;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.alfares-otp-keypad__toggle:hover,
.alfares-otp-keypad__toggle[aria-expanded="true"] {
  border-color: #7ca5e8;
  background: linear-gradient(145deg, #edf4ff, #e3efff);
}

.alfares-otp-keypad__toggle:focus-visible,
.alfares-otp-keypad__grid button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}

.alfares-otp-keypad__toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.alfares-otp-keypad__panel {
  /* Keep all rows in the owning dialog's layout and scrollable area. */
  box-sizing: border-box;
  width: min(262px, 100%);
  padding: 13px;
  border: 1px solid #d4dfed;
  border-radius: 17px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 55px rgba(15, 35, 68, .22);
  backdrop-filter: blur(14px);
}

.alfares-otp-keypad__panel[hidden] { display: none; }

.alfares-otp-keypad__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.alfares-otp-keypad__grid button {
  display: grid;
  place-items: center;
  min-height: 43px;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  background: #f8fafc;
  color: #163357;
  font: 850 16px/1 "Segoe UI", Tahoma, sans-serif;
  cursor: pointer;
}

.alfares-otp-keypad__grid button:hover { border-color: #92b4ed; background: #edf4ff; }
.alfares-otp-keypad__grid button.is-command { color: #596b83; font-size: 10px; }
.alfares-otp-keypad__grid button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.alfares-otp-keypad__panel small { display: block; margin-top: 9px; color: #718096; font-size: 9px; text-align: center; }

@media (max-width: 480px) {
  .alfares-otp-keypad__toggle { min-height: 42px; }
  .alfares-otp-keypad__grid button { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .alfares-otp-keypad *, .alfares-otp-keypad *::before, .alfares-otp-keypad *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
