/* Login page — step-by-step phone auth */

body.pflame-login-page {
  --pf-login-offset-top: calc(var(--space-8) + 50px + var(--space-24));
  --pf-login-gap: var(--space-24);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-surface);
}

body.pflame-login-page .header__bottom,
body.pflame-login-page .pf-footer__column--menu,
body.pflame-login-page .pf-footer__newsletter,
body.pflame-login-page .pf-footer__logo,
body.pflame-login-page .pf-footer__copyright--desktop,
body.pflame-login-page .pf-footer__copyright-row,
body.pflame-login-page .mailer-subscribe {
  display: none;
}

body.pflame-login-page main.pflame-page--login,
body.pflame-login-page main.pflame-page {
  display: flex;
  flex: 1 0 auto;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: calc(var(--pf-login-offset-top) + var(--pf-login-gap)) var(--space-16) var(--space-24);
}

body.pflame-login-page footer.container,
body.pflame-login-page .app-footer {
  flex-shrink: 0;
  margin-top: auto;
}

body.pflame-login-page #page {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}

.pf-login-page__card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  padding: var(--space-24);
  border-radius: var(--radius-20);
  background: #D7DFF9;
  box-shadow: 0 8px 32px rgba(23, 23, 23, 0.08);
}

.pf-login-page__card::before {
  content: '';
  position: absolute;
  right: -48px;
  bottom: -72px;
  width: min(400px, 72%);
  height: min(460px, 85%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  filter: blur(52px);
  pointer-events: none;
  z-index: 0;
}

.pf-login-page__card > * {
  position: relative;
  z-index: 1;
}

.pf-login-page__close {
  position: absolute;
  top: var(--space-16);
  right: var(--space-16);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
}

.pf-login-page__close:hover {
  background: rgba(255, 255, 255, 0.55);
}

.pf-login-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-16);
  margin-bottom: var(--space-24);
  padding-right: 40px;
}

.pf-login-page__title {
  margin: 0 0 var(--space-8);
  font-weight: var(--weight-600);
  font-size: var(--text-22);
  line-height: 1.2;
  color: var(--color-text);
}

.pf-login-page__lead {
  margin: 0;
  font-size: var(--text-16);
  line-height: 1.35;
  color: var(--color-text-gray-2);
}

.pf-login-page__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1px solid #E0E0FD;
  border-radius: var(--radius-20);
  background: #E8EDFF;
  color: #7381FF;
}

.pf-login-page__form {
  margin-top: auto;
}

.pf-login-page__form .pf-login__label {
  display: block;
  margin: 0 0 var(--space-8);
  font-size: var(--text-14);
  line-height: 1.3;
  color: var(--color-text);
}

.pf-checkout-auth {
  margin-bottom: var(--space-16);
}

.pf-checkout-auth .pf-login__label {
  display: block;
  margin: 0 0 var(--space-8);
}

.pf-login-wrapper {
  width: 100%;
}

.pf-login {
  position: relative;
  padding: var(--space-24);
  border-radius: var(--radius-20);
  background: var(--color-white);
  box-shadow: 0 8px 32px rgba(23, 23, 23, 0.08);
}

.pf-login__close {
  position: absolute;
  top: var(--space-16);
  right: var(--space-16);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
}

.pf-login__close:hover {
  background: var(--color-surface);
}

.pf-login__title {
  margin: 0 0 var(--space-12);
  padding-right: 48px;
  font-weight: var(--weight-600);
  font-size: 28px;
  line-height: 1.15;
}

.pf-login__lead {
  margin: 0 0 var(--space-24);
  font-size: var(--text-14);
  line-height: 1.45;
  color: var(--color-text-gray-2);
}

.pf-login__step--code > .pf-login__title,
.pf-login__step--code > .pf-login__lead,
.pf-login__step--code > .pf-login__sent {
  text-align: center;
}

.pf-login__step--code > .pf-login__lead {
  color: var(--color-text);
}

.pf-login__step--code > .pf-login__title {
  padding-right: 0;
}

.pf-login__sent {
  margin: 0 0 var(--space-8);
  font-size: var(--text-14);
  line-height: 1.4;
  text-align: center;
  color: var(--color-text);
}

.pf-login__sent-phone {
  color: inherit;
  font-weight: inherit;
}

.pf-login__edit-phone {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-24);
}

.pf-login__edit-btn,
.pf-login__edit-btn.wa-send-onetime-password-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-8);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-xs);
  font: inherit;
  font-size: var(--text-16);
  font-weight: var(--weight-700);
  line-height: 1;
  color: var(--color-text);
  text-decoration: none;
  opacity: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pf-login__edit-btn:hover,
.pf-login__edit-btn.wa-send-onetime-password-edit-link:hover {
  background: rgba(230, 230, 230, 0.2);
  opacity: 1;
}

.pf-login__edit-btn .icon,
.pf-login__edit-btn-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 7px;
  color: rgba(116, 116, 116, 0.3);
}

.pf-login__fields {
  margin-bottom: var(--space-24);
}

.pf-login.is-code-step .pf-login__fields {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pf-login__field {
  margin: 0;
}

.pf-login__field--password {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.pf-login__field--remember,
.pf-login__field.wa-field-remember {
  display: none !important;
}

.pf-login__label {
  display: block;
  margin-bottom: var(--space-8);
  font-size: var(--text-14);
  font-weight: var(--weight-600);
}

.pf-login__phone-input .pf-login__input,
.pf-login__phone-input input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-16);
  border: 0;
  border-radius: var(--radius-8);
  background: #F3F4F7;
  font: inherit;
  font-size: var(--text-16);
  color: var(--color-text);
}

.pf-login__phone-input input:focus {
  outline: 2px solid rgba(239, 119, 61, 0.35);
  outline-offset: 0;
}

.pf-login__phone-input input.wa-error {
  box-shadow: inset 0 0 0 1px #e53935;
}

.pf-login__captcha {
  margin-top: var(--space-16);
}

.pf-login.is-code-step .pf-login__captcha--phone {
  display: none;
}

.pf-login__captcha-field .wa-value,
.pf-login__captcha-value {
  width: 100%;
}

.pf-login__captcha-field iframe,
.pf-login__captcha-field .smart-captcha,
.pf-login__captcha-field .g-recaptcha,
.pf-login__captcha-field .wa-captcha-input {
  max-width: 100%;
}

.pf-login__otp {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

.pf-login__otp-cell {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: var(--radius-8);
  background: #F3F4F7;
  font: inherit;
  font-size: 24px;
  font-weight: var(--weight-600);
  text-align: center;
  color: var(--color-text);
}

.pf-login__otp-cell:focus {
  outline: 2px solid rgba(239, 119, 61, 0.35);
  outline-offset: 0;
}

.pf-login__timer-wrap {
  margin-bottom: var(--space-24);
}

.pf-login__timer {
  font-size: var(--text-14);
  line-height: 1.4;
  color: var(--color-text-gray-2);
}

.pf-login__debug-otp {
  margin-bottom: var(--space-16);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-8);
  background: #fff8e6;
  border: 1px dashed #f0a030;
  font-size: var(--text-14);
  line-height: 1.4;
  color: #8a5a00;
  font-weight: var(--weight-600);
}

.pf-login__resend-link {
  font-size: var(--text-14);
  color: var(--color-btn-main--default);
  text-decoration: none;
}

.pf-login__consent {
  margin-bottom: var(--space-24);
}

.pf-login__consent--phone {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: var(--space-16);
  margin-bottom: 0;
}

.pf-login.is-code-step .pf-login__consent--phone {
  display: none !important;
}

.pf-login__consent--phone .pf-login__checkbox {
  margin-bottom: 0;
  font-size: var(--text-14);
  line-height: 1.4;
  color: var(--color-text);
}

.pf-login__checkbox {
  margin-bottom: var(--space-16);
  font-size: var(--text-14);
  line-height: 1.4;
}

.pf-login__checkbox a,
.pf-login__legal a,
.pf-login__personal-consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pf-login__legal {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-gray-2);
}

.pf-login__personal-consent {
  width: 100%;
  margin-bottom: 0;
  font-size: var(--text-14);
  line-height: 1.4;
  color: var(--color-text);
}

.pf-login__consent--phone.is-invalid .pf-login__personal-consent .pf-checkbox__icon {
  border-color: #e11d48;
  outline: 2px solid rgba(225, 29, 72, 0.25);
  outline-offset: 1px;
}

.pf-login__consent--phone.is-invalid .pf-login__personal-consent {
  color: #e11d48;
}

.pf-login__submit-wrap {
  width: 100%;
}

.pf-login__submit-wrap--request .pf-login__submit,
.pf-login__submit-wrap--login .pf-login__submit {
  width: 100%;
  min-height: 48px;
  font-size: var(--text-16);
  font-weight: var(--weight-600);
}

.pf-login.is-code-step .pf-login__submit-wrap--request {
  display: none !important;
}

.pf-login:not(.is-code-step) .pf-login__submit-wrap--login {
  display: none !important;
}

.pf-login:not(.is-code-step) .pf-login__step--code {
  display: none !important;
}

.pf-login.is-code-step .pf-login__step--phone {
  display: none !important;
}

.pf-login__loading {
  display: inline-block;
  margin-left: var(--space-8);
  vertical-align: middle;
}

.pf-login__error,
.pf-login .wa-error-msg {
  display: block;
  margin-top: var(--space-8);
  font-size: var(--text-14);
  font-style: normal;
  color: #e53935;
}

.pf-login .wa-info-msg {
  margin-bottom: var(--space-16);
  font-size: var(--text-14);
  color: var(--color-text-gray-2);
}

.pf-login .wa-login-form-title,
.pf-login .wa-form-sub-title,
.pf-login .wa-adapters-section,
.pf-login .wa-signup-url {
  display: none !important;
}

@media (min-width: 768px) and (max-width: 1179px) {
  body.pflame-login-page {
    --pf-login-offset-top: 90px;
  }
}

@media (min-width: 1180px) {
  body.pflame-login-page {
    --pf-login-offset-top: 191px;
    --pf-login-gap: var(--space-32);
  }
}

@media (min-width: 1360px) {
  body.pflame-login-page {
    --pf-login-offset-top: 202px;
  }
}
