/*
 * Log in or sign up (templates/basic/auth/otp.blade.php). Same tokens, font and
 * Lucide icons as the rest of the site; fields, focus and buttons come from
 * nb-polish.css (48px phones / 44px desktop, 16px text, one radius, autofill fix).
 *
 *  Phones   full width, logo at the top, the form in the top third (the keyboard
 *           pushes up from below - nothing is vertically centred)
 *  Desktop  centred 420px card; from 1100px a brand panel on the right with the
 *           PassOut ticket drawn in CSS (nb-ticket.css motif)
 */
.nb .auth2 { min-height: calc(100vh - 1px); display: grid; grid-template-columns: minmax(0, 1fr); }
.nb .auth2__main { display: flex; flex-direction: column; align-items: center; padding: 20px 16px 32px; }
.nb .auth2__main > .brand { align-self: flex-start; min-height: 44px; margin-bottom: 8vh; }
.nb .auth2__card { width: 100%; max-width: 420px; }
.nb .auth2__step h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.nb .auth2__sub { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.nb .auth2__num { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb .auth2__sub .text-link { margin-left: 4px; }
.nb .auth2__cta { margin-top: 16px; }
.nb .auth2__legal { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--mut); }
.nb .auth2__legal .inline-link { font-weight: 500; }
.nb .auth2__resend { display: flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 12px; font-size: 14px; color: var(--mut); }
.nb .auth2__resend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.nb .auth2__resend form { margin: 0; }
.nb .auth2__alt { display: grid; gap: 4px; justify-items: center; width: 100%; max-width: 420px; margin-top: 28px; text-align: center; }
.nb .auth2__alt .text-link { min-height: 44px; font-size: 14px; }
.nb .auth2 .divider { margin-top: 20px; }

/* Step change: 200ms slide/fade (none with reduced motion). */
.nb .auth2__step.is-entering { animation: auth2-in .2s ease-out both; }
.nb .auth2__step.is-entering.from-left { animation-name: auth2-in-left; }
@keyframes auth2-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes auth2-in-left { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ 6 code boxes
   One real input (paste, one-time-code autofill, WebOTP, screen readers) laid over
   six boxes that mirror its digits. */
.nb .otp-boxes { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.nb .otp-boxes__box {
  display: grid; place-items: center; height: 56px; border: 1px solid var(--line); border-radius: var(--r-field, var(--r));
  background: var(--surface); font: 400 var(--fm-code)/1 var(--fm); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.nb .otp-boxes__input {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; padding: 0 !important; margin: 0;
  border: 0 !important; background: transparent !important; color: transparent !important; caret-color: transparent;
  font-size: 16px !important; letter-spacing: 2em; opacity: 0.01; z-index: 2; outline: 0 !important; box-shadow: none !important;
}
.nb .otp-boxes__input:-webkit-autofill { -webkit-text-fill-color: transparent; }
.nb .otp-boxes__box.is-active { border-color: var(--ring-c, var(--acc-d)); box-shadow: 0 0 0 1px var(--ring-c, var(--acc-d)); }
.nb .otp-boxes__box.is-active:empty::after { content: ""; width: 2px; height: 26px; background: var(--ink); animation: otp-caret 1s steps(1) infinite; }
@keyframes otp-caret { 50% { opacity: 0; } }
.nb .otp-boxes.is-error .otp-boxes__box { border-color: var(--err); background: var(--err-w); }
.nb .otp-boxes.is-shake { animation: otp-shake .36s ease-in-out; }
@keyframes otp-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.nb .otp-boxes.is-busy .otp-boxes__box { opacity: .6; }
@media (max-width: 359px) { .nb .otp-boxes { gap: 6px; } .nb .otp-boxes__box { height: 50px; font-size: 21px; } }

/* ------------------------------------------------------------------ desktop */
@media (min-width: 769px) {
  .nb .auth2__main { justify-content: flex-start; padding: 28px 24px 48px; }
  .nb .auth2__main > .brand { align-self: center; margin-bottom: 32px; }
  .nb .auth2__card { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--s1); }
  .nb .auth2__main { padding-top: 8vh; }
}
@media (min-width: 1100px) {
  .nb .auth2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nb .auth2__main > .brand { align-self: center; }
}

/* ------------------------------------------------------------------ brand panel (wide screens) */
.nb .auth2__art { display: none; }
@media (min-width: 1100px) {
  .nb .auth2__art { display: grid; place-items: center; padding: 48px; background: var(--acc-w); border-left: 1px solid var(--acc-b); overflow: hidden; }
  .nb .auth2__art-in { width: min(360px, 100%); }
  .nb .auth2__ticket { --pass-ground: var(--acc-w); transform: rotate(-4deg); box-shadow: var(--s3); }
  .nb .auth2__ticket-poster {
    position: relative; aspect-ratio: 16 / 10; border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0;
    background:
      radial-gradient(circle at 82% 22%, var(--acc) 0 18%, transparent 18.5%),
      radial-gradient(70% 80% at 15% 100%, color-mix(in srgb, var(--acc) 35%, transparent), transparent 70%),
      linear-gradient(160deg, var(--ink), color-mix(in srgb, var(--ink) 85%, var(--acc)));
  }
  .nb .auth2__ticket-stub { display: flex; align-items: center; gap: 12px; padding: 4px 16px 12px; }
  .nb .auth2__ticket-stub strong { display: block; font-size: 16px; letter-spacing: -.02em; }
  .nb .auth2__ticket-stub small { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--mut); font-size: 13px; }
  .nb .auth2__ticket-qr { margin-left: auto; color: var(--ink-2); }
  .nb .auth2__ticket .pass-barcode { margin: 0 16px 16px; }
  .nb .auth2__ticket .pass-stamp { top: 34%; right: -6px; transform: rotate(14deg); }
  .nb .auth2__tagline { margin: 36px 0 0; font-size: 26px; font-weight: 600; line-height: 1.25; letter-spacing: -.03em; color: var(--ink); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .nb .auth2__step.is-entering, .nb .otp-boxes.is-shake { animation: none; }
  .nb .otp-boxes__box.is-active:empty::after { animation: none; }
  .nb .auth2__ticket { transform: none; }
}

/* ------------------------------------------------------------------ "Mobile number or email" (one field)
   The same box in both modes; mobile mode only adds the +91 chip on the left. */
.nb .id-in { display: flex; align-items: stretch; height: var(--h-field); border: 1px solid var(--line); border-radius: var(--r-field, var(--r)); background: var(--surface); overflow: hidden; }
.nb .id-in__chip { display: none; align-items: center; flex: none; padding: 0 12px; border-right: 1px solid var(--line); background: var(--line-2); color: var(--ink-2); font: 600 16px/1 var(--ff); font-variant-numeric: tabular-nums; }
.nb .id-in.is-mobile .id-in__chip { display: inline-flex; }
.nb .field .id-in input { flex: 1; min-width: 0; height: 100% !important; border: 0 !important; border-radius: 0 !important; background: transparent; box-shadow: none; }
.nb .id-in:focus-within { outline: 2px solid var(--ring-c, var(--acc-d)); outline-offset: -1px; border-color: var(--ring-c, var(--acc-d)); }
.nb .field .id-in input:focus-visible { outline: 0 !important; }
.nb .field:has(.hint.t-err:not(:empty)) .id-in { border-color: var(--err); }

/* ------------------------------------------------------------------ password login screens */
.nb .auth2__card > h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.nb .auth2__h2 { margin: 8px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.nb .auth2__label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.nb .auth2__label-row label { margin: 0 !important; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); letter-spacing: 0; text-transform: none; }
.nb .auth2__label-row .text-link { font-size: 14px; font-weight: 500; }
.nb .auth2__card .field + .field { margin-top: 16px; }
.nb .auth2__switch { margin: 16px 0 0; font-size: 15px; color: var(--ink-2); text-align: center; }
.nb .auth2__support { display: grid; gap: 12px; }
.nb .auth2__support p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.nb .auth2__support-actions { display: grid; gap: 10px; }
.nb .pw-strength[data-tone="weak"] { color: var(--err); }
.nb .pw-strength[data-tone="ok"] { color: var(--warn); }
.nb .pw-strength[data-tone="strong"] { color: var(--ok); }

/* ================================================================== ticket design (PassOut-login-B-ticket)
   .auth2--ticket: every page in auth/* + staff/login. A black page with the logo, the form
   as a ticket (x-nb.auth-ticket: orange "ADMIT ONE" stub, dashed tear line with notches,
   cream body, barcode), then light links on the black and the dev quick-login box. The
   black site footer follows straight on. Field / button rules carry #main to beat the
   base .field input:not(...) chain in nb-polish.css. Orange TEXT on black uses --acc-ink (contrast-gate);
   on the orange stub the text is --ink. */
.nb .auth2--ticket {
  --at-black: #141414; --at-line: #E4DCD5; --at-mut: #5C4A40; --at-link: #A63B20; --at-ph: #9A8F87; --at-light: #D8CEC6;
  display: block; min-height: 0; background: var(--at-black); color: var(--cream);
}
.nb .auth2--ticket .auth2__main { justify-content: center; gap: 28px; min-height: calc(100vh - var(--hdr-h, 0px)); padding: 40px 20px 56px; }
.nb .auth2--ticket .auth2__main > .brand { align-self: center; margin: 0; color: #fff; --wm-o: var(--acc); }
.nb .auth2--ticket .auth2__main > .brand svg { height: 46px; width: auto; }
.nb .auth2--ticket .auth2__art { display: none; }

.nb .aticket { position: relative; width: 100%; max-width: 460px; color: var(--ink); }
.nb .aticket__stub { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px 28px 24px; border-radius: 22px 22px 0 0; background: var(--acc); color: var(--ink); }
.nb .aticket__admit { margin: 0; font-family: var(--fd); font-weight: 900; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.nb .aticket__stub h1 { margin: 6px 0 0; font-family: var(--fd); font-weight: 900; font-size: 46px; line-height: .95; letter-spacing: -.035em; color: var(--ink); }
.nb .aticket__no { flex: none; margin: 0; font-family: var(--fm); font-size: 12px; line-height: 1.5; letter-spacing: .12em; text-align: right; }
.nb .aticket__main { position: relative; padding: 30px 28px 26px; border-top: 2px dashed var(--rust); border-radius: 0 0 22px 22px; background: var(--cream); }
.nb .aticket__main::before, .nb .aticket__main::after { content: ""; position: absolute; top: -15px; width: 28px; height: 28px; border-radius: 50%; background: var(--at-black); }
.nb .aticket__main::before { left: -14px; }
.nb .aticket__main::after { right: -14px; }
.nb .aticket__barcode { height: 34px; margin-top: 22px; border-radius: 2px; opacity: .85;
  background: repeating-linear-gradient(90deg, var(--at-black) 0 2px, transparent 2px 5px, var(--at-black) 5px 6px, transparent 6px 9px, var(--at-black) 9px 12px, transparent 12px 14px); }

/* body text + links on cream */
.nb #main .aticket .auth2__sub, .nb #main .aticket .auth2__support p { color: var(--at-mut); }
.nb #main .aticket .auth2__sub { margin-bottom: 22px; }
.nb #main .aticket .text-link, .nb #main .aticket .inline-link { color: var(--at-link); font-weight: 700; }
.nb #main .aticket .text-link:hover, .nb #main .aticket .inline-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nb #main .aticket .field + .field { margin-top: 18px; }
.nb #main .aticket .field label, .nb #main .aticket .auth2__label-row label { font-size: 14px; font-weight: 700; color: var(--ink); }
.nb #main .aticket .auth2__label-row { margin-bottom: 8px; }
.nb #main .aticket .auth2__label-row .text-link { min-height: 0; font-weight: 700; }
.nb #main .aticket .auth2__legal, .nb #main .aticket .auth2__resend, .nb #main .aticket .auth2__switch { color: var(--at-mut); }

/* fields: 56px white boxes, ink border + soft orange ring on focus */
.nb #main .aticket .field > input, .nb #main .aticket .field .pw-wrap input, .nb #main .aticket .id-in, .nb #main .aticket .phone-in {
  height: 56px; border: 1.5px solid var(--at-line); border-radius: 14px; background-color: #fff; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.nb #main .aticket .field > input, .nb #main .aticket .field .pw-wrap input { padding: 0 16px; }
.nb #main .aticket .field input::placeholder { color: var(--at-ph); }
.nb #main .aticket .field > input:focus, .nb #main .aticket .field .pw-wrap input:focus,
.nb #main .aticket .id-in:focus-within, .nb #main .aticket .phone-in:focus-within {
  outline: 0 !important; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 20%, transparent);
}
.nb #main .aticket .id-in input, .nb #main .aticket .phone-in input { height: 100% !important; padding: 0 14px; box-shadow: none !important; }
.nb #main .aticket .id-in__chip, .nb #main .aticket .phone-in__prefix { padding: 0 0 0 14px; border: 0; background: transparent; color: var(--ink); }
.nb #main .aticket .pw-toggle { width: 48px; height: 48px; right: 4px; color: var(--ink); border-radius: 10px; }
/* lead icons (Lucide smartphone / lock, stroke 1.75) */
.nb #main .aticket .id-in, .nb #main .aticket .phone-in, .nb #main .aticket .field .pw-wrap input {
  background-repeat: no-repeat; background-position: 16px center; background-size: 20px;
}
.nb #main .aticket .id-in, .nb #main .aticket .phone-in { padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C7F76' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='20' x='5' y='2' rx='2' ry='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E"); }
.nb #main .aticket .field .pw-wrap input { padding-left: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C7F76' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.nb #main .aticket .field:has(.hint.t-err:not(:empty)) > input, .nb #main .aticket .field:has(.hint.t-err:not(:empty)) .pw-wrap input,
.nb #main .aticket .field:has(.hint.t-err:not(:empty)) .id-in { border-color: var(--err) !important; }
.nb #main .aticket .otp-boxes__box { height: 56px; border: 1.5px solid var(--at-line); border-radius: 14px; background: #fff; }

/* main button: black pill, cream label, orange arrow */
.nb #main .aticket .btn.b-pri { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; margin-top: 24px; border: 0; border-radius: 999px;
  background: var(--at-black); color: var(--cream); font-size: 17px; font-weight: 700; }
.nb #main .aticket .btn.b-pri:hover { background: #2A2624; color: var(--cream); }
.nb #main .aticket .btn.b-pri .icon, .nb #main .aticket .btn.b-pri svg { color: var(--acc); }
.nb #main .aticket .btn.b-sec { border-radius: 999px; background: #fff; }
.nb #main .aticket .divider span { background: var(--cream); }
.nb .auth2--ticket a:focus-visible, .nb .auth2--ticket button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* under the ticket, on black */
.nb .auth2__below { display: flex; flex-direction: column; gap: 12px; max-width: 460px; text-align: center; font-size: 15px; color: var(--at-light); }
.nb .auth2__below a, .nb .auth2--ticket .auth2__alt .text-link { color: var(--acc-ink); font-weight: 700; text-decoration: none; }
.nb .auth2__below a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nb .auth2__below-legal { font-size: 12px; color: var(--at-ph); }
.nb .auth2__below-legal a { color: var(--at-light) !important; font-weight: 500 !important; }
.nb .auth2--ticket .auth2__alt { margin-top: 0; }
.nb .auth2--ticket .auth2__alt .hint { color: var(--at-light); }

/* dev quick-login (APP_ENV=local only) */

/* the site footer follows straight on: no light gap, notches in the same black */
.nb main:has(.auth2--ticket) footer.pof, .nb .auth2--ticket ~ footer.pof { --bg: var(--at-black, #141414); margin-top: 0; border-top: 1px solid #2E2A28; }

@media (max-width: 520px) {
  .nb .auth2--ticket .auth2__main { justify-content: flex-start; gap: 22px; padding: 24px 16px 40px; }
  .nb .auth2--ticket .auth2__main > .brand svg { height: 38px; }
  .nb .aticket__stub { padding: 18px 20px 20px; }
  .nb .aticket__stub h1 { font-size: 38px; }
  .nb .aticket__main { padding: 26px 20px 22px; }
}
/* "Become an organiser": what was filled in from the buyer account */
.nb .auth2__note { margin: -8px 0 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* "Log in with a code instead" under the buyer log-in form (new class only) */
.nb .auth2__alt-line { margin: 12px 0 0; text-align: center; font-size: 14px; }

/* "Log in with a code instead": keep clear of the Log in button on phones.
   nb-mobile.css gives in-sentence links a -10px margin for a bigger tap area,
   which cancelled the 12px gap and made the link touch the button. */
.nb .auth2__alt-line { margin: 20px 0 0; text-align: center; }
.nb .auth2__alt-line .text-link { margin: 0; padding: 10px 4px; min-height: 44px; justify-content: center; }
