/**
 * Site-next auth modalları (Giriş + Kayıt) — açık tema, yeşil aksanlı görsel skin.
 * Hem #site-next-modal-login hem #site-next-modal-register için.
 *
 * Yükleme sırası: sn-modals-mobile.css → sn-auth-modal-fix.css → sn-register-modal.css → BU DOSYA.
 * Modal kart arka planı ve metin renkleri vendor tema değişkenlerinden gelir (color-scheme: light).
 * Burası sadece yeşil odak, gradient CTA, bonus banner ve micro-interactions ekler.
 */

:root {
  --sn-auth-brand: var(--color-solid-brand-primary-default, #12b857);
  --sn-auth-brand-hover: var(--color-solid-brand-primary-hover, #0fa44e);
  --sn-auth-brand-soft: var(--color-solid-brand-primary-alfa-12, rgba(18, 184, 87, 0.12));
  --sn-auth-brand-soft-strong: var(--color-solid-brand-primary-alfa-68, rgba(18, 184, 87, 0.22));
  --sn-auth-brand-ring: var(--color-solid-brand-primary-alfa-68, rgba(18, 184, 87, 0.18));
  --sn-auth-strength-weak: var(--color-solid-sentiment-negative-default, #ff4d4f);
  --sn-auth-strength-fair: var(--color-solid-sentiment-warning-default, #f7b500);
  --sn-auth-strength-good: var(--color-solid-sentiment-positive-default, #4ad36c);
  --sn-auth-on-brand: var(--color-content-base-on-primary, #fff);
  --sn-auth-step-current: var(--color-solid-sentiment-informative-default, #2563eb);
}

/* —— Modal kartı: tema rengini koru, hafif gölge —— */
#site-next-modal-login .sn-login-card,
#site-next-modal-register .sn-reg-card,
#site-next-modal-complete-profile .sn-complete-profile-card {
  box-shadow:
    0 22px 60px -18px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(0, 0, 0, 0.04);
}

@media (max-width: 1023.98px) {
  #site-next-modal-login .sn-login-card,
  #site-next-modal-register .sn-reg-card,
  #site-next-modal-complete-profile .sn-complete-profile-card {
    border-radius: var(--modal-rounding, 16px) var(--modal-rounding, 16px) 0 0;
  }
}

/* —— Üst başlık + kapatma —— */
#site-next-modal-login .modal-header_title-27LrA,
#site-next-modal-register .modal-header_title-27LrA,
#site-next-modal-complete-profile .modal-header_title-27LrA {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#site-next-modal-login .modal-header_button-27LrA,
#site-next-modal-register .modal-header_button-27LrA {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
}

/* —— Input alanları: yeşil odak halkası —— */
#site-next-modal-login .base-field_root-ttxw4,
#site-next-modal-register .base-field_root-ttxw4,
#site-next-modal-complete-profile .base-field_root-ttxw4 {
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

/* Giriş: input şeffaf kalsın; arka plan field-wrapper'dan gelsin (renk bandı / hizalama hatası olmasın) */
#site-next-modal-login .control_root-5SZBQ input {
  left: 0;
  top: 0;
  background: transparent;
  background-color: transparent;
  color: var(--color-content-base-primary);
}

#site-next-modal-login .base-field_root-ttxw4.base-field_focused-ttxw4,
#site-next-modal-register .base-field_root-ttxw4.base-field_focused-ttxw4,
#site-next-modal-complete-profile .base-field_root-ttxw4.base-field_focused-ttxw4 {
  border-color: var(--sn-auth-brand) !important;
  box-shadow: 0 0 0 3px var(--sn-auth-brand-ring);
}

#site-next-modal-login .base-field_root-ttxw4.base-field_focused-ttxw4 .base-field_label-ttxw4,
#site-next-modal-register .base-field_root-ttxw4.base-field_focused-ttxw4 .base-field_label-ttxw4,
#site-next-modal-complete-profile .base-field_root-ttxw4.base-field_focused-ttxw4 .base-field_label-ttxw4 {
  color: var(--sn-auth-brand);
}

#site-next-modal-login .base-field_root-ttxw4.base-field_focused-ttxw4 .base-field_iconStart-ttxw4 svg,
#site-next-modal-register .base-field_root-ttxw4.base-field_focused-ttxw4 .base-field_iconStart-ttxw4 svg,
#site-next-modal-complete-profile .base-field_root-ttxw4.base-field_focused-ttxw4 .base-field_iconStart-ttxw4 svg {
  color: var(--sn-auth-brand);
}

/* —— Şifre göster/gizle butonu —— */
.sn-auth-pw-toggle {
  position: absolute;
  inset-inline-end: var(--spacing-8);
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--color-content-base-tertiary, #9aa3b5);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.18s ease, color 0.18s ease;
  z-index: 2;
}

.sn-auth-pw-toggle:hover {
  background: var(--color-background-base-alfa-neutral-12, rgba(0, 0, 0, 0.06));
  color: var(--color-content-base-primary);
}

.sn-auth-pw-toggle svg {
  width: 18px;
  height: 18px;
}

.sn-auth-pw-toggle .sn-auth-pw-icon--hide {
  display: none;
}

.sn-auth-pw-toggle[aria-pressed='true'] .sn-auth-pw-icon--show {
  display: none;
}

.sn-auth-pw-toggle[aria-pressed='true'] .sn-auth-pw-icon--hide {
  display: inline-block;
}

#site-next-modal-login .field-wrapper_root-xSBJ6:has(input[type='password']),
#site-next-modal-register .field-wrapper_root-xSBJ6:has(input[type='password']) {
  position: relative;
}

#site-next-modal-login .field-wrapper_root-xSBJ6:has(.sn-auth-pw-toggle) input,
#site-next-modal-register .field-wrapper_root-xSBJ6:has(.sn-auth-pw-toggle) input {
  padding-inline-end: 44px;
}

/* —— Şifre gücü ölçer —— */
.sn-auth-strength {
  margin: calc(-1 * var(--spacing-8)) 0 var(--modal-padding-modal-gap-stack-form);
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  font-size: 12px;
  color: var(--color-content-base-secondary);
}

.sn-auth-strength__bar {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: var(--color-background-base-alfa-neutral-12, rgba(0, 0, 0, 0.06));
  position: relative;
  overflow: hidden;
}

.sn-auth-strength__bar::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--sn-strength-width, 0%);
  background: var(--sn-strength-color, var(--color-content-base-tertiary));
  border-radius: inherit;
  transition: width 0.22s ease, background 0.22s ease;
}

.sn-auth-strength[data-level='1'] {
  --sn-strength-width: 25%;
  --sn-strength-color: var(--sn-auth-strength-weak);
}

.sn-auth-strength[data-level='2'] {
  --sn-strength-width: 50%;
  --sn-strength-color: var(--sn-auth-strength-fair);
}

.sn-auth-strength[data-level='3'] {
  --sn-strength-width: 75%;
  --sn-strength-color: var(--sn-auth-strength-good);
}

.sn-auth-strength[data-level='4'] {
  --sn-strength-width: 100%;
  --sn-strength-color: var(--sn-auth-brand);
}

.sn-auth-strength__label {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--sn-strength-color, var(--color-content-base-secondary));
  min-width: 56px;
  text-align: right;
}

/* —— Ana CTA butonu —— */
#site-next-modal-login form button[type='submit'],
#site-next-modal-complete-profile .sn-complete-profile__submit,
#site-next-modal-register .sn-reg-wizard__btn-next,
#site-next-modal-register .sn-reg-wizard__btn-submit {
  background: linear-gradient(180deg, var(--sn-auth-brand) 0%, var(--sn-auth-brand-hover) 100%);
  color: var(--sn-auth-on-brand);
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--rounding-control-m, 12px);
  box-shadow: 0 8px 20px -10px var(--sn-auth-brand-soft-strong);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

#site-next-modal-login form button[type='submit']:hover,
#site-next-modal-complete-profile .sn-complete-profile__submit:hover,
#site-next-modal-register .sn-reg-wizard__btn-next:hover,
#site-next-modal-register .sn-reg-wizard__btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px var(--sn-auth-brand-soft-strong);
  filter: brightness(1.03);
}

#site-next-modal-login form button[type='submit']:active,
#site-next-modal-complete-profile .sn-complete-profile__submit:active,
#site-next-modal-register .sn-reg-wizard__btn-next:active,
#site-next-modal-register .sn-reg-wizard__btn-submit:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

#site-next-modal-register .sn-reg-wizard__btn-back {
  background: var(--color-background-base-alfa-neutral-12, rgba(0, 0, 0, 0.06));
  color: var(--color-content-base-primary);
  border-radius: 12px;
  font-weight: 600;
  transition: background 0.18s ease;
}

#site-next-modal-register .sn-reg-wizard__btn-back:hover {
  background: var(--color-background-base-alfa-neutral-16, rgba(0, 0, 0, 0.08));
}

/* —— "Şifremi unuttum" linki —— */
#site-next-modal-login [data-sn-auth-open-forgot] {
  color: var(--color-content-base-secondary);
  font-weight: 500;
  font-size: 13px;
  transition: color 0.18s ease;
}

#site-next-modal-login [data-sn-auth-open-forgot]:hover {
  color: var(--sn-auth-brand);
}

/* —— Alt geçiş satırı —— */
#site-next-modal-login .united-form_login-QgQ3V,
#site-next-modal-register .sn-reg-wizard__switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: var(--spacing-16);
  margin-top: var(--spacing-16);
  border-top: 1px solid var(--color-border-base-alfa-divider, rgba(0, 0, 0, 0.08));
  font-size: 13px;
}

#site-next-modal-login .united-form_login-QgQ3V button,
#site-next-modal-register .sn-reg-wizard__switch button {
  color: var(--sn-auth-brand) !important;
  font-weight: 700;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
}

#site-next-modal-login .united-form_login-QgQ3V button:hover,
#site-next-modal-register .sn-reg-wizard__switch button:hover {
  text-decoration: underline;
}

/* —— Bonus banner —— */
.sn-auth-bonus-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--spacing-16);
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sn-auth-brand-soft-strong) 0%, var(--sn-auth-brand-soft) 100%);
  border: 1px solid var(--sn-auth-brand-soft-strong);
  color: var(--color-content-base-primary);
}

.sn-auth-bonus-banner__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--sn-auth-brand);
  color: var(--sn-auth-on-brand);
}

.sn-auth-bonus-banner__icon svg {
  width: 20px;
  height: 20px;
}

.sn-auth-bonus-banner__text {
  flex: 1 1 auto;
  min-width: 0;
}

.sn-auth-bonus-banner__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.sn-auth-bonus-banner__sub {
  margin: 2px 0 0;
  font-size: var(--font-caption-s-regular-font-size, 12px);
  line-height: var(--font-caption-s-regular-line-height, 1.33);
  color: var(--color-content-base-secondary);
}

/* —— Progress nokta + line aksanı —— */
#site-next-modal-register .sn-reg-wizard__progress {
  margin: 0 0 var(--spacing-12);
}

#site-next-modal-register .sn-reg-wizard__dot {
  width: 8px;
  height: 8px;
  background: var(--color-background-base-secondary);
  border: 1px solid var(--color-border-base-alfa-divider);
}

#site-next-modal-register .sn-reg-wizard__dot.is-upcoming {
  background: var(--color-background-base-secondary);
  border-color: var(--color-border-base-alfa-divider);
}

#site-next-modal-register .sn-reg-wizard__dot.is-active,
#site-next-modal-register .sn-reg-wizard__dot.is-completed {
  background: var(--sn-auth-brand);
  border-color: var(--sn-auth-brand);
  box-shadow: none;
}

#site-next-modal-register .sn-reg-wizard__dot.is-current {
  background: var(--sn-auth-step-current);
  border-color: var(--sn-auth-step-current);
  box-shadow: 0 0 0 4px var(--color-solid-sentiment-informative-alfa-12, rgba(37, 99, 235, 0.18));
  transform: scale(1.35);
}

#site-next-modal-register .sn-reg-wizard__line {
  background: var(--color-border-base-tertiary);
}

#site-next-modal-register .sn-reg-wizard__step-title {
  font-weight: 700;
  font-size: 14px;
}

#site-next-modal-register .sn-reg-wizard__hint {
  font-size: 12px;
  line-height: 1.5;
}

/* —— Terms checkbox —— */
#site-next-modal-register .sn-reg-wizard__terms .checkbox_input-qop45:checked + .checkbox_box-qop45 {
  background: var(--sn-auth-brand);
  border-color: var(--sn-auth-brand);
  color: var(--sn-auth-on-brand);
}

#site-next-modal-register .sn-reg-wizard__terms-text a {
  color: var(--sn-auth-brand);
}

/* —— Promo link —— */
#site-next-modal-register .sn-reg-wizard__link {
  color: var(--sn-auth-brand);
}
