.spm-auth-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.spm-auth-header-actions.is-ready {
  opacity: 1;
  pointer-events: auto;
}

.spm-auth-trigger {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 5px;
  cursor: pointer;
}

.spm-auth-trigger:hover,
.spm-auth-trigger:focus-visible {
  border-color: #d9ff3f;
  outline: none;
}

.spm-auth-login,
.spm-auth-profile {
  color: #05070a;
  background: #d9ff3f;
  border-color: #d9ff3f;
}

.spm-auth-logout {
  color: #fff;
  background: #071834;
  border-color: rgba(255, 255, 255, 0.34);
}

.spm-auth-trigger:disabled {
  cursor: wait;
  opacity: 0.62;
}

.spm-auth-trigger[hidden],
.spm-auth-overlay[hidden],
.spm-auth-view[hidden],
.spm-auth-turnstile[hidden],
.spm-auth-email-status[hidden],
.spm-auth-toast[hidden] {
  display: none !important;
}

.spm-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 7, 10, 0.76);
  backdrop-filter: blur(8px);
}

.spm-auth-dialog {
  width: min(560px, 100%);
  max-height: min(820px, calc(100svh - 48px));
  padding: 0 !important;
  overflow: auto;
  color: #101722;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  content-visibility: visible !important;
  contain-intrinsic-size: auto !important;
  scroll-margin-top: 0 !important;
}

.spm-auth-dialog.is-account {
  width: min(720px, 100%);
}

.spm-auth-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 20px;
  color: #fff;
  background: #071834;
}

.spm-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.spm-auth-brand img {
  display: block;
  width: 112px;
  height: 48px;
  object-fit: contain;
}

.spm-auth-brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.spm-auth-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.3;
}

.spm-auth-close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: #fff;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  cursor: pointer;
}

.spm-auth-body {
  padding: 28px 24px 26px;
}

.spm-auth-view-title {
  margin: 0 0 10px;
  color: #101722;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.spm-auth-intro {
  margin: 0 0 22px;
  color: #647286;
  font-size: 14px;
  line-height: 1.65;
  word-break: keep-all;
}

.spm-auth-account-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 22px;
  overflow: hidden;
  background: #f5f7fa;
  border: 1px solid #dfe7ef;
  border-left: 4px solid #d9ff3f;
  border-radius: 5px;
}

.spm-auth-account-summary > div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid #dfe7ef;
}

.spm-auth-account-summary > div:last-child {
  border-right: 0;
}

.spm-auth-account-summary span,
.spm-auth-account-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spm-auth-account-summary span {
  margin-bottom: 5px;
  color: #647286;
  font-size: 11px;
  font-weight: 800;
}

.spm-auth-account-summary strong {
  color: #101722;
  font-size: 15px;
}

.spm-auth-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.spm-auth-field,
.spm-auth-checks,
.spm-auth-actions,
.spm-auth-choice-row,
.spm-auth-form-note,
.spm-auth-status,
.spm-auth-turnstile {
  grid-column: 1 / -1;
}

.spm-auth-field.is-half {
  grid-column: auto;
}

.spm-auth-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.spm-auth-form-note {
  margin: -4px 0 2px;
  color: #647286;
  font-size: 12px;
  line-height: 1.5;
}

.spm-auth-field > span {
  display: block;
  margin-bottom: 7px;
  color: #243246;
  font-size: 13px;
  font-weight: 800;
}

.spm-auth-field small {
  display: block;
  margin-top: 6px;
  color: #738095;
  font-size: 11px;
  line-height: 1.45;
}

.spm-auth-field input,
.spm-auth-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  color: #101722;
  font: inherit;
  font-size: 15px;
  background: #fff;
  border: 1px solid #cbd6e2;
  border-radius: 5px;
  outline: none;
}

.spm-auth-field input:focus,
.spm-auth-field select:focus {
  border-color: #1162a2;
  box-shadow: 0 0 0 3px rgba(17, 98, 162, 0.12);
}

.spm-auth-field input[readonly] {
  color: #526176;
  background: #eef2f6;
  cursor: default;
}

.spm-auth-checks {
  display: grid;
  gap: 10px;
  padding: 14px;
  color: #425166;
  font-size: 13px;
  line-height: 1.55;
  background: #f5f7fa;
  border: 1px solid #dfe7ef;
  border-radius: 5px;
}

.spm-auth-checks label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.spm-auth-checks > strong {
  color: #243246;
  font-size: 13px;
}

.spm-auth-consent-heading {
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px solid #dfe7ef;
}

.spm-auth-checks input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: #1162a2;
}

.spm-auth-checks a {
  color: #1162a2;
  font-weight: 800;
  text-decoration: underline;
}

.spm-auth-account-consents p {
  margin: 0;
  color: #526176;
}

.spm-auth-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.spm-auth-account-actions {
  grid-template-columns: 1fr 1fr;
}

.spm-auth-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.spm-auth-submit,
.spm-auth-secondary,
.spm-auth-tertiary {
  min-height: 50px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  border-radius: 5px;
  cursor: pointer;
}

.spm-auth-submit {
  color: #05070a;
  background: #d9ff3f;
  border: 1px solid #d9ff3f;
}

.spm-auth-secondary {
  color: #fff;
  background: #071834;
  border: 1px solid #071834;
}

.spm-auth-tertiary {
  color: #243246;
  background: #fff;
  border: 1px solid #cbd6e2;
}

.spm-auth-submit:hover,
.spm-auth-submit:focus-visible {
  background: #c9ef2e;
  border-color: #c9ef2e;
}

.spm-auth-secondary:hover,
.spm-auth-secondary:focus-visible {
  background: #102847;
  border-color: #102847;
}

.spm-auth-tertiary:hover,
.spm-auth-tertiary:focus-visible {
  color: #071834;
  background: #eef3f8;
  border-color: #9badc0;
}

.spm-auth-submit:disabled,
.spm-auth-secondary:disabled,
.spm-auth-tertiary:disabled {
  cursor: wait;
  opacity: 0.62;
}

.spm-auth-status {
  min-height: 22px;
  margin: 0;
  color: #526176;
  font-size: 13px;
  line-height: 1.5;
}

.spm-auth-status.is-error {
  color: #b42318;
}

.spm-auth-status.is-success {
  color: #16733d;
}

.spm-auth-toast {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 10020;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  background: #071834;
  border-left: 4px solid #d9ff3f;
  border-radius: 5px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.spm-auth-toast.is-error {
  border-left-color: #ff6d3a;
}

body.spm-auth-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .spm-auth-header-actions {
    gap: 4px;
  }

  .spm-auth-trigger {
    min-height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }

  .spm-auth-overlay {
    align-items: center;
    padding: 12px;
  }

  .spm-auth-dialog {
    width: min(560px, 100%);
    max-height: 90svh;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
  }

  .spm-auth-head {
    min-height: 66px;
    padding: 10px 16px;
  }

  .spm-auth-brand img {
    width: 92px;
    height: 42px;
  }

  .spm-auth-brand strong {
    font-size: 15px;
  }

  .spm-auth-brand span {
    display: none;
  }

  .spm-auth-body {
    padding: 22px 16px calc(22px + env(safe-area-inset-bottom));
  }

  .spm-auth-account-summary {
    grid-template-columns: 1fr 1fr;
  }

  .spm-auth-account-summary > div:nth-child(2) {
    border-right: 0;
  }

  .spm-auth-account-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid #dfe7ef;
  }

  .spm-auth-form {
    grid-template-columns: 1fr;
  }

  .spm-auth-field.is-half {
    grid-column: 1 / -1;
  }

  .spm-auth-choice-row {
    grid-template-columns: 1fr;
  }

  .spm-auth-toast {
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }
}
