.kp-legacy-checkout__section--auth .kp-legacy-checkout__actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.kp-legacy-checkout__otp[hidden],
.kp-legacy-checkout__verified[hidden],
.kp-legacy-checkout__error[hidden],
.kp-legacy-checkout__status[hidden] {
  display: none !important;
}

.kp-legacy-checkout__auth-step {
  display: grid;
  gap: var(--kp-space-4);
}

.kp-legacy-checkout__auth-panel {
  display: grid;
  gap: var(--kp-space-4);
}

.kp-legacy-checkout__smart-group {
  position: relative;
  --kp-smart-picker-width: 0px;
}

.kp-legacy-checkout__smart-group.is-recognized .kp-legacy-checkout__input {
  border-color: color-mix(in srgb, var(--kp-button-color) 42%, transparent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kp-button-color) 12%, transparent);
  background: color-mix(in srgb, var(--kp-button-color) 3%, var(--kp-surface-color));
}

.kp-legacy-checkout__smart-group.is-unrecognized .kp-legacy-checkout__input {
  border-color: rgba(0, 0, 0, 0.14) !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.96);
}

.kp-legacy-checkout__smart-group.is-phone .iti__flag-container,
.kp-legacy-checkout__smart-group.is-phone .flag-container,
.kp-legacy-checkout__smart-group .iti.krepling-smart-phone-active .iti__flag-container {
  display: flex !important;
}

.kp-legacy-checkout__smart-group .iti,
.kp-legacy-checkout__smart-group .intl-tel-input {
  display: block;
  width: 100%;
}

.kp-legacy-checkout__smart-group .iti__flag-container,
.kp-legacy-checkout__smart-group .flag-container {
  left: auto !important;
  right: 0 !important;
  padding: 1px 0 1px 1px;
  display: none !important;
}

.kp-legacy-checkout__smart-group .iti__selected-flag,
.kp-legacy-checkout__smart-group .selected-flag {
  width: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 10px 0 12px !important;
}

.kp-legacy-checkout__smart-group .iti__selected-flag:focus,
.kp-legacy-checkout__smart-group .iti__selected-flag:active,
.kp-legacy-checkout__smart-group .selected-flag:focus,
.kp-legacy-checkout__smart-group .selected-flag:active {
  outline: none !important;
  box-shadow: none !important;
}

.kp-legacy-checkout__smart-group .iti__selected-dial-code,
.kp-legacy-checkout__smart-group .selected-dial-code {
  margin-left: 6px;
  color: var(--kp-text-color);
}

.kp-legacy-checkout__smart-group .iti__arrow,
.kp-legacy-checkout__smart-group .iti-arrow {
  margin-left: 8px;
}

.kp-legacy-checkout__smart-group #smartIdentifierInput {
  padding-left: 12px;
  padding-right: 44px;
  text-align: left !important;
  direction: ltr;
}

.kp-legacy-checkout__smart-group.is-unknown #smartIdentifierInput,
.kp-legacy-checkout__smart-group.is-email #smartIdentifierInput,
.kp-legacy-checkout__smart-group .iti:not(.krepling-smart-phone-active) #smartIdentifierInput {
  padding-left: 12px !important;
  padding-right: 44px !important;
}

.kp-legacy-checkout__smart-group #smartIdentifierInput::placeholder,
.kp-legacy-checkout__smart-group #smartIdentifierInput::-webkit-input-placeholder,
.kp-legacy-checkout__smart-group #smartIdentifierInput::-moz-placeholder,
.kp-legacy-checkout__smart-group #smartIdentifierInput:-ms-input-placeholder {
  text-align: left;
}

.kp-legacy-checkout__smart-group.is-phone #smartIdentifierInput,
.kp-legacy-checkout__smart-group .iti.krepling-smart-phone-active #smartIdentifierInput {
  padding-left: 12px !important;
  padding-right: calc(var(--kp-smart-picker-width, 0px) + 44px) !important;
}

.kp-legacy-checkout__smart-clear {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #8a8a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
}

.kp-legacy-checkout__smart-group.is-phone .kp-legacy-checkout__smart-clear {
  right: calc(var(--kp-smart-picker-width, 0px) + 12px);
}

.kp-legacy-checkout__smart-group.is-loading .kp-legacy-checkout__smart-clear {
  display: none !important;
}

.kp-legacy-checkout__smart-loader {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  z-index: 5;
}

.kp-legacy-checkout__smart-group.is-phone .kp-legacy-checkout__smart-loader {
  right: calc(var(--kp-smart-picker-width, 0px) + 12px);
}

.kp-legacy-checkout__smart-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(22, 22, 22, 0.78);
}

.kp-legacy-checkout__login-panel {
  display: grid;
  gap: var(--kp-space-4);
}

.kp-legacy-checkout__login-panel[hidden],
.kp-legacy-checkout__auth-panel[hidden] {
  display: none !important;
}

.kp-legacy-checkout__input.is-error {
  border-color: var(--kp-error-color);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12);
}

.kp-legacy-checkout__input.is-success {
  border-color: var(--kp-success-color);
  box-shadow: 0 0 0 4px rgba(19, 115, 51, 0.12);
}

.kp-legacy-checkout__otp {
  margin-top: var(--kp-space-5);
  padding-top: var(--kp-space-5);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.kp-legacy-checkout__otp-panels {
  display: grid;
  gap: var(--kp-space-4);
}

.kp-legacy-checkout__otp-copy {
  margin: var(--kp-space-2) 0 var(--kp-space-4);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--kp-text-color);
}

.kp-legacy-checkout__otp-note {
  margin: 0 0 var(--kp-space-4);
  font-size: 0.75rem;
  color: rgba(22, 22, 22, 0.72);
}

.kp-legacy-checkout__otp-shell {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.kp-legacy-checkout__otp-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 86px;
  opacity: 0.01;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  z-index: 2;
}

.kp-legacy-checkout__otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.kp-legacy-checkout__otp-box {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kp-input-color);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--kp-radius-md);
  font-size: 2rem;
  font-weight: 700;
  color: var(--kp-text-color);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.kp-legacy-checkout__otp-box.is-active {
  border-color: var(--kp-button-color);
  box-shadow: 0 0 0 1px var(--kp-button-color), inset 0 0 5px rgba(0, 0, 0, 0.08);
  background: #fff;
  transform: translateY(-1px);
}

.kp-legacy-checkout__otp-box.is-error {
  border-color: var(--kp-error-color);
  box-shadow: 0 0 0 1px var(--kp-error-color), inset 0 0 5px rgba(180, 35, 24, 0.15);
}

.kp-legacy-checkout__otp-support {
  display: grid;
  gap: var(--kp-space-3);
  margin-top: var(--kp-space-4);
  justify-items: center;
  text-align: center;
}

.kp-legacy-checkout__otp-resend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.kp-legacy-checkout__otp-switch,
.kp-legacy-checkout__otp-recovery {
  display: flex;
  justify-content: center;
  width: 100%;
}

.kp-legacy-checkout__otp-guest-continue {
  width: 100%;
  max-width: 420px;
}

.kp-legacy-checkout__otp-link {
  color: var(--kp-button-color);
  font-weight: 600;
  text-decoration: none;
}

.kp-legacy-checkout__otp-link:hover,
.kp-legacy-checkout__otp-link:focus {
  text-decoration: underline;
}

.kp-legacy-checkout__otp-countdown {
  font-size: 0.8125rem;
  color: rgba(22, 22, 22, 0.72);
}

.kp-legacy-checkout__recovery-panel {
  display: grid;
  gap: var(--kp-space-4);
}

.kp-legacy-checkout__recovery-copy {
  margin: 0;
  line-height: 1.45;
  color: rgba(22, 22, 22, 0.72);
}

.kp-legacy-checkout__recovery-options {
  display: grid;
  gap: var(--kp-space-4);
}

.kp-legacy-checkout__recovery-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--kp-space-4);
  text-align: left;
  padding: var(--kp-space-4);
  border-radius: var(--kp-radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.kp-legacy-checkout__recovery-option-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kp-button-color);
}

.kp-legacy-checkout__recovery-option-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.kp-legacy-checkout__recovery-option-icon--support {
  color: var(--kp-text-color);
}

.kp-legacy-checkout__recovery-option.is-selected {
  border-color: var(--kp-button-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--kp-button-color) 24%, transparent), 0 14px 28px color-mix(in srgb, var(--kp-button-color) 8%, transparent);
}

.kp-legacy-checkout__recovery-option-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--kp-space-1);
}

.kp-legacy-checkout__recovery-option-title {
  font-weight: 700;
  color: var(--kp-text-color);
}

.kp-legacy-checkout__recovery-option-subtitle {
  color: rgba(22, 22, 22, 0.64);
  line-height: 1.4;
}

.kp-legacy-checkout__recovery-option-radio {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  box-shadow: inset 0 0 0 8px transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.kp-legacy-checkout__recovery-option.is-selected .kp-legacy-checkout__recovery-option-radio {
  border-color: var(--kp-button-color);
  background: var(--kp-button-color);
  box-shadow: inset 0 0 0 8px #fff;
}

.kp-legacy-checkout__recovery-actions {
  display: grid;
  gap: var(--kp-space-3);
}

.kp-legacy-checkout__recovery-continue {
  width: 100%;
}

.kp-legacy-checkout__recovery-back {
  width: 100%;
}

.kp-legacy-checkout__verified-title {
  display: block;
}

body > .intl-tel-input.iti-container,
body > .iti.iti--container {
  z-index: 9999;
}

.kp-legacy-checkout__button.is-busy::after {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: kp-legacy-checkout-spin 800ms linear infinite;
}

.kp-legacy-checkout__button--secondary.is-busy::after {
  border-color: rgba(22, 22, 22, 0.18);
  border-top-color: currentColor;
}

@keyframes kp-legacy-checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .kp-legacy-checkout__otp-box {
    min-height: 68px;
    font-size: 1.5rem;
  }
}
