html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* -------------------------------------------------------------------------------------------
   NTA / SWAYAM portal chrome (plan §9.0, §13). Bootstrap 5 carries the components; these classes
   re-skin the government-portal shell — blue banner, step strip, form panels, status ledger.
   ------------------------------------------------------------------------------------------- */
:root {
  --nta-blue: #2b5aa0;
  --nta-blue-dark: #1d3c6a;
  --nta-gold: #e2a500;
  --nta-border: #b9c6da;
  --nta-panel: #eef3fb;
  --nta-ink: #1a2b45;
}

.nta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  background: var(--nta-blue-dark);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 16px;
}

.strip-cell.strong { font-weight: 600; }

.nta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fdfdfd 0%, #f4f7fc 100%);
  border-bottom: 3px solid var(--nta-blue);
}

.brand {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--nta-blue);
}

.brand-sub { font-size: 0.68rem; color: #5a6a85; }

/* UI-1 — the header brand and the IGNOU logo link to the site root; the anchors must be invisible:
   inherit the surrounding colour, never underline, and lay out exactly like the blocks they wrap. */
.banner-link,
.banner-link:hover,
.banner-link:focus {
  color: inherit;
  text-decoration: none;
}

.banner-link { display: block; }

.banner-center { text-align: center; }

.banner-center .cycle { font-size: 1.06rem; font-weight: 700; color: var(--nta-ink); }
.banner-center .cycle-label { font-size: 0.86rem; color: #48566c; }

.banner-right .agency { text-align: right; font-size: 0.76rem; color: #5a6a85; }

.nta-main { padding: 14px 16px 32px; max-width: 1200px; margin: 0 auto; }

.nta-footer {
  border-top: 2px solid var(--nta-blue);
  background: #f4f7fc;
  padding: 10px 16px 14px;
  color: #5a6a85;
  font-size: 0.78rem;
  text-align: center;
}

/* Three-step progress bar (Instructions / Register / review — §9.1, §9.2). */
.stepbar {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.stepbar li {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--nta-border);
  background: #fafbfd;
  font-size: 0.82rem;
  color: #48566c;
}

.stepbar li.active {
  background: var(--nta-blue);
  border-color: var(--nta-blue);
  color: #fff;
  font-weight: 600;
}

.stepbar li.done { background: #e5f0e3; color: #245626; font-weight: 600; }

/* Form panels — one bordered card per A–G section, header bar in the panel tint. */
.panel {
  border: 1px solid var(--nta-border);
  border-radius: 4px;
  margin-bottom: 16px;
  background: #fff;
}

.panel > .panel-head {
  padding: 7px 12px;
  background: var(--nta-panel);
  border-bottom: 1px solid var(--nta-border);
  font-weight: 600;
  color: var(--nta-blue-dark);
  font-size: 0.95rem;
}

.panel > .panel-head .panel-note { float: right; font-weight: 400; font-size: 0.74rem; color: #6b7a94; }
.panel > .panel-head[data-bs-toggle="collapse"] { cursor: pointer; }

.panel > .panel-body { padding: 12px; }

.helpline { background: var(--nta-blue-dark); color: #fff; font-size: 0.8rem; padding: 4px 12px; }

/* Red-bold warnings as the bulletin uses (§9.1). */
.red-bold { color: #b3202a; font-weight: 700; }
.req { color: #b3202a; font-weight: 700; }

.form-label-sm { font-size: 0.82rem; color: var(--nta-ink); margin-bottom: 2px; }

.confirm-cell { background: #fbfcfe; }

/* Action row of the forms — SAVE / SUBMIT family. */
.action-row {
  border: 1px solid var(--nta-border);
  background: var(--nta-panel);
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* §9.1 declaration bar — the consent line sits inside the same shaded bar as the Proceed button,
   as the reference screen shows. Stacking the bar (column) makes the label a full-width block-level
   flow item, so the single long sentence wraps at the bar's width instead of overflowing the panel
   edge; min-width: 0 keeps that true if the bar ever becomes a flex row again. */
.action-row.declaration-bar {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
}

.declaration-bar .form-check {
  margin-bottom: 0;
  min-width: 0;
}

.declaration-bar .declaration-actions {
  display: flex;
  justify-content: flex-end;
}

/* Landing hero + four-step strip (§9.0). */
.nta-hero {
  border: 1px solid var(--nta-border);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--nta-blue-dark) 0%, var(--nta-blue) 100%);
  color: #fff;
  padding: 26px 22px;
}

.nta-hero h1 { font-size: 1.5rem; font-weight: 700; }
.nta-hero p { margin: 0; color: #dfe8f6; font-size: 0.9rem; }

.stepline { display: flex; flex-wrap: wrap; gap: 10px; }

.stepline .step-tile {
  flex: 1 1 150px;
  border: 1px solid var(--nta-border);
  border-radius: 4px;
  background: #fff;
  padding: 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--nta-ink);
}

.step-tile .step-no {
  display: inline-flex;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--nta-blue);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.landing-panels .card { border-color: var(--nta-border); }

/* Demo-video page — responsive players with the browser's native controls. */
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* The mobile take is portrait; keep it from stretching to the desktop column's width. */
.demo-video-mobile { max-width: 360px; }

/* Dashboard (§9.4) */
.dash-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 8px 12px; background: var(--nta-panel); border: 1px solid var(--nta-border); border-bottom: none; font-size: 0.9rem; }
.dash-nav .chip { color: #48566c; }
.status-done { color: #166316; font-weight: 700; }
.status-pending { color: #8a4a08; font-weight: 700; }
.verify-block { border: 1px solid var(--nta-border); background: #fff; padding: 10px 12px; }

/* OTP (§9.3) */
.otp-box {
  width: 2.6rem; height: 2.6rem;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0;
}

/* CAPTCHA frame (§9.2 G) */
.captcha-frame { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.captcha-frame img { border: 1px solid var(--nta-border); border-radius: 3px; }
.captcha-tools { display: flex; gap: 6px; }
.captcha-tools button { line-height: 1; }

/* Review grid (§9.3) */
.review-grid { width: 100%; font-size: 0.86rem; }
.review-grid th { width: 220px; background: var(--nta-panel); }
.review-grid th, .review-grid td { border: 1px solid var(--nta-border); padding: 5px 8px; vertical-align: top; }

/* Phones (< Bootstrap's sm): a 220 px label column leaves ~110 px for the value, so the grid outgrows
   .panel-body and every value is cut at the panel edge — the sideways strip reads as a broken page.
   Each pair becomes a stacked block instead: label on its own tinted line, value underneath, one
   bordered card per pair, so a long review still reads as a list. */
@media (max-width: 575.98px) {
    .review-grid, .review-grid tbody, .review-grid tr,
    .review-grid th, .review-grid td {
        display: block;
        width: auto;
    }

    .review-grid tr {
        border: 1px solid var(--nta-border);
        border-radius: 3px;
        margin-bottom: 8px;
        overflow: hidden;
    }

    .review-grid th, .review-grid td { border: 0; padding: 5px 10px; }

    /* The section dividers are the colspan rows — they stay a tinted bar. The per-field <th> is the
       label line, so it keeps the same tint but a smaller size to sit under the section title. */
    .review-grid th { background: var(--nta-panel); font-size: 0.8rem; }
    .review-grid th[colspan] { font-size: 0.86rem; font-weight: 700; }
    .review-grid td { padding-top: 6px; padding-bottom: 7px; overflow-wrap: anywhere; }

    /* A floated note cannot sit beside a long panel title on a phone — drop it to its own line. */
    .panel > .panel-head .panel-note { float: none; display: block; }

    /* Bootstrap's .btn is nowrap, so a long label ("Submit and send OTP to verify Mobile Number")
       pushes the row past the screen edge instead of shrinking. Let it wrap here. */
    .action-row .btn { white-space: normal; }
}

.warn-box { border: 1px solid #cdb26a; background: #fdf7e3; color: #6b5211; padding: 8px 12px; font-size: 0.84rem; border-radius: 3px; }

/* Validation summary (_FormAlerts.cshtml) — collapses when the ModelState is clean. */
.nta-alert { border: 1px solid #e0a1a5; background: #fdf0f1; color: #8f1a22; padding: 8px 12px; border-radius: 3px; font-size: 0.84rem; margin-bottom: 10px; }
.nta-alert ul { margin: 0; padding-inline-start: 18px; list-style: square; }
.nta-alert:empty { display: none; }

/* Review-note popup (§9.3 Review.cshtml) — fixed overlay, dismissed before the grid is used. */
.review-modal { position: fixed; inset: 0; background: rgba(15, 32, 60, .55); z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 20px; }
.review-modal-box { background: #fff; border: 1px solid var(--nta-border); border-top: 4px solid var(--nta-blue); border-radius: 4px; max-width: 560px; width: 100%; box-shadow: 0 10px 30px rgba(10, 30, 60, .35); }
.review-modal-head { padding: 10px 16px; background: var(--nta-panel); border-bottom: 1px solid var(--nta-border); font-weight: 600; color: var(--nta-blue-dark); }
.review-modal-body { padding: 14px 16px 6px; }
.review-modal-box > .btn { margin: 6px 16px 14px; }

/* §9.5 nine-step editor: sidebar + main-column layout */
.app-form-layout { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.step-sidebar { flex: 0 0 270px; max-width: 270px; border: 1px solid var(--nta-border); border-radius: 3px; background: var(--nta-panel); padding: 10px 8px; }
.app-form-main { flex: 1 1 560px; min-width: 0; }
.step-recap { padding: 4px 8px 10px; border-bottom: 1px solid var(--nta-border); margin-bottom: 8px; }
.step-recap-name { font-weight: 700; }
.step-nav { list-style: none; margin: 0; padding: 0; }
.step-nav-item { border-bottom: 1px solid var(--nta-border); }
.step-nav-item:last-child { border-bottom: none; }
.step-nav-item > a { display: flex; align-items: center; gap: 8px; padding: 7px 9px; text-decoration: none; color: var(--nta-blue-dark); font-size: 0.86rem; }
.step-nav-item > a:hover { background: rgba(30, 94, 158, .08); text-decoration: none; }
.step-nav-mark { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border: 1px solid var(--nta-border); border-radius: 50%; background: #fff; font-size: 0.76rem; color: #666; flex: 0 0 22px; }
.step-nav-item.done > a { color: #2c7a39; }
.step-nav-item.done .step-nav-mark { background: #e6f4e8; border-color: #2c7a39; color: #2c7a39; }
.step-nav-item.active { border-right: 4px solid var(--nta-blue); background: #eaf2fa; }
.step-nav-item.active > a { font-weight: 700; }
.section-title { font-size: 1.25rem; font-weight: 700; color: var(--nta-blue-dark); margin-bottom: 12px; }
.hi { color: #6d6d6d; font-weight: 600; }
.form-recap { margin: 0; font-size: 0.9rem; border-bottom: 1px dotted var(--nta-border); padding-bottom: 2px; }
.preference-row { border: 1px dashed var(--nta-border); border-radius: 3px; padding: 8px 10px 10px; margin-bottom: 6px; }

/* Document grid preview thumbnail (§9.5 ⑧) */
.doc-thumb { max-width: 120px; max-height: 90px; border: 1px solid var(--nta-border); border-radius: 3px; }

/* Searchable select (VAI-23)
   ------------------------------------------------------------------
   One generic combobox, opted into per <select> with data-searchable.
   The native <select> stays the actual form field: it is visually
   hidden but still focusable and submitted, so MVC binding, tag
   helpers, validation spans and asp-for all keep working.

   Markup is created by wwwroot/js/searchable-select.js. The panel is
   appended to <body> and positioned fixed, because an absolutely
   positioned panel inside the course table would be clipped by
   .table-responsive (overflow-x: auto computes overflow-y: auto too). */
.scombo-native {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    border: 0; clip: rect(0 0 0 0);
    overflow: hidden; white-space: nowrap;
}
.scombo-trigger {
    display: flex; align-items: center; gap: 6px;
    width: 100%;
    padding: 6px 10px;
    font-size: 0.95rem;
    background: #fff;
    border: 1px solid var(--nta-border);
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
}
.scombo-trigger::after {
    content: "▾";
    margin-left: auto;
    color: var(--nta-blue-dark);
    font-size: 0.85rem;
}
.scombo-trigger.is-open {
    border-color: var(--nta-blue);
    box-shadow: 0 0 0 2px rgba(30, 94, 158, .15);
}
.scombo-trigger.is-open::after { content: "▴"; }
.scombo-trigger-label {
    flex: 1 1 auto;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scombo-trigger-label.is-placeholder { color: #6d6d6d; }

/* Inline busy state while the page fetches this select's options (scombo:busy). The spinner sits
   where the chevron's left edge is, so the label does not shift when it appears. */
.scombo-trigger.is-loading { cursor: progress; }
.scombo-trigger.is-loading::before {
    content: "";
    flex: 0 0 auto;
    width: 12px; height: 12px;
    border: 2px solid var(--nta-border);
    border-top-color: var(--nta-blue);
    border-radius: 50%;
    animation: scombo-spin .7s linear infinite;
}
@keyframes scombo-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .scombo-trigger.is-loading::before { animation-duration: 2s; }
}

.scombo-panel {
    position: fixed;
    z-index: 1055;
    background: #fff;
    border: 1px solid var(--nta-blue);
    border-radius: 3px;
    box-shadow: 0 6px 18px rgba(10, 30, 60, .18);
    max-height: 260px;
    display: flex; flex-direction: column;
}
/* display:flex above would otherwise defeat the [hidden] attribute. */
.scombo-panel[hidden] { display: none; }
.scombo-panel .scombo-search {
    flex: 0 0 auto;
    border: 0; border-bottom: 1px solid var(--nta-border);
    border-radius: 0;
    padding: 6px 10px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    box-shadow: none;
}
.scombo-panel .scombo-list {
    list-style: none; margin: 0; padding: 0;
    overflow-y: auto;
    flex: 1 1 auto;
}
.scombo-panel .scombo-list-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #222;
}
.scombo-panel .scombo-list-item.is-hidden { display: none; }
.scombo-panel .scombo-list-item:hover,
.scombo-panel .scombo-list-item.is-active {
    background: var(--nta-blue);
    color: #fff;
}
.scombo-panel .scombo-empty {
    padding: 10px;
    color: #6d6d6d;
    font-size: 0.9rem;
    text-align: center;
}
.scombo-panel .scombo-empty[hidden] { display: none; }

/* Touch screens: the 6px row padding is a ~32px tap target on a desktop pointer but too small for
   a thumb, and the on-screen keyboard makes every row count. Coarse-pointer devices get taller
   rows on the trigger and in the list.

   The same block raises form-control font size to 16px: iOS Safari zooms the page whenever a
   focused text input's font is under 16px, which would fire as soon as the combobox search (or any
   form field) is focused. It is pointer-based rather than width-based because an iPad is 768px+
   wide and would still zoom. */
@media (pointer: coarse) {
    .scombo-trigger { padding: 10px 12px; }
    .scombo-panel .scombo-list-item { padding: 11px 12px; }
    .scombo-panel .scombo-search { padding: 10px 12px; }

    .form-control,
    .form-control-sm,
    .form-select,
    .form-select-sm,
    .scombo-panel .scombo-search,
    input[data-pin-other] {
        font-size: 16px;
    }
}

/* The pincode "Other" free-text row (VAI-10). Shown/hidden by Register.cshtml when the
   select's value is the "Other" sentinel. */
input[data-pin-other] {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}
input[data-pin-other]:focus {
    border-color: var(--nta-blue);
    box-shadow: 0 0 0 2px rgba(30, 94, 158, .15);
    outline: none;
}
input[data-pin-other].input-validation-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, .15);
}

/* §9.3 wizard checkboxes (FinalSubmit verify/agree tiles, any form-check)
   The default browser checkbox (16px, 1px grey border) gets visually lost
   against the surrounding card chrome and bold labels. Enlarge it, give it
   a clearly-visible border in the nta-blue, and tighten the label gap so
   the bigger box still sits flush against the text. The :checked state
   uses a solid nta-blue fill with a high-contrast tick so "yes I ticked
   this" reads at a glance, especially when the candidate is on mobile. */
.form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: 0.18em;
    border: 2px solid var(--nta-blue-dark);
    background-color: #fff;
    cursor: pointer;
}
.form-check-input:hover {
    border-color: var(--nta-blue);
    box-shadow: 0 0 0 2px rgba(30, 94, 158, .12);
}
.form-check-input:checked {
    background-color: var(--nta-blue);
    border-color: var(--nta-blue);
}
.form-check-input:focus {
    border-color: var(--nta-blue);
    box-shadow: 0 0 0 2px rgba(30, 94, 158, .25);
    outline: none;
}
.form-check-input:disabled {
    background-color: #e9ecef;
    border-color: #adb5bd;
    cursor: not-allowed;
}
.form-check {
    padding-left: 1.65em;
}
.form-check-label {
    cursor: pointer;
    user-select: none;
}
