body.public-account-auth-modal-open {
  overflow: hidden;
}

.public-account-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: 24px;
}

.public-account-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(7, 20, 41, 0.68);
  backdrop-filter: blur(5px);
  cursor: default;
}

.public-account-auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(90dvh, 760px);
  overflow: auto;
  border: 1px solid #dbe5f2;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(7, 20, 41, 0.3);
  color: #17355f;
}

.public-account-auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #eef4fb;
  color: #0f2a52;
  font: inherit;
  font-size: 1.45rem;
  cursor: pointer;
}

.public-account-auth-modal__close:focus-visible,
.public-account-auth-modal__actions a:focus-visible,
.customer-auth-handoff__brand--provider:focus-visible {
  outline: 3px solid #0f2a52;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--storefront-action-focus);
}

.public-account-auth-modal__content {
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 44px);
}

.public-account-auth-modal__header {
  display: grid;
  gap: 10px;
  padding-right: 46px;
}

.public-account-auth-modal__header h2,
.public-account-auth-modal__header p,
.public-account-auth-modal__actions p {
  margin: 0;
}

.public-account-auth-modal__header h2 {
  color: #0f2a52;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.public-account-auth-modal__header p {
  max-width: 58ch;
  color: #617089;
  line-height: 1.55;
}

.public-account-auth-modal__security-lead {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.public-account-auth-modal__security-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 0.1em;
  fill: #176b52;
}

.customer-auth-handoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 0.9fr);
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: #f7faff;
}

.customer-auth-handoff__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(182, 202, 227, 0.72);
  border-radius: 11px;
  background: #ffffff;
  color: #17355f;
  text-align: center;
  text-decoration: none;
  animation-duration: 5.2s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.customer-auth-handoff__brand > span {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.customer-auth-handoff__brand > svg {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.customer-auth-handoff__brand--store img {
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.customer-auth-handoff__brand--store {
  animation-name: customer-auth-handoff-store-arrival;
}

.customer-auth-handoff__brand--provider {
  flex-direction: column;
  gap: 5px;
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface);
  animation-name: customer-auth-handoff-provider-arrival;
}

a.customer-auth-handoff__brand--provider {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.customer-auth-handoff__brand--provider:hover {
  border-color: var(--ui-color-text-muted);
  box-shadow: 0 7px 18px rgba(24, 75, 160, 0.14);
  color: #0f2a52;
  transform: translateY(-1px);
}

.customer-auth-handoff__brand--provider img {
  display: block;
  width: min(116px, 82%);
  height: auto;
  max-height: 32px;
  object-fit: contain;
}

.customer-auth-handoff__brand--provider strong {
  color: #111111;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.customer-auth-handoff__provider-action {
  color: var(--ui-color-text);
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  line-height: 1.15;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.customer-auth-handoff__arrows {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 0;
}

.customer-auth-handoff__arrow {
  width: 24px;
  height: 24px;
  fill: var(--ui-color-text-muted);
  opacity: 0;
  animation-duration: 5.2s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1);
}

.customer-auth-handoff__arrow--outbound {
  animation-name: customer-auth-handoff-outbound;
}

.customer-auth-handoff__arrow--return {
  animation-name: customer-auth-handoff-return;
}

.customer-auth-handoff:hover .customer-auth-handoff__arrow,
.customer-auth-handoff:focus-within .customer-auth-handoff__arrow,
.customer-auth-handoff:hover .customer-auth-handoff__brand,
.customer-auth-handoff:focus-within .customer-auth-handoff__brand {
  animation-duration: 2.8s;
}

.public-account-auth-modal__actions {
  display: grid;
  justify-items: start;
  gap: 9px;
}

.public-account-auth-modal__login {
  min-height: 50px;
  padding-inline: 20px;
  border-radius: 11px;
  color: var(--ui-color-action-text);
}

.public-account-auth-modal__login:hover {
  color: var(--ui-color-action-text);
}

.public-account-auth-modal__actions p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  color: #617089;
  font-size: 0.94rem;
}

.public-account-auth-modal__actions p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--storefront-link-color, #17355f);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.public-account-auth-modal__actions p a:hover {
  text-decoration-thickness: 2px;
}

@media (max-width: 560px) {
  .public-account-auth-modal {
    padding: 12px;
  }

  .public-account-auth-modal__dialog {
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .public-account-auth-modal__content {
    gap: 18px;
    padding: 24px 20px 28px;
  }

  .public-account-auth-modal__header h2 {
    font-size: clamp(1.65rem, 7.5vw, 2rem);
  }

  .customer-auth-handoff {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 8px;
  }

  .customer-auth-handoff__brand {
    min-height: 62px;
    padding: 8px;
  }

  .customer-auth-handoff__brand--provider {
    flex-direction: column;
  }

  .customer-auth-handoff__arrows {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, 16px);
    width: 100%;
    height: 32px;
  }

  .customer-auth-handoff__arrow {
    width: 18px;
    height: 18px;
    transform: rotate(90deg);
  }

  .customer-auth-handoff__arrow--outbound {
    animation-name: customer-auth-handoff-outbound-mobile;
  }

  .customer-auth-handoff__arrow--return {
    animation-name: customer-auth-handoff-return-mobile;
  }

  .customer-auth-handoff__brand--store img {
    max-width: 100%;
    max-height: 52px;
  }

  .customer-auth-handoff__brand--provider img {
    width: min(96px, 90%);
  }

  .public-account-auth-modal__actions,
  .public-account-auth-modal__login {
    width: 100%;
  }

  .public-account-auth-modal__login {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.customer-auth-handoff__brand--provider {
    transition: none;
  }

  a.customer-auth-handoff__brand--provider:hover {
    transform: none;
  }

  .customer-auth-handoff__arrow {
    animation: none;
  }

  .customer-auth-handoff__brand {
    animation: none;
  }
}

@keyframes customer-auth-handoff-outbound {
  0%, 4% {
    translate: -7px 0;
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  23% {
    translate: 7px 0;
    opacity: 1;
  }

  28%, 100% {
    translate: 9px 0;
    opacity: 0;
  }
}

@keyframes customer-auth-handoff-return {
  0%, 51% {
    translate: 7px 0;
    opacity: 0;
  }

  60% {
    opacity: 1;
  }

  71% {
    translate: -7px 0;
    opacity: 1;
  }

  76%, 100% {
    translate: -9px 0;
    opacity: 0;
  }
}

@keyframes customer-auth-handoff-outbound-mobile {
  0%, 4% {
    translate: 0 -5px;
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  23% {
    translate: 0 5px;
    opacity: 1;
  }

  28%, 100% {
    translate: 0 7px;
    opacity: 0;
  }
}

@keyframes customer-auth-handoff-return-mobile {
  0%, 51% {
    translate: 0 5px;
    opacity: 0;
  }

  60% {
    opacity: 1;
  }

  71% {
    translate: 0 -5px;
    opacity: 1;
  }

  76%, 100% {
    translate: 0 -7px;
    opacity: 0;
  }
}

@keyframes customer-auth-handoff-provider-arrival {
  0%, 23%, 47%, 100% {
    border-color: var(--ui-color-border);
    box-shadow: none;
    scale: 1;
  }

  31%, 39% {
    border-color: var(--ui-color-text-muted);
    box-shadow: 0 10px 25px rgba(23, 53, 95, 0.2);
    scale: 1.025;
  }
}

@keyframes customer-auth-handoff-store-arrival {
  0%, 70%, 96%, 100% {
    border-color: color-mix(in srgb, var(--ui-color-border) 72%, transparent);
    box-shadow: none;
    scale: 1;
  }

  78%, 88% {
    border-color: var(--ui-color-text-muted);
    box-shadow: 0 10px 25px rgba(23, 53, 95, 0.18);
    scale: 1.025;
  }
}
