/* enix-login.css - owned by the login page redesign
   Split "auth" layout shared by the sign-in family (login, password reset, two-factor).
   Generic classes (.enix-auth, .enix-auth-shell, .enix-auth-brand, .enix-auth-main, .enix-auth-card ...)
   so other auth pages (register) can mirror the same shell. Colours: tokens only. */

/* ------------------------------------------------------------------ page */
body.enix-page-login #main-body,
body.enix-page-password-reset-container #main-body,
body.enix-page-two-factor-challenge #main-body { padding-top: 40px; padding-bottom: 72px; }

.enix-auth { max-width: 1080px; margin: 0 auto; }

.enix-auth-shell {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}

/* ------------------------------------------------------------------ brand panel */
.enix-auth-brand {
  position: relative; display: flex;
  background-color: var(--bg-subtle);
  background-image: radial-gradient(color-mix(in srgb, var(--text-dim) 30%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
  border-right: 1px solid var(--border);
}
html[data-theme="light"] .enix-auth-brand { background-image: radial-gradient(rgba(15, 23, 42, .11) 1px, transparent 1.2px); }
/* soften the grid towards the bottom so the text stays the focus */
.enix-auth-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, transparent 35%, var(--bg-subtle) 100%);
}
.enix-auth-brand-inner { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; padding: 48px 48px 40px; }

.enix-auth-mark { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 40px; }
.enix-auth-mark-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.enix-auth-mark-icon svg, .enix-auth-mark-icon i { width: 18px; height: 18px; }
.enix-auth-mark-text { font-family: var(--font-head); font-weight: 800; font-size: 21px; color: var(--text); letter-spacing: .005em; }
.enix-auth-mark-text b { font-weight: 800; color: var(--primary); }

.enix-auth-eyebrow {
  align-self: flex-start; display: inline-block; padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, .12); color: #fff;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 18px;
}
html[data-theme="light"] .enix-auth-eyebrow { color: #1d4ed8; }

.enix-auth-title {
  font-family: var(--font-head); font-weight: 800; color: var(--text);
  font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.01em; margin: 0 0 14px;
}
.enix-auth-lead { color: var(--text-muted); font-size: 15px; line-height: 1.65; margin: 0 0 32px; max-width: 400px; }

.enix-auth-points { list-style: none; margin: 0 0 36px; padding: 0; display: grid; gap: 20px; }
.enix-auth-points li { display: flex; align-items: flex-start; gap: 14px; }
.enix-auth-point-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); border: 1px solid var(--border);
}
.enix-auth-point-icon svg, .enix-auth-point-icon i { width: 18px; height: 18px; }
.enix-auth-point-icon b { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--primary); }
.enix-auth-points strong { display: block; color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.enix-auth-points div > span { display: block; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; margin-top: 2px; }

.enix-auth-note {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 12.5px; font-family: var(--font-mono);
}
.enix-auth-note svg, .enix-auth-note i { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ form side */
.enix-auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 56px; }
.enix-auth-card { width: 100%; max-width: 420px; }

.enix-auth-head { margin-bottom: 28px; }
.enix-auth-form-title, .enix-auth-card h1.h3, .enix-auth-card .card-title {
  font-family: var(--font-head); font-weight: 800; color: var(--text);
  font-size: 26px; line-height: 1.2; margin: 0 0 6px;
}
.enix-auth-form-sub { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.enix-auth-card > p, .enix-auth-card form > p { color: var(--text-muted); font-size: 14.5px; }

.enix-auth .form-group { margin-bottom: 18px; }
.enix-auth label.form-control-label, .enix-auth .control-label, .enix-auth-card label:not(.enix-auth-check) {
  color: var(--text); font-size: 13.5px; font-weight: 600; margin-bottom: 7px;
}
.enix-auth .form-control { height: 48px; font-size: 15px; }
.enix-auth .input-group-merge .input-group-text,
.enix-auth .input-group-merge .input-group-append .btn { height: 48px; }
.enix-auth .input-group-merge .input-group-text { padding-left: 14px; padding-right: 10px; }
.enix-auth .input-group-text svg { width: 17px; height: 17px; }

/* show / hide password: Twenty-One only flips the input type, the icon follows via CSS */
.enix-auth .btn-reveal-pw { padding: 0 14px; display: inline-flex; align-items: center; }
.enix-auth .btn-reveal-pw svg { width: 18px; height: 18px; }
.enix-auth .btn-reveal-pw .enix-eye-hide { display: none; }
.enix-auth .pw-input[type="text"] ~ .input-group-append .enix-eye-show { display: none; }
.enix-auth .pw-input[type="text"] ~ .input-group-append .enix-eye-hide { display: inline-block; }

.enix-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 24px; flex-wrap: wrap; }
.enix-auth-link { color: var(--primary); font-size: 13.5px; font-weight: 600; }
.enix-auth-link:hover { color: var(--primary-hover); text-decoration: none; }

/* custom checkbox (the input keeps its native semantics) */
.enix-auth-check { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; user-select: none; color: var(--text-muted); font-size: 13.5px; font-weight: 500; }
.enix-auth-check input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; margin: 0; flex: 0 0 auto;
  width: 18px; height: 18px; border-radius: 5px; cursor: pointer; position: static;
  border: 1px solid var(--border-strong); background: var(--input-bg);
  transition: background-color .15s ease, border-color .15s ease;
}
.enix-auth-check input[type="checkbox"]:checked {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-color: var(--primary);
}
.enix-auth-check input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-soft); border-color: var(--primary); }
.enix-auth-check:hover input[type="checkbox"]:not(:checked) { border-color: var(--text-dim); }

.enix-auth-captcha { margin: 0 0 20px; }
.enix-auth-captcha .row { margin-left: 0; margin-right: 0; }
.enix-auth-captcha .col-md-8 { flex: 0 0 100%; max-width: 100%; padding: 0; }
.enix-auth-captcha #default-captcha-domainchecker { margin: 0; }
.enix-auth-captcha p { color: var(--text-muted); font-size: 13.5px; width: 100%; }
.enix-auth-captcha .captchaimage img { border-radius: var(--radius-sm); border: 1px solid var(--border); max-width: 100%; }

.enix-auth .btn-block { display: flex; align-items: center; justify-content: center; gap: 8px; }
.enix-auth-submit { height: 50px; padding-top: 0; padding-bottom: 0; font-weight: 600; }
.enix-auth-submit svg { width: 18px; height: 18px; transition: transform .2s ease; }
.enix-auth-submit:hover svg { transform: translateX(3px); }

.enix-auth-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 20px; color: var(--text-dim); font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.enix-auth-divider::before, .enix-auth-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--border); }

.enix-auth-alt { text-align: center; }
.enix-auth-alt > span { display: block; color: var(--text-muted); font-size: 13.5px; margin-bottom: 12px; }
.enix-auth .enix-auth-secondary {
  height: 48px; border-radius: 40px; font-weight: 600; font-size: 14.5px;
  background: transparent; border: 1px solid var(--border-strong); color: var(--text);
}
.enix-auth .enix-auth-secondary:hover, .enix-auth .enix-auth-secondary:focus { background: var(--card-hover); border-color: var(--text-dim); color: var(--text); text-decoration: none; }
.enix-auth-secondary svg { width: 17px; height: 17px; }

/* WHMCS linked accounts / social sign-in */
.enix-auth .providerPreLinking { margin-top: 18px; }
.enix-auth .social-signin-btns { display: flex; flex-direction: column; gap: 10px; }
.enix-auth .social-signin-btns > *, .enix-auth .social-signin-btns .btn { width: 100%; margin: 0 !important; }
.enix-auth .social-signin-btns .btn { height: 46px; border-radius: 40px; background: var(--input-bg); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; }
.enix-auth .social-signin-btns .btn:hover { background: var(--card-hover); }
.enix-auth .providerLinkingFeedback:not(:empty) { margin-bottom: 16px; }

.enix-auth .alert { border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }

/* links under a sub-form (back to login etc.) */
.enix-auth-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13.5px; font-weight: 500; }
.enix-auth-back:hover { color: var(--text); text-decoration: none; }
.enix-auth-back svg { width: 16px; height: 16px; }
.enix-auth-foot { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }

/* password reset inner templates */
.enix-auth .enix-auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.enix-auth .enix-auth-actions .btn { width: 100%; height: 48px; border-radius: 40px; font-weight: 600; }

/* two-factor */
.enix-auth .enix-auth-2fa-challenge input.form-control,
.enix-auth .enix-auth-2fa-challenge input[type="text"] { height: 52px; font-size: 18px; letter-spacing: .2em; font-family: var(--font-mono); text-align: center; }
.enix-auth .enix-auth-2fa-challenge .btn-primary { width: 100%; height: 50px; border-radius: 40px; margin-top: 14px; }
.enix-auth .enix-auth-2fa-help { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13.5px; text-align: center; }
.enix-auth .enix-auth-2fa-help a { color: var(--primary); font-weight: 600; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1199.98px) {
  .enix-auth-brand-inner { padding: 40px 36px 34px; }
  .enix-auth-main { padding: 40px 36px; }
}
@media (max-width: 991.98px) {
  body.enix-page-login #main-body,
  body.enix-page-password-reset-container #main-body,
  body.enix-page-two-factor-challenge #main-body { padding-top: 24px; padding-bottom: 48px; }
  .enix-auth { max-width: 560px; }
  .enix-auth-shell { grid-template-columns: 1fr; }
  /* brand panel collapses into a compact header above the form */
  .enix-auth-brand { border-right: 0; border-bottom: 1px solid var(--border); }
  .enix-auth-brand::after { background: linear-gradient(180deg, transparent 0%, var(--bg-subtle) 100%); }
  .enix-auth-brand-inner { padding: 26px 28px 24px; }
  .enix-auth-mark { display: none; }   /* the site header right above already shows the logo */
  .enix-auth-eyebrow { margin-bottom: 12px; }
  .enix-auth-title { font-size: 28px; margin-bottom: 8px; }
  .enix-auth-lead { font-size: 14px; margin: 0; max-width: none; }
  .enix-auth-points, .enix-auth-note { display: none; }
  .enix-auth-main { padding: 30px 28px 32px; }
  .enix-auth-card { max-width: none; }
}
@media (max-width: 575.98px) {
  .enix-auth-shell { border-radius: var(--radius-md); }
  .enix-auth-brand-inner { padding: 22px 20px 20px; }
  .enix-auth-main { padding: 26px 20px 28px; }
  .enix-auth-title { font-size: 25px; }
  .enix-auth-form-title, .enix-auth-card h1.h3 { font-size: 22px; }
}

/* ES monogram in the sign-in brand mark */
.enix-auth-mark-icon svg.enix-es-mark { width: 21px; height: 18px; }
