/* ==============================================================
   A4 Member Auth – Unified Styling CLEAN
   One source of truth for panels, fields, buttons.
   ============================================================== */

/* ====== knobs ====== */
:root{
  --a4-card-max: 420px;
  --a4-card-minh: 300px;

  --a4-btn-w: 220px;
  --a4-btn-h: 44px;
  --a4-btn-radius: 16px;

  --a4-blue: #0066cc;
  --a4-blue-hover: #004c99;

  --a4-border: #dcdcde;
  --a4-input-border: #cccccc;
}

/* ====== Panel / card wrapper ====== */
.a4-auth-panel{
  min-height: var(--a4-card-minh);
  max-width: var(--a4-card-max);
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;

  font-size: 1rem;
}

/* Titles */
.a4-auth-title{
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 1.4rem 0;
}

/* Account info */
.a4-auth-account-info{
  font-size: 1.3rem;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  text-align: center;
}
.a4-auth-account-info strong{
  font-size: 1.4rem;
}

/* ====== Forms / fields ====== */
.a4-auth-form{ margin-top: 1rem; }

.a4-auth-field{
  margin-bottom: 1rem;
  text-align: left;
}

.a4-auth-field label{
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.3rem;
}

.a4-auth-field input[type="text"],
.a4-auth-field input[type="email"],
.a4-auth-field input[type="password"]{
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--a4-input-border);
  border-radius: 6px;
  box-sizing: border-box;
}

/* ====== Buttons (ONE source of truth) ====== */
/* Apply to <a> and <button> using the same class */
.a4-auth-button{
  /* layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: var(--a4-btn-w);
  max-width: 100%;
  height: var(--a4-btn-h);
  line-height: 1;

  margin: 0.75rem auto 0;
  padding: 0;

  /* appearance */
  border: none;
  border-radius: var(--a4-btn-radius);
  background: var(--a4-blue);
  color: #fff !important;
  text-decoration: none;

  font-size: 16px;
  font-weight: 600;
  cursor: pointer;

  /* theme cleanup */
  outline: none;
  box-shadow: none;
  background-image: none;

  transition: background 0.2s, transform 0.1s;
}

.a4-auth-button:hover{
  background: var(--a4-blue-hover);
  transform: translateY(-1px);
}

/* Variant: secondary (white button) */
.a4-auth-button--secondary{
  background: #ffffff;
  color: #0a4fc2 !important;
  border: 2px solid #0a4fc2;
}
.a4-auth-button--secondary:hover{
  background: #f4f7ff;
  transform: translateY(-1px);
}

/* Variant: danger (optional) */
.a4-auth-button--danger{
  background: #b32d2e;
}
.a4-auth-button--danger:hover{
  background: #8f2324;
}

/* ====== Button groups (where buttons stack) ====== */
.a4-auth-buttons{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

/* If a theme wraps your buttons in <p>, kill the extra spacing */
.a4-auth-buttons p{ margin: 0; }
.a4-auth-panel p{ margin: 0.75rem 0 0; } /* keeps normal text readable */

/* ====== Success / error ====== */
.a4-auth-success{
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
  padding: 12px 14px;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-weight: 600;
}

.a4-auth-error{
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
  padding: 12px 14px;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-weight: 600;
}
.a4-auth-error p{ margin: 0.4rem 0; }

/* ====== Password wrapper + eye toggle ====== */
.a4-password-wrapper{
  position: relative;
  display: flex;
  align-items: center;
}
.a4-password-wrapper input[type="password"],
.a4-password-wrapper input[type="text"]{
  flex: 1;
  padding-right: 2.4rem;
  box-sizing: border-box;
}
.a4-password-toggle{
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
}
.a4-password-toggle:hover{ opacity: 1; }

/* ====== Password match indicator pill ====== */
.a4-password-match-status{
  font-size: 0.95rem;
  margin-top: 0.35rem;
  min-height: 1.4em;
  font-weight: 600;

  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.a4-password-match-status.a4-match{
  background: #2e7d32;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 999px;
}
.a4-password-match-status.a4-mismatch{
  background: #b71c1c;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 999px;
}

.a4-input-match{ border-color: #2e7d32 !important; }
.a4-input-mismatch{ border-color: #b71c1c !important; }

/* ====== Optional: "fuse" adjacent panels (login + change pw) ====== */
.a4-auth-panel + .a4-auth-panel{
  margin-top: 0;
  border-top: none;
  padding-top: 0.5rem;
}
.a4-auth-panel + .a4-auth-panel .a4-auth-title{
  font-size: 1.1rem;
  margin: 0.5rem 0 0.75rem 0;
}

/* JAN21 */
/* Logged-in account panel: anchor content to top */
.a4-account-panel{
  justify-content: flex-start !important;
  padding-top: 18px; /* your chosen top offset */
}
