/**
 * Auth + My Account presentation CSS.
 *
 * Targets:
 * - body.ld-auth-page ( /giris /kayit /sifremi-unuttum )
 * - body.woocommerce-account lost-password endpoint (native key validation)
 *
 * CRITICAL: Do NOT override --wp--style--global--content-size on body —
 * that variable is inherited by the Site Editor header and collapses nav.
 * Auth width belongs only on .ld-auth / post content / post title.
 */

/* —— Dedicated auth pages: page typography only (no global content-size) —— */
body.ld-auth-page {
  font-size: var(--ld-font-size-base, 14px);
}

/* Auth content column — never target header/footer template parts */
body.ld-auth-page .wp-block-post-title,
body.ld-auth-page .entry-title {
  font-family: var(--ld-font-display);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem); /* ~28–36px */
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

body.ld-auth-page main .wp-block-post-content,
body.ld-auth-page main .entry-content,
body.ld-auth-page .wp-block-post-content,
body.ld-auth-page .entry-content {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  font-family: var(--ld-font-body);
  font-size: var(--ld-font-size-base, 14px);
  color: var(--ld-color-text);
}

/* TT5 alignfull + global padding already insets; avoid double horizontal shrink on content only */
body.ld-auth-page .wp-block-post-content.alignfull {
  padding-left: 0;
  padding-right: 0;
}

.ld-auth {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--ld-font-body);
  font-size: var(--ld-font-size-base, 14px);
}

.ld-auth__card {
  padding: 1.5rem 1.75rem; /* 24–28px */
  border: 1px solid var(--ld-color-border);
  background: var(--ld-color-surface-elevated);
  border-radius: 2px;
  box-sizing: border-box;
}

.ld-auth__heading {
  font-family: var(--ld-font-body);
  font-size: 1.3125rem; /* ~21px */
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ld-color-text);
}

.ld-auth form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ld-auth .form-row,
.ld-auth .woocommerce-form-row {
  margin: 0 0 0.85rem;
  padding: 0;
  width: 100%;
}

.ld-auth label {
  display: block;
  font-family: var(--ld-font-body);
  font-size: var(--ld-font-size-base, 14px);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.3rem;
}

.ld-auth .woocommerce-form__label-for-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  margin: 0;
}

.ld-auth input.input-text,
.ld-auth .woocommerce-Input--text,
.ld-auth input[type="text"],
.ld-auth input[type="email"],
.ld-auth input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.75rem; /* 44px */
  height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ld-color-border);
  border-radius: 2px;
  background: #fff;
  font-family: inherit;
  font-size: var(--ld-font-size-base, 14px);
  line-height: 1.4;
  color: inherit;
}

.ld-auth input.input-text:focus,
.ld-auth .woocommerce-Input--text:focus {
  outline: 2px solid color-mix(in srgb, var(--ld-color-dark) 35%, transparent);
  outline-offset: 1px;
  border-color: var(--ld-color-dark);
}

.ld-auth__row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.ld-auth .woocommerce-button,
.ld-auth button.button,
.ld-auth .woocommerce-Button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--ld-color-dark);
  border-radius: 2px;
  background: var(--ld-color-dark);
  color: #f4f1ea;
  font-family: var(--ld-font-body);
  font-size: var(--ld-font-size-base, 14px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  width: 100%;
  margin-top: 0.35rem;
}

.ld-auth .woocommerce-form-login__submit {
  width: auto;
  margin-left: auto;
  margin-top: 0;
}

.ld-auth .woocommerce-button:hover,
.ld-auth button.button:hover {
  opacity: 0.92;
}

.ld-auth .woocommerce-button:focus-visible,
.ld-auth button.button:focus-visible {
  outline: 2px solid var(--ld-color-dark);
  outline-offset: 2px;
}

.ld-auth .lost_password {
  margin: 0.5rem 0 0;
  font-size: var(--ld-font-size-sm, 13px);
}

.ld-auth .lost_password a,
.ld-auth__switch a {
  color: var(--ld-color-text-muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ld-auth .lost_password a:hover,
.ld-auth__switch a:hover {
  color: var(--ld-color-text);
}

.ld-auth__switch {
  margin: 1.1rem 0 0;
  font-size: var(--ld-font-size-sm, 13px);
  color: var(--ld-color-text-muted);
  text-align: center;
}

.ld-auth .ld-account-kvkk,
.ld-auth .woocommerce-privacy-policy-text {
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: var(--ld-font-size-sm, 13px);
  line-height: 1.55;
  color: var(--ld-color-text-muted);
}

.ld-auth .ld-account-kvkk + .woocommerce-privacy-policy-text {
  margin-top: 0.65rem;
}

.ld-auth .ld-account-kvkk a,
.ld-auth .woocommerce-privacy-policy-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ld-auth .woocommerce-privacy-policy-text p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.ld-auth__client-error {
  margin: 0 0 0.85rem;
  font-size: var(--ld-font-size-sm, 13px);
  line-height: 1.45;
  color: #b42318;
}

.ld-auth .password-input {
  display: block;
  position: relative;
  width: 100%;
}

.ld-auth .password-input input.input-text {
  padding-right: 2.75rem;
}

.ld-auth .show-password-input {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.ld-auth .woocommerce-ResetPassword,
.ld-auth form.lost_reset_password {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
}

.ld-auth .woocommerce-message,
.ld-auth .woocommerce-info,
.ld-auth .woocommerce-error,
.ld-auth .woocommerce-notices-wrapper {
  margin: 0 0 1rem;
  font-size: var(--ld-font-size-sm, 13px);
}

/* —— Native My Account lost-password endpoint (email link / key cookie) —— */
body.woocommerce-account:not(.logged-in).woocommerce-lost-password {
  font-size: var(--ld-font-size-base, 14px);
}

body.woocommerce-account:not(.logged-in).woocommerce-lost-password .wp-block-post-content,
body.woocommerce-account:not(.logged-in).woocommerce-lost-password .woocommerce {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--ld-font-body);
  font-size: var(--ld-font-size-base, 14px);
}

body.woocommerce-account:not(.logged-in).woocommerce-lost-password .woocommerce-ResetPassword,
body.woocommerce-account:not(.logged-in).woocommerce-lost-password form.lost_reset_password {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--ld-color-border);
  background: var(--ld-color-surface-elevated);
  border-radius: 2px;
}

body.woocommerce-account:not(.logged-in).woocommerce-lost-password input.input-text {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.75rem;
  height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ld-color-border);
  border-radius: 2px;
  font-size: var(--ld-font-size-base, 14px);
}

body.woocommerce-account:not(.logged-in).woocommerce-lost-password .woocommerce-button,
body.woocommerce-account:not(.logged-in).woocommerce-lost-password button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  width: 100%;
  border: 1px solid var(--ld-color-dark);
  border-radius: 2px;
  background: var(--ld-color-dark);
  color: #f4f1ea;
  font-size: var(--ld-font-size-base, 14px);
  font-weight: 600;
}

/* —— My Account edit-address location box (reuse checkout visual language) —— */
body.woocommerce-account.woocommerce-edit-address .ld-location-wrap {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--ld-color-border);
  background: var(--ld-color-surface);
  font-size: var(--ld-font-size-base, 14px);
  max-width: 100%;
  box-sizing: border-box;
}

body.woocommerce-account.woocommerce-edit-address .ld-location-wrap p {
  margin: 0 0 0.5rem;
  font-size: var(--ld-font-size-base, 14px);
  line-height: 1.45;
}

body.woocommerce-account.woocommerce-edit-address .ld-location-wrap .ld-btn {
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  font-size: var(--ld-font-size-base, 14px);
  margin-top: 0.25rem;
}

body.woocommerce-account.woocommerce-edit-address .ld-location-msg {
  font-size: var(--ld-font-size-sm, 13px);
  margin: 0.5rem 0 0;
}

@media (max-width: 560px) {
  .ld-auth__card,
  body.woocommerce-account:not(.logged-in).woocommerce-lost-password .woocommerce-ResetPassword {
    padding: 1rem 1.15rem;
  }

  .ld-auth .woocommerce-form-login__submit {
    width: 100%;
    margin-left: 0;
  }

  .ld-auth__row-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.woocommerce-account.woocommerce-edit-address .ld-location-wrap {
    padding: 0.65rem 0.75rem;
  }
}
