/*
 * Commerce Auth Login Modal Styles
 * Guest login modal shell, phone/OTP/profile steps, and responsive modal behavior.
 */

/* Modal shell, backdrop, panel, and shared form controls. */
.commerce-auth-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.commerce-auth-modal[hidden] {
  display: none !important;
}

.commerce-auth-modal {
  all: initial;
  --commerce-auth-accent: #0f766e;
  --commerce-auth-accent-dark: #115e59;
  --commerce-auth-accent-soft: #d9f4ee;
  --commerce-auth-ink: #172033;
  --commerce-auth-muted: #617086;
  --commerce-auth-line: rgba(23, 32, 51, 0.1);
  --commerce-auth-surface: #fffdf8;
  --commerce-auth-surface-strong: #ffffff;
  --commerce-auth-glass-surface: rgba(255, 255, 255, 0.8);
  --commerce-auth-glass-surface-strong: rgba(255, 255, 255, 0.92);
  --commerce-auth-glass-border: rgba(255, 255, 255, 0.34);
  --commerce-auth-modal-backdrop: rgba(15, 23, 42, 0.58);
  --commerce-auth-modal-radius: 28px;
  --commerce-auth-control-radius: 14px;
  --commerce-auth-control-height: 54px;
  --commerce-auth-action-height: 42px;
  --commerce-auth-focus-ring: rgba(15, 118, 110, 0.18);
  --commerce-auth-modal-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  --commerce-auth-button-bg: var(--commerce-auth-accent);
  --commerce-auth-button-bg-hover: var(--commerce-auth-accent-dark);
  --commerce-auth-button-text: #ffffff;
  --commerce-auth-button-border: transparent;
  --commerce-auth-button-shadow: 0 14px 30px rgba(15, 118, 110, 0.22);
  --commerce-auth-button-sheen: rgba(255, 255, 255, 0.24);
  --commerce-auth-secondary-button-bg: rgba(255, 255, 255, 0.72);
  --commerce-auth-secondary-button-text: var(--commerce-auth-ink);
  --commerce-auth-secondary-button-border: var(--commerce-auth-line);
  --commerce-auth-font-sans:
    "DM Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    sans-serif;
  --commerce-auth-font-display: "Sora", "Trebuchet MS", sans-serif;
  font-family: var(--commerce-auth-font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  isolation: isolate;
  overscroll-behavior: contain;
}

.commerce-auth-modal *,
.commerce-auth-modal *::before,
.commerce-auth-modal *::after {
  box-sizing: border-box;
  max-width: none;
}

.commerce-auth-modal,
.commerce-auth-modal button,
.commerce-auth-modal input,
.commerce-auth-modal textarea,
.commerce-auth-modal select,
.commerce-auth-modal label,
.commerce-auth-modal p,
.commerce-auth-modal h1,
.commerce-auth-modal h2,
.commerce-auth-modal h3,
.commerce-auth-modal h4,
.commerce-auth-modal h5,
.commerce-auth-modal h6,
.commerce-auth-modal span,
.commerce-auth-modal strong,
.commerce-auth-modal small {
  font-family: var(--commerce-auth-font-sans);
}

.commerce-auth-modal h1,
.commerce-auth-modal h2,
.commerce-auth-modal h3,
.commerce-auth-modal h4,
.commerce-auth-modal h5,
.commerce-auth-modal h6 {
  font-weight: 700;
  line-height: 1.2;
}

.commerce-auth-modal p,
.commerce-auth-modal label,
.commerce-auth-modal button,
.commerce-auth-modal input,
.commerce-auth-modal textarea,
.commerce-auth-modal select,
.commerce-auth-modal small,
.commerce-auth-modal span {
  line-height: inherit;
}

.commerce-auth-modal :where(button, input, textarea, select) {
  margin: 0;
  font: inherit;
  color: inherit;
  text-transform: none;
  text-indent: 0;
  text-shadow: none;
  letter-spacing: normal;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.commerce-auth-modal :where(a) {
  color: inherit;
  text-decoration: none;
}

.commerce-auth-modal :where(ul, ol, li) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.commerce-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(15, 118, 110, 0.18),
      transparent 36%
    ),
    var(--commerce-auth-modal-backdrop);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
}

.commerce-auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  max-height: calc(100vh - 48px);
  border: 1px solid var(--commerce-auth-glass-border);
  border-radius: var(--commerce-auth-modal-radius);
  background:
    linear-gradient(
      180deg,
      var(--commerce-auth-glass-surface-strong) 0%,
      var(--commerce-auth-glass-surface) 100%
    );
  box-shadow: var(--commerce-auth-modal-shadow);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  overflow: hidden;
  contain: layout paint style;
}

.commerce-auth-modal__layout {
  display: block;
  max-height: inherit;
}

.commerce-auth-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--commerce-auth-button-border);
  border-radius: 999px;
  background: var(--commerce-auth-button-bg);
  color: var(--commerce-auth-button-text);
  box-shadow: var(--commerce-auth-button-shadow);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
  font-family: var(--commerce-auth-font-sans);
  line-height: 1;
}

.commerce-auth-modal .commerce-auth-modal__close {
  background: var(--commerce-auth-button-bg) !important;
  color: var(--commerce-auth-button-text) !important;
  border-radius: 999px !important;
}

.commerce-auth-modal__close .commerce-auth-control-icon {
  display: block;
  width: 16px;
  height: 16px;
  color: currentColor;
  stroke: currentColor;
  pointer-events: none;
}

.commerce-auth-modal__close:hover {
  transform: translateY(-1px);
  background: var(--commerce-auth-button-bg-hover);
}

.commerce-auth-modal__logo-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin: -4px 0 24px;
}

.commerce-auth-modal__brand-logo {
  display: block;
  width: auto;
  max-width: 150px;
  max-height: 58px;
  object-fit: contain;
  margin: auto;
}

.commerce-auth-modal__brand-copy {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--commerce-auth-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ca-color-primary, #0f766e) 10%, var(--commerce-auth-surface-strong));
  padding: 6px 10px;
  width: max-content;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.commerce-auth-modal__powered-by {
  font-family: var(--commerce-auth-font-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--commerce-auth-accent);
  color: color-mix(in srgb, var(--commerce-auth-accent) 72%, var(--commerce-auth-muted));
  line-height: 1;
}

.commerce-auth-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-family: var(--commerce-auth-font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--commerce-auth-accent);
  line-height: 1;
}

.commerce-auth-modal__brand-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--commerce-auth-font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--commerce-auth-ink);
}

.commerce-auth-modal .commerce-auth-modal__powered-by {
  color: var(--commerce-auth-accent) !important;
  color: color-mix(in srgb, var(--commerce-auth-accent) 72%, var(--commerce-auth-muted)) !important;
}

/* Modal content continuation, step UI, and mobile adaptations. */
.commerce-auth-modal__content {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  padding: 28px;
  background: transparent;
  overflow-y: auto;
}

.commerce-auth-flow {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.commerce-auth-flow__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding-right: 48px;
  margin-bottom: 14px;
}

.commerce-auth-flow__chrome {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.commerce-auth-flow__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--commerce-auth-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  font-family: var(--commerce-auth-font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--commerce-auth-ink);
  cursor: pointer;
}

.commerce-auth-flow__step-indicator {
  margin: 0;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--commerce-auth-accent-soft);
  font-family: var(--commerce-auth-font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--commerce-auth-accent);
  white-space: nowrap;
}

.commerce-auth-flow__notice {
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(153, 27, 27, 0.12);
  border-radius: 10px;
  background: #fff4f4;
  font-family: var(--commerce-auth-font-sans);
  font-size: 14px;
  line-height: 1.2;
  color: #991b1b;
}

.commerce-auth-flow__notice[data-state="success"] {
  border-color: rgba(22, 163, 74, 0.2);
  background: #f0fdf4;
  color: #15803d;
}

.commerce-auth-step {
  display: none;
  animation: commerceAuthFade 0.24s ease;
}

.commerce-auth-step.is-active {
  display: block;
}

.commerce-auth-step__header {
  margin-bottom: 20px;
}

.commerce-auth-step__title {
  margin: 0;
  font-family: var(--commerce-auth-font-display);
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--commerce-auth-ink);
  text-align: center;
}

.commerce-auth-step__description {
  margin: 8px auto 0;
  max-width: 44ch;
  font-family: var(--commerce-auth-font-sans);
  font-size: 15px;
  line-height: 1.45;
  color: var(--commerce-auth-muted);
  text-align: center;
}

.commerce-auth-otp-channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  color: inherit;
  font-weight: inherit;
}

.commerce-auth-otp-channel__label {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-weight: inherit;
}

.commerce-auth-otp-channel__image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
}

.commerce-auth-inline-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--commerce-auth-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--commerce-auth-accent);
  cursor: pointer;
}

.commerce-auth-step__badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fdf2d9;
  font-family: var(--commerce-auth-font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #925d00;
}

.commerce-auth-form {
  display: grid;
  gap: 18px;
}

.commerce-auth-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.commerce-auth-field {
  display: grid;
}

.commerce-auth-field__label,
.commerce-auth-country__search-label {
  font-family: var(--commerce-auth-font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--commerce-auth-muted);
  margin: 0 0 7px 2px;
}

.commerce-auth-field__hint {
  margin: 0;
  font-family: var(--commerce-auth-font-sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--commerce-auth-muted);
}

.commerce-auth-field__hint--firebase {
  margin-top: -4px;
}

.commerce-auth-firebase-recaptcha {
  min-height: 1px;
}

.commerce-auth-phone-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--commerce-auth-line);
  border-radius: var(--commerce-auth-control-radius);
  background: var(--commerce-auth-glass-surface-strong);
  overflow: visible;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.commerce-auth-country {
  position: relative;
  flex: 0 0 auto;
  border-right: 1px solid var(--commerce-auth-line);
  z-index: 3;
}

.commerce-auth-country__trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
  width: auto;
  min-width: 88px;
  min-height: var(--commerce-auth-control-height);
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-family: var(--commerce-auth-font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--commerce-auth-ink);
  cursor: pointer;
  white-space: nowrap;
}

.commerce-auth-country--locked .commerce-auth-country__trigger,
.commerce-auth-country__trigger[disabled] {
  cursor: default;
  background: rgba(15, 23, 42, 0.02);
}

.commerce-auth-country__flag {
  flex: 0 0 24px;
  width: 24px;
  font-size: 22px;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.commerce-auth-country__code {
  margin: 0 5px;
  display: inline-flex;
  align-items: center;
  font-family: var(--commerce-auth-font-sans);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  flex: 0 0 auto;
}

.commerce-auth-country__caret {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--commerce-auth-muted);
}

.commerce-auth-country--locked .commerce-auth-country__caret {
  opacity: 0.25;
}

.commerce-auth-country__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 320px;
  z-index: 80;
  padding: 16px;
  border: 1px solid var(--commerce-auth-line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.commerce-auth-modal [hidden] {
  display: none !important;
}

.commerce-auth-country__search {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid var(--commerce-auth-line);
  border-radius: 14px;
  background: #ffffff;
  font-family: var(--commerce-auth-font-sans);
  font-size: 15px;
  color: var(--commerce-auth-ink);
}

.commerce-auth-country__list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  margin-top: 12px;
  overflow-y: auto;
}

.commerce-auth-country__empty {
  margin: 12px 0 0;
  font-family: var(--commerce-auth-font-sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--commerce-auth-muted);
}

.commerce-auth-country__option {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 16px;
  background: #f8fafc;
  font-family: var(--commerce-auth-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--commerce-auth-ink);
  text-align: left;
  cursor: pointer;
}

.commerce-auth-country__option[hidden] {
  display: none;
}

.commerce-auth-country__option small {
  font-family: var(--commerce-auth-font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--commerce-auth-muted);
}

.commerce-auth-country__option:hover,
.commerce-auth-country__option.is-selected {
  border-color: rgba(15, 118, 110, 0.18);
  background: var(--commerce-auth-accent-soft);
}

.commerce-auth-phone-field__input,
.commerce-auth-input {
  width: 100%;
  min-height: var(--commerce-auth-control-height);
  padding: 0 18px;
  border: 0;
  background: transparent;
  font-family: var(--commerce-auth-font-sans);
  font-size: 17px;
  color: var(--commerce-auth-ink);
}

.commerce-auth-phone-field__input:focus,
.commerce-auth-input:focus,
.commerce-auth-country__search:focus,
.commerce-auth-otp__input:focus {
  outline: 2px solid var(--commerce-auth-focus-ring);
  outline-offset: 0;
}

.commerce-auth-input {
  min-height: var(--commerce-auth-control-height);
  border: 1px solid var(--commerce-auth-line);
  border-radius: var(--commerce-auth-control-radius);
  background: var(--commerce-auth-glass-surface-strong);
}

.commerce-auth-form__actions {
  display: grid;
  gap: 12px;
}

.commerce-auth-form__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--commerce-auth-muted);
  font-family: var(--commerce-auth-font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.commerce-auth-form__divider::before,
.commerce-auth-form__divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--commerce-auth-line);
}

.commerce-auth-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--commerce-auth-action-height);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--commerce-auth-control-radius);
  font-family: var(--commerce-auth-font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  overflow: hidden;
  isolation: isolate;
}

.commerce-auth-button:hover {
  transform: translateY(-1px);
}

.commerce-auth-button--primary {
  border-color: var(--commerce-auth-button-border);
  background: var(--commerce-auth-button-bg);
  box-shadow: var(--commerce-auth-button-shadow);
  color: var(--commerce-auth-button-text);
}

.commerce-auth-button--primary:hover {
  background: var(--commerce-auth-button-bg-hover);
}

.commerce-auth-modal .commerce-auth-button--primary {
  background: var(--commerce-auth-button-bg) !important;
  color: var(--commerce-auth-button-text) !important;
  border-color: var(--commerce-auth-button-border) !important;
}

.commerce-auth-button--secondary {
  border-color: var(--commerce-auth-secondary-button-border);
  background: var(--commerce-auth-secondary-button-bg);
  color: var(--commerce-auth-secondary-button-text);
}

.commerce-auth-modal .commerce-auth-button--secondary {
  background: var(--commerce-auth-secondary-button-bg) !important;
  color: var(--commerce-auth-secondary-button-text) !important;
  border-color: var(--commerce-auth-secondary-button-border) !important;
}

.commerce-auth-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.commerce-auth-button__icon--google svg {
  display: block;
  width: 18px;
  height: 18px;
}

.commerce-auth-modal[data-commerce-auth-mode="verify_phone"]
  [data-commerce-auth-google-login] {
  display: none !important;
}

.commerce-auth-modal[data-commerce-auth-mode="verify_phone"]
  [data-commerce-auth-google-divider] {
  display: none !important;
}

.commerce-auth-otp {
  display: grid;
  gap: 18px;
}

.commerce-auth-otp__inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.commerce-auth-otp__input {
  width: 100%;
  height: 62px;
  border: 1px solid var(--commerce-auth-line);
  border-radius: var(--commerce-auth-control-radius);
  background: var(--commerce-auth-glass-surface-strong);
  font-family: var(--commerce-auth-font-sans);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--commerce-auth-ink);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.commerce-auth-otp__debug {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed rgba(146, 93, 0, 0.24);
  border-radius: 14px;
  background: #fff7e4;
  font-family: var(--commerce-auth-font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: #925d00;
}

.commerce-auth-otp__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 15px 0;
}

.commerce-auth-otp__meta p {
  margin: 0;
  font-family: var(--commerce-auth-font-sans);
  font-size: 14px;
  color: var(--commerce-auth-muted);
}

.commerce-auth-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--commerce-auth-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--commerce-auth-accent);
  cursor: pointer;
}

.commerce-auth-link-button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.commerce-auth-button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.commerce-auth-button.is-busy {
  opacity: 1;
  pointer-events: none;
  transform: none;
}

.commerce-auth-button.is-busy::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  background:
    linear-gradient(
      110deg,
      transparent 0%,
      transparent 34%,
      var(--commerce-auth-button-sheen) 50%,
      transparent 66%,
      transparent 100%
    );
  transform: translateX(-120%);
  animation: commerceAuthButtonSweep 1.15s ease-in-out infinite;
}

.commerce-auth-button > * {
  position: relative;
  z-index: 1;
}

.commerce-auth-button.is-busy::after,
.commerce-auth-link-button.is-busy::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: commerceAuthSpin 0.7s linear infinite;
  position: relative;
  z-index: 1;
}

.commerce-auth-button.is-busy .commerce-auth-button__icon {
  opacity: 0.62;
}

.commerce-auth-modal--locked .commerce-auth-modal__backdrop {
  cursor: default;
}

@keyframes commerceAuthFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes commerceAuthSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes commerceAuthButtonSweep {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

@media (max-width: 1024px) {
  .commerce-auth-modal {
    padding: 16px;
  }

  .commerce-auth-modal__dialog {
    width: min(100%, 430px);
    max-height: calc(100vh - 32px);
    border-radius: 22px;
  }

  .commerce-auth-modal__layout {
    display: block;
    max-height: inherit;
  }

  .commerce-auth-modal__brand-copy {
    width: max-content;
    padding: 5px 9px;
  }

  .commerce-auth-modal__powered-by {
    font-size: 7.5px;
  }

  .commerce-auth-modal__eyebrow {
    font-size: 11.5px;
  }

  .commerce-auth-modal__logo-shell {
    min-height: 48px;
    margin: -2px 0 18px;
  }

  .commerce-auth-modal__brand-logo {
    max-width: 120px;
    max-height: 44px;
  }

  .commerce-auth-modal__brand-wordmark {
    font-size: 20px;
  }

  .commerce-auth-modal__content {
    max-height: inherit;
    padding: 24px 18px 20px;
  }

  .commerce-auth-modal__close {
    top: 14px;
    right: 14px;
    height: 32px;
    width: 32px;
  }

  .commerce-auth-flow__topbar {
    align-items: flex-start;
    gap: 8px;
    min-height: 38px;
    padding-right: 40px;
    margin-bottom: 12px;
  }

  .commerce-auth-flow__chrome {
    gap: 6px;
  }

  .commerce-auth-flow__back {
    min-height: 30px;
    padding: 0 9px;
    font-size: 11px;
  }

  .commerce-auth-flow__step-indicator {
    padding: 7px 9px;
    font-size: 10px;
  }

  .commerce-auth-step__header {
    margin-bottom: 16px;
  }

  .commerce-auth-step__title {
    font-size: 21px;
  }

  .commerce-auth-form {
    gap: 14px;
  }

  .commerce-auth-form__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .commerce-auth-country {
    border-right: 1px solid var(--commerce-auth-line);
  }

  .commerce-auth-country__dropdown {
    width: 265px;
    height: 225px;
    overflow: hidden;
  }

  .commerce-auth-otp__inputs {
    gap: 6px;
  }

  .commerce-auth-otp__input {
    height: 42px;
    border-radius: 12px;
    font-size: 16px;
  }

  .commerce-auth-otp__meta {
    align-items: flex-start;
  }

  .commerce-auth-country__trigger {
    min-height: 46px;
    padding: 0 10px;
  }

  .commerce-auth-phone-field__input,
  .commerce-auth-input {
    min-height: 46px;
    padding: 0 10px;
    border-radius: 12px;
  }

  .commerce-auth-button {
    min-height: var(--commerce-auth-action-height);
  }

  .commerce-auth-country__search {
    min-height: 40px;
  }

  .commerce-auth-public-track {
    margin: 24px 0;
  }

  .commerce-auth-public-track__shell,
  .commerce-auth-public-track .commerce-auth-track-card {
    padding: 20px;
    border-radius: 22px;
  }

  .commerce-auth-public-track__grid,
  .commerce-auth-public-track .commerce-auth-track-card__meta {
    grid-template-columns: 1fr;
  }

  .commerce-auth-public-track__title,
  .commerce-auth-public-track .commerce-auth-track-card__title {
    font-size: 26px;
  }

  .commerce-auth-public-track .commerce-auth-track-card__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .commerce-auth-eta {
    padding: 16px;
    border-radius: 20px;
  }

  .commerce-auth-eta__title {
    font-size: 22px;
  }

  .commerce-auth-eta__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 40rem) {
  .commerce-auth-modal {
    --commerce-auth-action-height: 36px;
  }
}

/* Minimal merchant-first authentication experience. */
.commerce-auth-modal {
  --commerce-auth-action-height: 52px;
  --commerce-auth-modal-motion-duration: 420ms;
  --commerce-auth-country-motion-duration: 360ms;
  --commerce-auth-premium-easing: cubic-bezier(0.22, 1, 0.36, 1);
  padding: clamp(12px, 3vw, 28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--commerce-auth-modal-motion-duration) ease;
}

.commerce-auth-modal--visible {
  opacity: 1;
  pointer-events: auto;
}

.commerce-auth-modal__backdrop {
  opacity: 0;
  transition: opacity var(--commerce-auth-modal-motion-duration) ease;
}

.commerce-auth-modal--visible .commerce-auth-modal__backdrop {
  opacity: 1;
}

.commerce-auth-modal__dialog {
  width: min(100%, 520px);
  max-height: calc(100dvh - 32px);
  overflow: visible;
  contain: none;
  background: var(--commerce-auth-glass-surface-strong);
  opacity: 0;
  transform: translateY(12px) scale(0.975);
  transform-origin: center;
  transition:
    opacity var(--commerce-auth-modal-motion-duration) ease,
    transform var(--commerce-auth-modal-motion-duration) var(--commerce-auth-premium-easing);
  will-change: opacity, transform;
}

.commerce-auth-modal--visible .commerce-auth-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.commerce-auth-modal__layout {
  max-height: inherit;
  overflow: hidden;
  border-radius: inherit;
}

.commerce-auth-modal__content {
  max-height: inherit;
  padding: 24px 32px 30px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.commerce-auth-flow__topbar {
  min-height: 0;
  margin: 0 0 4px;
}

.commerce-auth-modal__brand-copy {
  padding: 6px 9px;
  border-radius: 10px;
  box-shadow: none;
}

.commerce-auth-modal__powered-by {
  font-size: 8px;
}

.commerce-auth-modal__eyebrow {
  font-size: 12px;
}

.commerce-auth-flow__navigation {
  display: flex;
  min-height: 34px;
  margin: 0 0 2px;
}

.commerce-auth-flow__back {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--commerce-auth-muted);
  font-size: 13px;
}

.commerce-auth-flow__back:hover {
  color: var(--commerce-auth-ink);
}

.commerce-auth-modal__close,
.commerce-auth-modal .commerce-auth-modal__close {
  top: 22px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-color: var(--commerce-auth-line) !important;
  background: color-mix(in srgb, var(--commerce-auth-surface-strong) 86%, transparent) !important;
  color: var(--commerce-auth-muted) !important;
  box-shadow: none;
}

.commerce-auth-modal__close:hover,
.commerce-auth-modal .commerce-auth-modal__close:hover {
  background: var(--commerce-auth-accent-soft) !important;
  color: var(--commerce-auth-ink) !important;
}

.commerce-auth-modal__logo-shell {
  min-height: 60px;
  margin: 6px 0 24px;
}

.commerce-auth-modal__brand-logo {
  max-width: 168px;
  max-height: 62px;
}

.commerce-auth-step__header {
  margin-bottom: 24px;
  text-align: center;
}

.commerce-auth-step__title {
  font-size: clamp(25px, 4vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.commerce-auth-step__description {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
}

.commerce-auth-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.commerce-auth-form {
  gap: 16px;
}

.commerce-auth-phone-field {
  min-height: 58px;
  border-color: color-mix(in srgb, var(--commerce-auth-line) 82%, var(--commerce-auth-muted));
  background: var(--commerce-auth-surface-strong);
  box-shadow: none;
}

.commerce-auth-country__trigger,
.commerce-auth-phone-field__input {
  min-height: 56px;
}

.commerce-auth-phone-field:focus-within {
  border-color: color-mix(in srgb, var(--commerce-auth-accent) 56%, var(--commerce-auth-line));
  box-shadow: 0 0 0 3px var(--commerce-auth-focus-ring);
}

.commerce-auth-phone-field__input:focus {
  outline: 0;
}

.commerce-auth-button {
  min-height: var(--commerce-auth-action-height);
  border-radius: var(--commerce-auth-control-radius);
  font-size: 15px;
}

.commerce-auth-button__channel-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.commerce-auth-button--google {
  box-shadow: none;
}

.commerce-auth-form__divider {
  margin: 2px 0;
}

.commerce-auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 0;
  color: var(--commerce-auth-muted);
  font-size: 12px;
  text-align: center;
}

.commerce-auth-security-note .commerce-auth-control-icon {
  width: 16px;
  height: 16px;
}

.commerce-auth-inline-link {
  margin-top: 12px;
  font-size: 13px;
}

.commerce-auth-otp-phone-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 16px;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--commerce-auth-ink);
}

.commerce-auth-otp-phone-chip strong {
  font-size: 15px;
  letter-spacing: 0.015em;
}

.commerce-auth-otp-channel {
  margin: 0;
}

.commerce-auth-otp-channel__image {
  width: 22px;
  height: 22px;
}

.commerce-auth-otp {
  gap: 20px;
}

.commerce-auth-otp__inputs {
  gap: 9px;
}

.commerce-auth-otp__input {
  height: 58px;
  border-radius: 13px;
  background: var(--commerce-auth-surface-strong);
  box-shadow: none;
}

.commerce-auth-otp__meta {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0 0 18px;
  text-align: center;
}

.commerce-auth-otp__recovery-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

.commerce-auth-link-button--fallback {
  position: relative;
}

.commerce-auth-country__layer {
  position: absolute;
  z-index: 100001;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--commerce-auth-country-motion-duration) ease;
}

.commerce-auth-modal--country-open .commerce-auth-country__layer {
  opacity: 1;
}

.commerce-auth-country__dismiss {
  display: none;
}

.commerce-auth-country__dropdown {
  position: absolute;
  z-index: 100002;
  width: 320px;
  height: auto;
  max-height: min(420px, calc(100dvh - 24px));
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--commerce-auth-surface-strong);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.985);
  transform-origin: top left;
  transition:
    opacity var(--commerce-auth-country-motion-duration) ease,
    transform var(--commerce-auth-country-motion-duration) var(--commerce-auth-premium-easing);
  will-change: opacity, transform;
}

.commerce-auth-modal--country-open .commerce-auth-country__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.commerce-auth-country__search {
  min-height: 44px;
  margin-top: 6px;
  border-radius: 12px;
}

.commerce-auth-country__list {
  max-height: min(270px, calc(100dvh - 150px));
  overscroll-behavior: contain;
}

.commerce-auth-country__option {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
}

.commerce-auth-step--locked .commerce-auth-form__grid {
  gap: 12px;
}

/* Compact channel-choice modal and autofill-safe OTP controls. */
.commerce-auth-modal__dialog {
  width: min(calc(100vw - 32px), 400px);
}

.commerce-auth-modal__content {
  padding: 20px;
}

.commerce-auth-flow__utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
}

.commerce-auth-flow__utility .commerce-auth-flow__navigation {
  min-height: 36px;
  margin: 0;
}

.commerce-auth-flow__back,
.commerce-auth-flow__back:hover,
.commerce-auth-flow__back:focus,
.commerce-auth-flow__back:active,
.commerce-auth-modal .commerce-auth-flow__back,
.commerce-auth-modal .commerce-auth-flow__back:hover {
  min-height: 36px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--commerce-auth-muted) !important;
}

.commerce-auth-flow__back:hover,
.commerce-auth-flow__back:focus-visible {
  color: var(--commerce-auth-ink) !important;
}

.commerce-auth-modal__close,
.commerce-auth-modal .commerce-auth-modal__close,
.commerce-auth-modal__close:hover,
.commerce-auth-modal .commerce-auth-modal__close:hover,
.commerce-auth-modal__close:focus,
.commerce-auth-modal__close:active {
  position: static;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--commerce-auth-ink) !important;
}

.commerce-auth-modal__close .commerce-auth-control-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.commerce-auth-modal__close:focus-visible {
  outline: 2px solid var(--commerce-auth-focus-ring);
  outline-offset: 1px;
}

.commerce-auth-flow__topbar {
  align-items: center;
  min-height: 36px;
  padding-right: 0;
  margin: 0 0 6px;
}

.commerce-auth-modal__brand-copy {
  width: max-content;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--commerce-auth-accent) 18%, transparent);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.24);
  background: color-mix(in srgb, var(--commerce-auth-surface-strong) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 6px 18px rgba(15, 23, 42, 0.06);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

.commerce-auth-modal__powered-by {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--commerce-auth-accent);
  line-height: 1;
  text-transform: none;
}

.commerce-auth-modal__powered-by-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.commerce-auth-modal__powered-by-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.commerce-auth-modal__logo-shell {
  min-height: 44px;
  margin: 4px 0 18px;
}

.commerce-auth-modal__brand-logo {
  max-width: 144px;
  max-height: 48px;
}

.commerce-auth-step__header {
  margin-bottom: 18px;
}

.commerce-auth-step__title {
  font-size: clamp(22px, 4vw, 26px);
}

.commerce-auth-step__description {
  margin-top: 7px;
  font-size: 14px;
}

.commerce-auth-phone-field {
  min-height: 48px;
  border-radius: 10px;
}

.commerce-auth-country__trigger,
.commerce-auth-phone-field__input {
  min-height: 46px;
}

.commerce-auth-phone-field:focus-within {
  border-color: color-mix(in srgb, var(--commerce-auth-accent) 46%, var(--commerce-auth-line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--commerce-auth-accent) 24%, transparent);
}

.commerce-auth-channel-choice__label {
  margin: 0;
  color: var(--commerce-auth-muted);
  font-size: 12px;
  text-align: center;
}

.commerce-auth-channel-choice {
  display: grid;
  gap: 8px;
}

.commerce-auth-modal .commerce-auth-button,
.commerce-auth-modal .commerce-auth-button--primary,
.commerce-auth-modal .commerce-auth-button--secondary,
.commerce-auth-modal .commerce-auth-button--channel,
.commerce-auth-modal .commerce-auth-button--recovery {
  min-height: 46px;
  border: 1px solid var(--commerce-auth-line) !important;
  border-radius: 10px !important;
  background: var(--commerce-auth-surface-strong) !important;
  box-shadow: none !important;
  color: var(--commerce-auth-ink) !important;
}

.commerce-auth-modal .commerce-auth-button:hover,
.commerce-auth-modal .commerce-auth-button--primary:hover,
.commerce-auth-modal .commerce-auth-button--secondary:hover,
.commerce-auth-modal .commerce-auth-button--channel:hover,
.commerce-auth-modal .commerce-auth-button--recovery:hover {
  border-color: color-mix(in srgb, var(--commerce-auth-accent) 45%, var(--commerce-auth-line)) !important;
  background: color-mix(in srgb, var(--commerce-auth-accent-soft) 45%, var(--commerce-auth-surface-strong)) !important;
  color: var(--commerce-auth-ink) !important;
  transform: none;
}

.commerce-auth-modal .commerce-auth-button--primary {
  border-color: color-mix(in srgb, var(--commerce-auth-accent) 58%, var(--commerce-auth-line)) !important;
  color: var(--commerce-auth-accent) !important;
}

.commerce-auth-modal .commerce-auth-button:focus-visible {
  outline: 2px solid var(--commerce-auth-focus-ring);
  outline-offset: 2px;
}

.commerce-auth-modal .commerce-auth-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.commerce-auth-button__channel-icon {
  width: 21px;
  height: 21px;
}

.commerce-auth-otp-phone-chip {
  min-height: 38px;
  margin-top: 12px;
  padding: 7px 13px;
  border-radius: 10px;
}

.commerce-auth-change-number {
  margin: 10px 0 0;
  color: var(--commerce-auth-muted);
  font-size: 12px;
}

.commerce-auth-inline-link,
.commerce-auth-inline-link:hover,
.commerce-auth-inline-link:focus,
.commerce-auth-inline-link:active,
.commerce-auth-modal .commerce-auth-inline-link,
.commerce-auth-modal .commerce-auth-inline-link:hover {
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--commerce-auth-accent) !important;
  font: inherit;
  font-weight: 700;
}

.commerce-auth-otp {
  gap: 12px;
}

.commerce-auth-otp__input-shell {
  position: relative;
  min-height: 52px;
}

.commerce-auth-otp__native-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  opacity: 0.01;
}

.commerce-auth-otp__native-input:focus {
  outline: 0;
}

.commerce-auth-otp__inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  pointer-events: none;
}

.commerce-auth-otp__input {
  display: grid;
  place-items: center;
  width: 100%;
  height: 52px;
  border: 1px solid var(--commerce-auth-line);
  border-radius: 9px;
  color: var(--commerce-auth-ink);
  font-size: 20px;
  font-weight: 700;
}

.commerce-auth-otp__input.is-active,
.commerce-auth-otp__input-shell:focus-within .commerce-auth-otp__input.is-active {
  border-color: var(--commerce-auth-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--commerce-auth-accent) 22%, transparent);
}

.commerce-auth-otp__meta {
  gap: 0;
  margin: 0 0 4px;
  font-size: 12px;
}

.commerce-auth-form__actions--verify {
  margin-top: 14px;
}

.commerce-auth-otp__recovery {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--commerce-auth-line);
}

.commerce-auth-otp__recovery-title {
  margin: 0 0 10px;
  color: var(--commerce-auth-muted);
  font-size: 13px;
  text-align: center;
}

.commerce-auth-otp__recovery-actions {
  display: grid;
  gap: 8px;
}

.commerce-auth-modal .commerce-auth-button--recovery {
  width: 100%;
  font-size: 13px;
}

.commerce-auth-security-note {
  margin-top: 18px;
}

@media (max-width: 40rem) {
  .commerce-auth-modal {
    --commerce-auth-action-height: 50px;
    top: var(--commerce-auth-visual-top, 0px);
    right: auto;
    bottom: auto;
    left: var(--commerce-auth-visual-left, 0px);
    width: var(--commerce-auth-visual-width, 100%);
    height: var(--commerce-auth-visual-height, 100dvh);
    align-items: flex-end;
    padding: 0;
    overflow: hidden;
  }

  .commerce-auth-modal__dialog {
    width: 100%;
    max-height: min(calc(var(--commerce-auth-visual-height, 100dvh) - 8px), 760px);
    border-width: 1px 0 0;
    border-radius: 24px 24px 0 0;
    transform: translateY(24px) scale(0.99);
    transform-origin: bottom center;
  }

  .commerce-auth-modal--visible .commerce-auth-modal__dialog {
    transform: translateY(0) scale(1);
  }

  .commerce-auth-modal__layout {
    border-radius: 24px 24px 0 0;
  }

  .commerce-auth-modal__content {
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    scrollbar-gutter: auto;
    overscroll-behavior: contain;
  }

  .commerce-auth-modal__close,
  .commerce-auth-modal .commerce-auth-modal__close {
    width: 34px;
    height: 34px;
  }

  .commerce-auth-flow__topbar {
    min-height: 18px;
    padding-right: 0;
  }

  .commerce-auth-modal__logo-shell {
    min-height: 48px;
    margin: 6px 0 20px;
  }

  .commerce-auth-modal__brand-logo {
    max-width: 138px;
    max-height: 50px;
  }

  .commerce-auth-step__title {
    font-size: 24px;
  }

  .commerce-auth-step__description {
    font-size: 14px;
  }

  .commerce-auth-otp__inputs {
    gap: 6px;
  }

  .commerce-auth-otp__input {
    height: clamp(44px, 13vw, 50px);
    font-size: 20px;
  }

  .commerce-auth-country__layer {
    position: absolute;
    z-index: 10;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
  }

  .commerce-auth-modal--country-open .commerce-auth-country__layer {
    pointer-events: auto;
  }

  .commerce-auth-country__dismiss {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background: rgba(15, 23, 42, 0.2) !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: default;
  }

  .commerce-auth-country__dismiss:hover,
  .commerce-auth-country__dismiss:focus,
  .commerce-auth-country__dismiss:active {
    background: rgba(15, 23, 42, 0.2) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .commerce-auth-country__dropdown {
    position: absolute;
    z-index: 1;
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0 !important;
    width: 100% !important;
    height: min(520px, calc(100% - 24px));
    max-height: calc(100% - 24px);
    display: flex;
    flex-direction: column;
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.18);
    transform: translateY(24px);
    transform-origin: bottom center;
  }

  .commerce-auth-modal--country-open .commerce-auth-country__dropdown {
    transform: translateY(0);
  }

  .commerce-auth-country__list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  .commerce-auth-modal--keyboard-visible .commerce-auth-modal__dialog {
    max-height: var(--commerce-auth-visual-height, 100dvh);
    border-radius: 18px 18px 0 0;
  }

  .commerce-auth-modal--keyboard-visible .commerce-auth-modal__content {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .commerce-auth-modal *,
  .commerce-auth-modal *::before,
  .commerce-auth-modal *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
