/* ==========================================================================
   Raisers India — Auth pages (login / register)
   Used by the ASP.NET pages that sit on MasterPage.master. Presentation only:
   every server control keeps its original ID, type and handler.
   ========================================================================== */

/* ---- Legacy theme overrides --------------------------------------------
   This file loads alongside the old style.css on the ASP.NET pages. That
   stylesheet sets a global `p { text-align: justify }` (style.css:37847),
   which leaves ragged word spacing in the current design.

   `body p` (0,0,2) outranks the bare `p` (0,0,1), while `text-align: inherit`
   lets paragraphs follow their container — so centred blocks stay centred,
   and the `.ri-text-center` utility (0,1,0) still wins over both. */
body p { text-align: inherit; }

.ri-auth {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ri-cream);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}

/* Soft brand wash behind the card. */
.ri-auth::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%;
  right: -10%;
  width: 780px;
  height: 780px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 111, 184, 0.1), transparent 65%);
  pointer-events: none;
}

.ri-auth__shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  max-width: 1080px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--ri-border);
  border-radius: var(--ri-r-xl);
  box-shadow: var(--ri-shadow-xl);
  overflow: hidden;
}

@media (max-width: 900px) {
  .ri-auth__shell { grid-template-columns: 1fr; }
}

/* ---- Brand panel -------------------------------------------------------- */
.ri-auth__aside {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--ri-space-6);
  padding: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  color: #fff;
  background: var(--ri-ink);
  min-height: 520px;
}

.ri-auth__aside-img {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.ri-auth__aside-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ri-auth__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(165deg, rgba(6, 20, 38, 0.82) 0%, rgba(6, 20, 38, 0.92) 100%);
}

/* Arc ornament echoing the logo sweep. */
.ri-auth__aside::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -35%;
  bottom: -30%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 196, 244, 0.28);
  pointer-events: none;
}

.ri-auth__aside-logo {
  display: inline-block;
  width: fit-content;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border-radius: var(--ri-r-md);
}

.ri-auth__aside-logo img { height: 30px; width: auto; display: block; }

.ri-auth__aside-title {
  color: #fff;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
  line-height: 1.12;
  margin: 0 0 var(--ri-space-3);
}

.ri-auth__aside-body {
  color: var(--ri-text-invert-soft);
  font-size: var(--ri-fs-sm);
  margin: 0;
  max-width: 34ch;
}

.ri-auth__points {
  display: flex;
  flex-direction: column;
  gap: var(--ri-space-3);
}

.ri-auth__point {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: var(--ri-fs-sm);
  color: var(--ri-text-invert-soft);
}

.ri-auth__point svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--ri-blue-300);
}

@media (max-width: 900px) {
  .ri-auth__aside { min-height: 0; }
  /* The supporting points are a nice-to-have; drop them on small screens so
     the form is the first thing in view. */
  .ri-auth__points { display: none; }
}

/* ---- Form panel --------------------------------------------------------- */
.ri-auth__main {
  padding: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ri-auth__head {
  display: flex;
  flex-direction: column;
  gap: var(--ri-space-2);
  margin-bottom: var(--ri-space-6);
}

.ri-auth__title { margin: 0; }
.ri-auth__sub { margin: 0; font-size: var(--ri-fs-sm); color: var(--ri-text-soft); }

.ri-auth__fields {
  display: flex;
  flex-direction: column;
  gap: var(--ri-space-4);
}

.ri-auth__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ri-space-3);
}

.ri-auth__label-row a {
  font-size: var(--ri-fs-xs);
  font-weight: 600;
  color: var(--ri-blue-700);
}

.ri-auth__label-row a:hover { color: var(--ri-accent); }

.ri-auth__foot {
  margin-top: var(--ri-space-5);
  padding-top: var(--ri-space-5);
  border-top: 1px solid var(--ri-line-2);
  font-size: var(--ri-fs-sm);
  color: var(--ri-text-soft);
  text-align: center;
}

.ri-auth__foot a { font-weight: 700; }

/* ---- CAPTCHA block ------------------------------------------------------
   The MSCaptcha control renders an <img> inside a <table>; these rules frame
   it without altering the control markup. */
.ri-captcha {
  display: flex;
  flex-direction: column;
  gap: var(--ri-space-3);
  padding: var(--ri-space-4);
  background: var(--ri-cream);
  border: 1px solid var(--ri-border);
  border-radius: var(--ri-r-md);
}

.ri-captcha__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--ri-fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ri-muted);
}

.ri-captcha__label svg { width: 15px; height: 15px; color: var(--ri-blue-600); }

/* The control emits a table; neutralise its default spacing. */
.ri-captcha table { border-collapse: collapse; }
.ri-captcha table td { padding: 0; vertical-align: middle; }

.ri-captcha img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--ri-r-xs);
  border: 1px solid var(--ri-border);
  background: #fff;
}

/* The refresh ImageButton. */
.ri-captcha input[type="image"] {
  width: 34px;
  height: 34px;
  margin-left: 0.6rem;
  padding: 7px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--ri-border);
  transition: transform var(--ri-dur) var(--ri-ease), border-color var(--ri-dur) var(--ri-ease);
}

.ri-captcha input[type="image"]:hover {
  transform: rotate(90deg);
  border-color: var(--ri-blue-300);
}

/* The typed-answer field plus its inline messages. */
.ri-captcha .input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ri-captcha .input-group > input[type="text"] {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: var(--ri-fs-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ri-ink);
  background: #fff;
  border: 1.5px solid var(--ri-border);
  border-radius: var(--ri-r-sm);
  transition: border-color var(--ri-dur) var(--ri-ease), box-shadow var(--ri-dur) var(--ri-ease);
}

.ri-captcha .input-group > input[type="text"]::placeholder {
  letter-spacing: normal;
  text-transform: none;
  color: #9aa8ba;
}

.ri-captcha .input-group > input[type="text"]:focus {
  outline: none;
  border-color: var(--ri-blue-600);
  box-shadow: 0 0 0 4px rgba(15, 127, 208, 0.12);
}

/* Inline validation text emitted by the existing markup. */
.ri-captcha #wrong,
.ri-captcha #done {
  margin: 0 !important;
  font-size: var(--ri-fs-xs);
  font-weight: 600;
  line-height: 1.4;
}

.ri-captcha__hint {
  font-size: var(--ri-fs-xs);
  color: var(--ri-muted);
}

/* ---- ASP.NET control skins ----------------------------------------------
   Applied through CssClass / class attributes only. */
.ri-input-server {
  width: 100%;
  padding: 0.9rem 1.1rem;
  font-size: var(--ri-fs-sm);
  color: var(--ri-ink);
  background: #fff;
  border: 1.5px solid var(--ri-border);
  border-radius: var(--ri-r-sm);
  transition: border-color var(--ri-dur) var(--ri-ease), box-shadow var(--ri-dur) var(--ri-ease);
}

.ri-input-server::placeholder { color: #9aa8ba; }

.ri-input-server:focus {
  outline: none;
  border-color: var(--ri-blue-600);
  box-shadow: 0 0 0 4px rgba(15, 127, 208, 0.12);
}

/* asp:Button renders <input type="submit">, so the .ri-btn sweep pseudo
   element cannot be used — this is a flat equivalent. */
.ri-btn-server {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: var(--ri-font-body);
  font-size: var(--ri-fs-sm);
  font-weight: 700;
  color: #fff;
  background: var(--ri-red-600);
  border: 0;
  border-radius: var(--ri-r-pill);
  cursor: pointer;
  box-shadow: var(--ri-shadow-accent);
  transition:
    background-color var(--ri-dur) var(--ri-ease),
    transform var(--ri-dur) var(--ri-ease),
    box-shadow var(--ri-dur) var(--ri-ease);
}

.ri-btn-server:hover {
  background: var(--ri-blue-700);
  transform: translateY(-2px);
  box-shadow: var(--ri-shadow-brand);
}

.ri-btn-server:active { transform: translateY(0); }

/* asp:Label used for server-side messages. The control emits inline
   ForeColor styling, so the colour here needs to win. */
.ri-alert-server {
  display: block;
  padding: 0.9rem 1.1rem;
  margin-bottom: var(--ri-space-4);
  font-size: var(--ri-fs-sm) !important;
  font-weight: 600;
  border-radius: var(--ri-r-sm);
  background: var(--ri-red-100);
  border: 1px solid #ffd0d2;
  color: var(--ri-red-800) !important;
}

/* Success variant, e.g. "Password has been sent to your registered mobile". */
.ri-alert-server--ok {
  background: #e7f7ec;
  border-color: #bfe6ca;
  color: #14663a !important;
}

/* ==========================================================================
   Register — account type chooser
   ========================================================================== */

.ri-choose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
  max-width: 940px;
  margin-inline: auto;
}

@media (max-width: 767px) {
  .ri-choose { grid-template-columns: 1fr; }
}

.ri-choose__card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--ri-space-4);
  padding: clamp(1.75rem, 1rem + 2vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--ri-border);
  border-radius: var(--ri-r-lg);
  overflow: hidden;
  transition:
    transform var(--ri-dur) var(--ri-ease),
    box-shadow var(--ri-dur) var(--ri-ease),
    border-color var(--ri-dur) var(--ri-ease);
}

.ri-choose__card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 3px;
  width: 100%;
  background: var(--ri-grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ri-dur-slow) var(--ri-ease-out);
}

.ri-choose__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ri-shadow-lg);
  border-color: transparent;
}

.ri-choose__card:hover::after { transform: scaleX(1); }
.ri-choose__card:hover .ri-icon-tile {
  background: var(--ri-blue-700);
  color: #fff;
  border-color: transparent;
  transform: rotate(-6deg) scale(1.06);
}

.ri-choose__num {
  position: absolute;
  top: 0.5rem;
  right: 1.25rem;
  z-index: -1;
  font-family: var(--ri-font-display);
  font-style: italic;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--ri-ink);
  opacity: 0.05;
  pointer-events: none;
}

.ri-choose__title { margin: 0; }

.ri-choose__body {
  margin: 0;
  font-size: var(--ri-fs-sm);
  color: var(--ri-text-soft);
}

.ri-choose__card .ri-btn { margin-top: auto; align-self: flex-start; }
