/* =========================================================
   AUTH PAGES (login / register / password)
   – Two-column layout
   – Clean inputs + strong focus states
   – Works without Twig override (uses core IDs/classes)
   ========================================================= */

/* ---- Design tokens (adjust to your brand) ---- */
:root {
  --auth-font: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --auth-text: #111111;
  --auth-muted: #666666;
  --auth-border: #e6e6e6;
  --auth-bg: #f4e8e8;          /* page background */
  --auth-primary: #5b57ff;     /* main action color */
  --auth-primary-press: #4a46e6;
  --auth-input-bg: #f0f3ff;    /* light bluish input bg */
}

html, body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex: 1;
}
.dialog-off-canvas-main-canvas {
  width: 100%;
}

/* Scope only to auth pages */
body.path-user-login,
body.path-user-register,
body.path-user-pass {
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: var(--auth-bg);
}

/* Center content + breathing room */
body.path-user-login .region-content,
body.path-user-register .region-content,
body.path-user-pass .region-content {
  min-height: 100dvh;
  padding: 24px;
  display: grid;
  place-items: center;
}

/* ====== Shell (two columns) ====== */
.auth-wrap {
  width: 100%;
  /*max-width: 1416px;*/
  /*min-height: 80dvh;*/
  height: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  @media all and (min-width: 768px) {
    flex-direction: row;
  }
}
.auth-card {
  justify-content: center;
  margin: auto;
  @media all and (min-width: 640px) {
    max-width: 66.66%;
  }
}
.auth-brand {
  margin-bottom: 40px;
}

.auth-brand__link {
  display: inline-flex;
  text-decoration: none;
}

.auth-brand__link img {
  display: block;
}

.auth-title {
  text-align: center;
}
/* Left column: card */
.auth-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 0 12px;
  input {
    display: inline-block;
    box-sizing: border-box;
  }
}

/* Branding row (logo) */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-brand img { height: 50px; }

/* Titles & intro */
.auth-title {
  margin: 6px 0 8px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--auth-text);
}
.auth-msg {
  margin: 2px 0 6px;
  font-size: 14px;
  color: var(--auth-muted);
}

/* ====== Core forms (work with or without Twig override) ====== */
form#user-login-form,
form#user-register-form,
form#user-pass {
  max-width: 520px;
}

/* Uniform spacing for items */
.form-item { margin-bottom: 14px; }

/* Labels */
.form-item label {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"] {
  width: 100%;
  max-width: 100%;
  height: 50px;
  border: 1px solid #d9d9e0;
  border-radius: 8px;
  background: var(--auth-input-bg);
  padding: 0 14px;
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(91,87,255,.18);
  background: #fff;
}

/* Descriptions & help text */
.form-item .description {
  margin-top: 6px;
  font-size: 12px;
  color: var(--auth-muted);
}

/* Remember me / checkboxes inline */
.form-type-checkbox,
.form-type-radio {
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-type-checkbox input[type="checkbox"],
.form-type-radio input[type="radio"] {
  width: 18px; height: 18px;
}

/* Actions */
.form-actions { margin-top: 18px; }
.form-actions [type="submit"],
button[type="submit"],
input[type="submit"] {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 10px;
  background: var(--auth-primary);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  transition: filter .15s ease, background .15s ease;
}
.form-actions [type="submit"]:hover { filter: brightness(.98); }
.form-actions [type="submit"]:active { background: var(--auth-primary-press); }

/* Secondary ghost button (e.g., "Register") */
.auth-ghost {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 54px;

  border: 2px solid #d9d9e0;
  border-radius: 10px;
  background: #fff;
  color: var(--auth-primary);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.auth-ghost:hover { background:#fafafa; border-color:#cfcfe0; }

/* Aux links (forgot/back) */
.auth-links {
  margin-top: 8px;
}
.auth-links a {
  color: var(--auth-primary);
  font-weight: 700;
  text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

/* ====== Messages / errors / status ====== */
.messages,
[role="alert"],
.messages--error,
.messages--status,
.messages--warning {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 10px 0 14px;
}
.messages--error,
[role="alert"].messages--error {
  border: 1px solid #f2c6c6;
  background: #fff5f5;
  color: #8a1f1f;
}
.messages--status {
  border: 1px solid #cfe9cf;
  background: #f4fff4;
  color: #1b6e1b;
}

/* ====== Password strength meter (core) ====== */
.password-strength {
  margin-top: 6px;
}
.password-strength .password-strength__meter {
  height: 8px;
  border-radius: 6px;
  background: #eee;
  overflow: hidden;
}
.password-strength .password-strength__indicator {
  height: 100%;
  background: var(--auth-primary);
  transition: width .2s ease;
}
.password-suggestions {
  margin-top: 6px;
  font-size: 12px;
  color: var(--auth-muted);
}

/* ====== CAPTCHA (if present) ====== */
.captcha,
.captcha__element,
.captcha-admin-links {
  margin-top: 10px;
}
.captcha .form-item { margin-bottom: 10px; }

/* ====== Right column (photo area) ====== */
.auth-photo {
  background-position: center;
  background-size: cover;
  position: relative;
  flex: 0 0 50%;
}
/* soft white overlay to match brand feel */
.auth-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom right, rgba(255,255,255,.65), rgba(255,255,255,.65));
}


/* ====== Register-specific note (email verification) ====== */
body.path-user-register .auth-msg {
  display: block;
}

/* ====== Responsive ====== */
@media (max-width: 1024px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-photo { display: none; }
  /*.auth-card { padding: 36px 24px; }*/
  .auth-title { font-size: 32px; }
}

/* Slightly smaller devices */
@media (max-width: 480px) {
  /*.auth-card { padding: 28px 18px; }*/
  .auth-title { font-size: 28px; }
}
