/* ── Log in (patterns/login-card.php) ─────────────────────────────────
   Values verbatim from m-a-s-t-e-r-3.0 src/pages/Login.tsx inline
   styles. The WP page drops the SPA form + demo-credentials box; the
   cobalt button goes to wp-login.php instead. */

.master-login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 32px);
}

.master-login__wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.master-login__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.master-login__logo {
  margin: 0;
}

.master-login__logo img {
  width: 52px;
  height: 52px;
}

.master-login__title {
  font-weight: 700;
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: -0.015em;
  margin: 0;
}

/* master-card supplies the white bg, 1px var(--master-color-caliper) border and radius 16; the
   login card's padding, gap and shadow differ from the base card. */
.master-card.master-login__card {
  padding: clamp(22px, 4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
}

.master-login__copy {
  margin: 0;
}

/* Source button: full card width, 14px 24px pad, 600/15, radius 8. */
.master-login__btns {
  display: flex;
}

.master-login__btns .wp-block-button.master-login__btn {
  width: 100%;
}

.master-login__card .wp-block-button.master-login__btn .wp-block-button__link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}

/* Source link row: 13.5px, gap 12, wrap; centered here — the WP card
   carries a single link (WP owns password recovery). */
.master-login__links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  margin: 0;
}

/* ── Sign-in card (template-login.php) — ported from Login.tsx ───────── */
.master-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 32px);
}
.master-login__inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.master-login__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.master-login__mark { width: 52px; height: 52px; }
.master-login__title {
  font-family: "Space Grotesk", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: -0.015em;
  margin: 0;
}
.master-login__card {
  background: var(--master-color-chalk);
  border: 1px solid var(--master-color-caliper);
  border-radius: 16px;
  padding: clamp(22px, 4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
}
.master-login__error {
  font-size: 13.5px;
  color: var(--master-color-minium);
  font-weight: 500;
  background: var(--master-color-minium-wash);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0;
}
#master-loginform p { margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
#master-loginform label { font-size: 14px; font-weight: 600; }
#master-loginform input[type="text"],
#master-loginform input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--master-color-scribe);
  border-radius: 8px;
  font-size: 15px;
  background: var(--master-color-chalk);
  outline: none;
  font-family: inherit;
}
#master-loginform input[type="text"]:focus,
#master-loginform input[type="password"]:focus { border-color: var(--master-color-index); }
#master-loginform .login-remember { flex-direction: row; align-items: center; gap: 8px; }
#master-loginform .login-remember label { font-weight: 500; font-size: 13.5px; color: var(--master-color-graphite); }
#master-loginform .login-submit { margin-bottom: 0; }
#master-loginform input[type="submit"] {
  background: var(--master-color-index);
  color: var(--master-color-chalk);
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease;
}
#master-loginform input[type="submit"]:hover { background: var(--master-color-index-pressed); }
.master-login__links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

/* ── Social sign-in slot ──────────────────────────────────────────────
   `.master-social--card` (inc/social-login.php, styled in _social.css) is a
   direct child of `.master-login__card`, between the form and the link row, so
   the card's own 16px column gap spaces it. It is only present once a
   provider is configured — when it is absent the card collapses back to
   form + links with no leftover space. These two rules are the only thing
   the login card itself has to say about it. */
.master-login__card .master-social {
  width: 100%;
}

/* The submit button already ends flush (`.login-submit` zeroes its margin),
   so the divider only needs the card gap, not a second margin. */
.master-login__card #master-loginform + .master-social {
  margin-top: 0;
}
