/* ============================================================
   MA Auth – logowanie / rejestracja (form-login.php)
   Paleta i kształty spójne z checkout / koszykiem / kontem.
   Wszystko zawężone pod .ma-auth, twardo nadpisuje motyw.
   ============================================================ */

.ma-auth {
  --ma-green: #2e7a4f;
  --ma-green-dark: #2c6543;
  --ma-text: #1a2e1e;
  --ma-muted: #6b7280;
  --ma-border: #ece9e1;
  --ma-note-bg: #e8f0ea;
  --ma-red: #b42318;
  --ma-red-bg: #fdecea;
  --ma-radius: 16px;
  --ma-radius-sm: 12px;

  max-width: 960px;
  margin: 0 auto;
  color: var(--ma-text);
}
.ma-auth.ma-auth--one {
  max-width: 460px;
}

/* --- nagłówek --- */
.ma-auth-head {
  text-align: center;
  margin: 0 0 28px;
}
.ma-auth-heading {
  margin: 0 0 8px !important;
  font-size: 28px;
  font-weight: 800;
  color: var(--ma-text);
}
.ma-auth-sub {
  margin: 0;
  font-size: 15px;
  color: var(--ma-muted);
}

/* --- siatka kart --- */
.ma-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.ma-auth--one .ma-auth-grid {
  grid-template-columns: 1fr;
}

/* --- karta --- */
.ma-auth-card {
  background: #fff;
  border: 1px solid var(--ma-border);
  border-radius: var(--ma-radius);
  padding: 30px 32px;
}
.ma-auth-title {
  margin: 0 0 22px !important;
  font-size: 20px;
  font-weight: 800;
  color: var(--ma-text);
}

/* --- pola --- */
.ma-auth .form-row,
.ma-auth .woocommerce-form-row {
  display: flex;
  flex-direction: column;
  margin: 0 0 16px !important;
  padding: 0 !important;
  width: 100% !important;
  float: none !important;
}
.ma-auth label {
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ma-muted) !important;
  margin-bottom: 6px !important;
}
.ma-auth .required {
  color: var(--ma-green) !important;
  border: 0 !important;
  text-decoration: none;
}
.ma-auth .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.ma-auth input.input-text,
.ma-auth input[type="text"],
.ma-auth input[type="email"],
.ma-auth input[type="password"] {
  width: 100% !important;
  height: 50px !important;
  border: 1px solid var(--ma-border) !important;
  border-radius: var(--ma-radius-sm) !important;
  padding: 0 15px !important;
  font-size: 15px !important;
  color: var(--ma-text) !important;
  background: #fafafa !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ma-auth input:focus {
  outline: none;
  border-color: var(--ma-green) !important;
  background: #fff !important;
}

/* pole hasła z ikoną „pokaż" (dodaje ją JS WooCommerce) */
.ma-auth .password-input,
.ma-auth .woocommerce-password-input {
  position: relative;
  display: block;
}
.ma-auth .password-input input {
  padding-right: 44px !important;
}
.ma-auth .show-password-input {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ma-muted);
  cursor: pointer;
}
.ma-auth .show-password-input.display-password {
  color: var(--ma-green);
}

/* --- „zapamiętaj mnie" + przycisk logowania --- */
.ma-auth-row {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  margin: 4px 0 0 !important;
}
.ma-auth .woocommerce-form-login__rememberme {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--ma-text) !important;
  cursor: pointer;
}
.ma-auth .woocommerce-form-login__rememberme input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  accent-color: var(--ma-green);
  cursor: pointer;
}

/* --- przyciski --- */
.ma-auth .button,
.ma-auth .woocommerce-button,
.ma-auth button[type="submit"] {
  display: block;
  width: 100%;
  background: var(--ma-green) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--ma-radius-sm) !important;
  padding: 15px 20px !important;
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.15s ease;
}
.ma-auth .button:hover,
.ma-auth .woocommerce-button:hover,
.ma-auth button[type="submit"]:hover {
  background: var(--ma-green-dark) !important;
}

/* --- „nie pamiętasz hasła?" --- */
.ma-auth .lost_password {
  margin: 16px 0 0 !important;
  text-align: center;
}
.ma-auth .lost_password a {
  color: var(--ma-green) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}
.ma-auth .lost_password a:hover {
  color: var(--ma-green-dark) !important;
}

/* --- notka „link zostanie wysłany…" przy rejestracji --- */
.ma-auth-note {
  margin: 0 0 16px !important;
  padding: 12px 14px;
  background: var(--ma-note-bg);
  border-radius: var(--ma-radius-sm);
  font-size: 13px;
  color: var(--ma-green-dark);
  line-height: 1.5;
}

/* --- powiadomienia (błędny login/hasło, „konto założone") nad formularzem --- */
body.woocommerce-account .woocommerce-notices-wrapper {
  max-width: 960px;
  margin: 0 auto 20px;
}
body.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error,
body.woocommerce-account .woocommerce-notices-wrapper .woocommerce-message,
body.woocommerce-account .woocommerce-notices-wrapper .woocommerce-info {
  list-style: none !important;
  margin: 0 0 12px !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-size: 14px;
  box-shadow: none !important;
  background: #e8f0ea;
  color: #2c6543;
}
body.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error {
  background: #fdecea;
  color: #b42318;
}
body.woocommerce-account
  .woocommerce-notices-wrapper
  .woocommerce-error::before,
body.woocommerce-account
  .woocommerce-notices-wrapper
  .woocommerce-message::before,
body.woocommerce-account
  .woocommerce-notices-wrapper
  .woocommerce-info::before {
  content: none !important;
}
body.woocommerce-account .woocommerce-notices-wrapper .button {
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  padding: 0 !important;
  font-weight: 700;
  text-decoration: underline;
  width: auto !important;
  display: inline;
}

/* --- reset hasła: tekst wprowadzający, powrót, miernik siły hasła --- */
.ma-auth .ma-auth-lead {
  margin: 0 0 20px !important;
  font-size: 14px;
  color: var(--ma-muted);
  line-height: 1.6;
}
.ma-auth-back {
  margin: 18px 0 0 !important;
  text-align: center;
}
.ma-auth-back a {
  color: var(--ma-green) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}
.ma-auth-back a:hover {
  color: var(--ma-green-dark) !important;
}

.ma-auth .woocommerce-password-strength {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--ma-radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.ma-auth .woocommerce-password-strength.strong {
  background: var(--ma-note-bg);
  color: var(--ma-green-dark);
}
.ma-auth .woocommerce-password-strength.good {
  background: #fff7e6;
  color: #b7791f;
}
.ma-auth .woocommerce-password-strength.short,
.ma-auth .woocommerce-password-strength.bad {
  background: var(--ma-red-bg);
  color: var(--ma-red);
}
.ma-auth .woocommerce-password-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ma-muted);
  line-height: 1.5;
}
.ma-auth .clear {
  clear: both;
}

.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
  border: none !important;
}

/* --- responsywność --- */
@media (max-width: 720px) {
  .ma-auth-grid {
    grid-template-columns: 1fr;
  }
  .ma-auth-card {
    padding: 24px;
  }
  .ma-auth-heading {
    font-size: 24px;
  }
}
