/* Shared SMS verification view. Keep its styles inside the verification form. */
html body .welcome .registration[data-screen="code"]:has(.hwsms-form) {
  padding: 32px 28px 26px;
}
.registration[data-screen="code"]:has(.hwsms-form) > .dialog-heading,
.registration[data-screen="code"]:has(.hwsms-form) > .registration-intro {
  display: none;
}

.hwsms-form.auth-fields {
  --hwsms-text: #282038;
  --hwsms-muted: #90869f;
  --hwsms-accent: #8935ff;
  --hwsms-cell-bg: #fff;
  --hwsms-cell-border: #e3dfea;
  --hwsms-placeholder: #b2a9bf;
  --hwsms-icon-bg: #f4eeff;
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--hwsms-text);
}
.hwsms-form[hidden],
.hwsms-form [hidden] {
  display: none !important;
}
.hwsms-form,
.hwsms-form * {
  box-sizing: border-box;
}
.hwsms-form .hwsms-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin: 0 0 30px;
}
.hwsms-form .hwsms-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--hwsms-icon-bg);
  color: var(--hwsms-accent);
}
.hwsms-form .hwsms-icon :is(img, svg) {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.hwsms-form .hwsms-heading-copy {
  min-width: 0;
  padding-top: 7px;
}
.hwsms-form .hwsms-heading-copy > h2 {
  margin: 0;
  color: var(--hwsms-text);
  font: inherit;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.8px;
  overflow-wrap: anywhere;
}
.hwsms-form .hwsms-phone-hint {
  margin: 18px 0 0;
  color: var(--hwsms-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.hwsms-form .hwsms-phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 14px;
  min-width: 0;
  margin-top: 2px;
}
.hwsms-form .hwsms-number {
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--hwsms-text);
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.hwsms-form .hwsms-edit.auth-link,
.hwsms-form .hwsms-resend.auth-link {
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 3px 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--hwsms-accent);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: none;
  cursor: pointer;
}
.hwsms-form .hwsms-edit.auth-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hwsms-form .hwsms-code-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  direction: ltr;
  cursor: text;
}
.hwsms-form .hwsms-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.hwsms-form .hwsms-code-field > input.hwsms-input.form-control {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  font-size: 16px;
  opacity: 0;
  cursor: text;
}
.hwsms-form .hwsms-cells {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  direction: ltr;
  pointer-events: none;
}
.hwsms-form .hwsms-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 58px;
  border: 1px solid var(--hwsms-cell-border);
  border-radius: 10px;
  background: var(--hwsms-cell-bg);
  color: var(--hwsms-placeholder);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hwsms-form .hwsms-cell.is-filled {
  color: var(--hwsms-text);
}
.hwsms-form .hwsms-code-field:focus-within .hwsms-cell.is-active {
  border: 2px solid var(--hwsms-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hwsms-accent) 6%, transparent);
  color: transparent;
}
.hwsms-form .hwsms-code-field:focus-within .hwsms-cell.is-active.is-filled {
  color: var(--hwsms-text);
}
.hwsms-form .hwsms-code-field:focus-within .hwsms-cell.is-active:not(.is-filled)::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 22px;
  background: var(--hwsms-text);
  animation: hwsms-caret 1s step-end infinite;
}
.hwsms-form .hwsms-submit.pill-button.primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  height: auto;
  margin: 19px 0 0;
  padding: 14px 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(105deg, #8935ff, #7c30ef);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  box-shadow: none;
  cursor: pointer;
}
.hwsms-form .hwsms-submit > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.hwsms-form .hwsms-submit > svg {
  position: absolute;
  inset-inline-end: 19px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: #fff;
  stroke: currentColor;
  pointer-events: none;
}
[dir="rtl"] .hwsms-form .hwsms-submit > svg {
  transform: translateY(-50%) scaleX(-1);
}
.hwsms-form .hwsms-submit:disabled {
  opacity: .65;
  cursor: wait;
}
.hwsms-form .hwsms-resend-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  margin: 16px 0 0;
  color: var(--hwsms-muted);
  text-align: center;
}
.hwsms-form .hwsms-resend-line > svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--hwsms-muted);
  stroke: currentColor;
}
.hwsms-form .hwsms-resend.auth-link {
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.hwsms-form .hwsms-resend.auth-link:disabled {
  color: var(--hwsms-muted);
  opacity: 1;
  cursor: default;
}
.hwsms-form .auth-link:focus-visible,
.hwsms-form .hwsms-submit:focus-visible {
  outline: 2px solid var(--hwsms-accent);
  outline-offset: 3px;
}

/* Shared controls keep the same legibility in the account sheet and on entry. */
html[data-hw-theme="dark"] .hwsms-form {
  --hwsms-text: #f4effb;
  --hwsms-muted: #b9aecb;
  --hwsms-accent: #ba94ff;
  --hwsms-cell-bg: #2b2435;
  --hwsms-cell-border: #4b3c60;
  --hwsms-placeholder: #9384a8;
  --hwsms-icon-bg: #362548;
}
html[data-hw-theme="dark"] body .welcome .registration[data-screen="code"]:has(.hwsms-form) {
  background: #241e2d !important;
  border-color: #3b304b;
}
html[data-hw-theme="dark"] .hwsms-form .hwsms-edit.auth-link,
html[data-hw-theme="dark"] .hwsms-form .hwsms-resend.auth-link {
  background: transparent !important;
  color: var(--hwsms-accent) !important;
}
html[data-hw-theme="dark"] .hwsms-form .hwsms-resend.auth-link:disabled {
  color: var(--hwsms-muted) !important;
}
html[data-hw-theme="dark"] .hwsms-form .hwsms-submit.pill-button.primary {
  background: linear-gradient(105deg, #8935ff, #7c30ef);
  color: #fff;
}

@media (max-width: 700px) {
  html body .welcome .registration[data-screen="code"]:has(.hwsms-form) {
    padding: 22px 20px;
  }
  .hwsms-form .hwsms-heading {
    margin-bottom: 25px;
  }
}
@media (max-width: 380px) {
  html body .welcome .registration[data-screen="code"]:has(.hwsms-form) {
    padding: 20px 14px;
  }
  .hwsms-form .hwsms-heading {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 23px;
  }
  .hwsms-form .hwsms-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  .hwsms-form .hwsms-icon :is(img, svg) {
    width: 30px;
    height: 30px;
  }
  .hwsms-form .hwsms-heading-copy {
    padding-top: 2px;
  }
  .hwsms-form .hwsms-heading-copy > h2 {
    font-size: 22px;
    letter-spacing: -.6px;
  }
  .hwsms-form .hwsms-phone-hint {
    margin-top: 13px;
  }
  .hwsms-form .hwsms-number {
    font-size: 17px;
  }
  .hwsms-form .hwsms-phone-row {
    column-gap: 10px;
  }
  .hwsms-form .hwsms-cells {
    gap: 6px;
  }
  .hwsms-form .hwsms-cell {
    height: 48px;
    font-size: 23px;
  }
  .hwsms-form .hwsms-submit.pill-button.primary {
    min-height: 48px;
    margin-top: 16px;
    padding-inline: 40px;
  }
  .hwsms-form .hwsms-resend-line {
    gap: 7px;
  }
  .hwsms-form .hwsms-resend.auth-link {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hwsms-form .hwsms-cell {
    transition: none;
  }
  .hwsms-form .hwsms-code-field:focus-within .hwsms-cell.is-active:not(.is-filled)::after {
    animation: none;
  }
}
@keyframes hwsms-caret {
  50% { opacity: 0; }
}

/* The exported badge includes transparent breathing room. Keep its visible mark at the approved size. */
.hwsms-form .hwsms-icon{position:relative;overflow:hidden;}
.hwsms-form .hwsms-icon>img{position:absolute;inset:50% auto auto 50%;width:96px;height:96px;max-width:none;transform:translate(-50%,-50%);}
.hwsms-form .hwsms-cell.is-selected{background:color-mix(in srgb,var(--hwsms-accent) 16%,var(--hwsms-cell-bg));}
