/* ===========================================================
   SIGN UP PAGE — extras on top of the lg-* login styles in style.css.
   Every class here is prefixed su- so nothing else on the site is affected.
   Load it AFTER style.css.
   =========================================================== */

/* ---- Role switch (real radio inputs, visually hidden but keyboard-focusable) ---- */
.su-role {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.su-role legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.su-role label { display: block; margin: 0; cursor: pointer; }
.su-role input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.su-role span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-700);
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.su-role label:hover span { color: var(--ink-900); }
.su-role input:checked + span {
  background: var(--surface);
  color: var(--ink-950);
  box-shadow: 0 0 0 1.5px var(--primary), var(--shadow-xs);
}
.su-role input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- Section labels and two-column rows ---- */
.su-section {
  margin: 26px 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.su-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.su-opt {
  font-weight: 500;
  color: var(--ink-500);
}

/* Role-specific field groups */
.su-group[hidden] { display: none; }

/* Phone: fixed +91 prefix inside the field */
.su-prefix {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--ink-500);
  pointer-events: none;
}
.su-input-phone input { padding-left: 80px; }

/* Plain inputs without a leading icon (grade, subjects, ...) */
.lg-input.su-noicon input { padding-left: 14px; }

/* ---- Password rules checklist ---- */
.su-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.su-rules li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink-500);
  transition: color var(--transition-fast);
}
.su-rules li::before {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: center / 9px 9px no-repeat;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.su-rules li.is-ok { color: #8FE3BF; }
.su-rules li.is-ok::before {
  background-color: var(--success);
  border-color: var(--success);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.4l2.3 2.3 4.7-5'/%3E%3C/svg%3E");
}

/* ---- Terms checkbox ---- */
.su-terms { align-items: flex-start; margin: 22px 0 0; line-height: 1.5; }
.su-terms input { margin-top: 2px; }
.su-terms a { color: #A794FF; text-decoration: underline; text-underline-offset: 3px; }
.su-terms a:hover { color: #C2B5FF; }
.su-terms-err { margin: 6px 0 0; }
.su-submit { margin-top: 22px; }

/* ---- Aside facts swap (role-specific) ---- */
.lg-facts[hidden] { display: none; }

@media (max-width: 480px) {
  .su-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .su-rules { grid-template-columns: 1fr; }
}