/* ============================================================
   MCCF — mccf-auth.css | login.html + register.html + delete-account.html
   Load AFTER mccf.css (it consumes the token layer defined there).
   ============================================================
   Kept out of mccf.css so the content pages don't download rules they
   never use. Colours come from the shared tokens, so the AA-compliant
   values are inherited rather than re-derived here.
   ============================================================ */

.auth-section {
  background: var(--soft-mint);
  padding: 3.5rem 0 5rem;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2.5rem;
  box-shadow: var(--sh-md);
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .35rem;
}

.auth-sub {
  font-size: .9rem;
  color: var(--text-mid);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

/* ===================================================
   ROLE TABS (login)
   =================================================== */
.auth-tabs {
  display: flex;
  gap: .4rem;
  background: var(--soft-mint);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .3rem;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  border: none;
  background: none;
  border-radius: 50px;
  padding: .55rem .5rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
  transition: var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

.auth-tab.active {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--sh-sm);
}

/* ===================================================
   INLINE MESSAGE REGION
   Each variant pairs a colour with an icon and states the problem in words,
   so meaning never rests on colour alone (WCAG 1.4.1).
   =================================================== */
.auth-msg {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  border-radius: var(--r-sm);
  padding: .8rem 1rem;
  font-size: .85rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}

.auth-msg i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: .95rem;
}

.auth-msg.is-error {
  background: var(--orange-soft);
  border-color: rgba(196, 61, 24, .28);
  color: #8F2A0D;
  /* 7.1:1 on --orange-soft */
}

.auth-msg.is-success {
  background: var(--green-soft);
  border-color: rgba(27, 122, 66, .28);
  color: #14572F;
  /* 8.3:1 on --green-soft */
}

.auth-msg.is-info {
  background: var(--mint);
  border-color: rgba(20, 84, 70, .2);
  color: var(--navy);
}

.auth-msg a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* ===================================================
   FIELDS
   =================================================== */
.auth-card .form-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .35rem;
}

.auth-card .form-check-label {
  font-size: .82rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.55;
}

.auth-card .form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: .8rem 1rem;
  font-size: .95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-card .form-control:focus {
  border-color: var(--orange-fill);
  box-shadow: 0 0 0 3px rgba(196, 61, 24, .12);
}

.form-help {
  font-size: .78rem;
  color: var(--text-mid);
  margin-top: .4rem;
  line-height: 1.5;
}

/* +91 is fixed, not editable — the backend accepts Indian numbers only,
   so offering a country selector would only invite a 422. */
.phone-field {
  display: flex;
  align-items: stretch;
}

.phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 .85rem;
  background: var(--soft-mint);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
}

.phone-field .form-control {
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  letter-spacing: .5px;
}

.otp-input {
  text-align: center;
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: .5em;
  text-indent: .5em;
  font-variant-numeric: tabular-nums;
}

.pass-field {
  position: relative;
}

.pass-field .form-control {
  padding-right: 3rem;
}

.pass-toggle {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--text-mid);
  padding: .5rem .6rem;
  cursor: pointer;
  border-radius: var(--r-sm);
}

.pass-toggle:hover {
  color: var(--navy);
}

/* ===================================================
   BUTTONS / LINKS
   =================================================== */
.btn-back {
  border: none;
  background: none;
  color: var(--text-mid);
  font-size: .82rem;
  font-weight: 600;
  padding: 0;
  margin-bottom: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.btn-back:hover {
  color: var(--orange-text);
}

.btn-link-plain {
  border: none;
  background: none;
  color: var(--orange-text);
  font-size: .85rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.btn-link-plain:hover:not(:disabled) {
  color: var(--orange-hover);
  text-decoration: underline;
}

.btn-link-plain:disabled {
  color: var(--text-mid);
  cursor: default;
}

.link-strong {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-sent-to {
  font-size: .875rem;
  color: var(--text-mid);
  margin-bottom: 1.25rem;
}

.auth-sent-to strong {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.auth-divider {
  border-color: var(--border);
  margin: 1.75rem 0 1.25rem;
}

.auth-alt {
  font-size: .875rem;
  color: var(--text-mid);
}

.auth-legal {
  font-size: .78rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-top: 1.25rem;
  text-align: center;
}

.auth-legal i {
  color: var(--green);
}

/* ===================================================
   TRUST / HELP COLUMN
   =================================================== */
.auth-aside {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2rem;
  box-shadow: var(--sh-sm);
}

.auth-aside-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .6rem;
}

.auth-aside-text {
  font-size: .85rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.auth-aside-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.auth-aside-list li {
  font-size: .85rem;
  color: var(--text-dark);
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin-bottom: .6rem;
  line-height: 1.55;
}

.auth-aside-list i {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 3px;
}

.auth-aside-rule {
  border-color: var(--border);
  margin: 1.5rem 0;
}

/* ===================================================
   DELETE ACCOUNT (delete-account.html)
   A permanent, irreversible action gets its own visual register — not the
   brand orange used for ordinary CTAs, so "Send code" and "Permanently
   delete" never look like the same weight of decision.
   =================================================== */
.danger-box {
  background: var(--orange-soft);
  border: 1px solid rgba(196, 61, 24, .28);
  border-radius: var(--r-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}

.danger-box-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  color: #8F2A0D;
  font-size: .88rem;
  margin-bottom: .5rem;
}

.danger-box ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .83rem;
  color: var(--text-dark);
  line-height: 1.7;
}

.retain-box {
  background: var(--soft-mint);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: .83rem;
  color: var(--text-mid);
  line-height: 1.65;
}

.retain-box strong {
  color: var(--navy);
}

.confirm-type-label {
  font-size: .82rem;
  color: var(--text-mid);
  margin-bottom: .5rem;
  line-height: 1.55;
}

.confirm-type-label code {
  background: var(--soft-mint);
  color: var(--navy);
  padding: .1rem .4rem;
  border-radius: 4px;
  font-weight: 700;
}

.btn-mccf-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  border: none;
  border-radius: var(--r-sm);
  background: #B3261E;
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  padding: .85rem 1.25rem;
  cursor: pointer;
  transition: var(--ease);
}

.btn-mccf-danger:hover:not(:disabled) {
  background: #8F1D17;
}

.btn-mccf-danger:disabled {
  background: var(--text-light);
  cursor: not-allowed;
}

.delete-success {
  text-align: center;
  padding: 1rem 0 .5rem;
}

.delete-success i {
  font-size: 2.75rem;
  color: var(--green);
  margin-bottom: 1rem;
  display: block;
}

.auth-aside-cta {
  margin-bottom: .5rem;
}

.auth-aside-note {
  font-size: .78rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.auth-aside-note strong {
  color: var(--navy);
}

/* ===================================================
   REGISTRATION STEPPER
   =================================================== */
.reg-steps {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  padding: 0;
  margin: 0 0 1.75rem;
}

.reg-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  position: relative;
}

.reg-step::after {
  content: '';
  position: absolute;
  top: 13px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  background: var(--border);
}

.reg-step:last-child::after {
  display: none;
}

.reg-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--soft-mint);
  border: 2px solid var(--border);
  color: var(--text-mid);
  font-size: .78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.reg-step-lbl {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-mid);
  text-align: center;
}

.reg-step.active .reg-step-num {
  background: var(--orange-fill);
  border-color: var(--orange-fill);
  color: #fff;
}

.reg-step.active .reg-step-lbl {
  color: var(--navy);
  font-weight: 700;
}

/* Completed steps show a tick as well as changing colour, so progress is not
   communicated by hue alone. */
.reg-step.done .reg-step-num {
  background: var(--green);
  border-color: var(--green);
  color: transparent;
}

.reg-step.done .reg-step-num::before {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .9rem;
}

.reg-step.done .reg-step-lbl {
  color: var(--green);
}

/* ===================================================
   PRESCRIPTION UPLOAD
   =================================================== */
.rx-callout {
  display: flex;
  gap: .7rem;
  background: var(--mint);
  border: 1px solid rgba(20, 84, 70, .18);
  border-radius: var(--r-sm);
  padding: .9rem 1rem;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.rx-callout i {
  flex-shrink: 0;
  margin-top: 2px;
}

.rx-drop {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  background: var(--soft-mint);
  transition: var(--ease);
}

.rx-drop:hover,
.rx-drop.is-dragging {
  border-color: var(--orange-fill);
  background: var(--orange-soft);
}

.rx-drop.has-file {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-soft);
}

/* The input covers the whole box so the entire area is clickable, while
   staying a real focusable <input type="file"> for keyboard and screen-reader
   users. opacity:0 (not display:none) keeps it in the accessibility tree. */
.rx-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.rx-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 2rem 1rem;
  pointer-events: none;
  text-align: center;
}

.rx-drop-inner i {
  font-size: 1.8rem;
  color: var(--orange-fill);
  margin-bottom: .3rem;
}

.rx-drop-main {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
}

.rx-drop-sub {
  font-size: .78rem;
  color: var(--text-mid);
}

/* The visually hidden input can't show its own ring, so mirror focus onto
   the visible box. */
.rx-input:focus-visible {
  outline: none;
}

.rx-input:focus-visible+.rx-drop-inner {
  outline: 3px solid var(--orange-fill);
  outline-offset: -4px;
  border-radius: var(--r-md);
}

.rx-chosen {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: var(--green-soft);
  border: 1px solid rgba(27, 122, 66, .25);
  border-radius: var(--r-sm);
  padding: .65rem .85rem;
  margin-top: .75rem;
  font-size: .82rem;
  color: var(--navy);
  word-break: break-word;
}

.rx-chosen i {
  color: var(--green);
  flex-shrink: 0;
}

.rx-clear {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--text-mid);
  cursor: pointer;
  padding: .2rem .35rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.rx-clear:hover {
  color: var(--orange-text);
}

.rx-privacy {
  display: flex;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin: 1.25rem 0 1.5rem;
}

.rx-privacy i {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===================================================
   DONE STATE
   =================================================== */
.reg-done-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.reg-done-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  margin-bottom: .85rem;
}

.reg-done-text {
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.7;
  text-align: center;
  margin-bottom: .85rem;
}

.reg-done-text strong {
  color: var(--navy);
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 575.98px) {

  .auth-section {
    padding: 2rem 0 3rem;
  }

  .auth-card,
  .auth-aside {
    padding: 1.5rem 1.25rem;
  }

  .auth-title {
    font-size: 1.4rem;
  }

  .otp-input {
    font-size: 1.25rem !important;
    letter-spacing: .35em;
    text-indent: .35em;
  }

  .reg-step-lbl {
    font-size: .65rem;
  }

  .auth-tab {
    font-size: .75rem;
  }

  .reg-step::after {
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
  }
}
