/**
 * Application form (Register / Renew / Transfer).
 *
 * Layout follows the mockup; colours and type use the site's own tokens
 * (Nunito headings, Roboto body, #0B63E5 primary) like the renewal checker.
 * Everything is scoped to .lei24-app so nothing leaks into the theme.
 */

.lei24-app {
  --app-primary: #0B63E5;
  --app-primary-dark: #0951bd;
  --app-navy: #111827;
  --app-text: #374151;
  --app-muted: #6B7280;
  --app-faint: #9CA3AF;
  --app-line: #E5E7EB;
  --app-hair: #F1F3F7;
  --app-border: #D1D5DB;
  --app-soft: #F5F9FF;
  --app-green: #12a06a;
  --app-red: #c8102e;
  --app-radius: 12px;
  --app-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-width: 100%;
  margin: 0 auto;
  color: var(--app-navy);
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}
.lei24-app *, .lei24-app *::before, .lei24-app *::after { box-sizing: border-box; }
.lei24-app [hidden] { display: none !important; }
.lei24-app h2 { margin: 0; }
.lei24-app a { color: var(--app-primary); text-decoration: underline; text-underline-offset: 2px; }
.lei24-app input, .lei24-app select, .lei24-app button { font-family: inherit; }
.lei24-app input:focus-visible, .lei24-app select:focus-visible, .lei24-app button:focus-visible {
  outline: 2px solid var(--app-primary); outline-offset: 1px;
}

/* ---------- top strip ---------- */
.lei24-app-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: 18px; font-size: 13px; color: var(--app-muted);
}
.lei24-app-status { display: flex; align-items: center; gap: 7px; }
.lei24-app-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--app-green); }

/* ---------- tabs ---------- */
.lei24-app-tabs {
  display: flex; gap: 6px; width: fit-content; margin-bottom: 22px; padding: 5px;
  background: #0B63E521; border-radius: 12px; flex-wrap: wrap;
}
.lei24-app-tab {
  padding: 9px 20px; border: 0; border-radius: 8px; background: transparent;
  font-family: Nunito, sans-serif; font-size: 16px; font-weight: 600; color: var(--app-muted); cursor: pointer;
}
.lei24-app-tab[aria-selected="true"] { background: #fff; color: var(--app-navy); box-shadow: 0 1px 3px rgba(17, 24, 39, .12); }

/* ---------- shell ---------- */
.lei24-app-form { display: flex; flex-direction: column; gap: 16px; }
.lei24-app-card { padding: 26px 28px 28px; background: #fff; border: 1px solid var(--app-line); border-radius: 16px; }
.lei24-app-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.lei24-app-step {
  display: flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px;
  border-radius: 50%; background: var(--app-navy); color: #fff; font-size: 13px; font-weight: 600;
}
.lei24-app-card-title { font-family: Nunito, sans-serif; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--app-navy); }
.lei24-app-card-lead { margin: 0 0 18px 38px; max-width: 600px; font-size: 14px; color: var(--app-muted); }
.lei24-app-card-body { margin-left: 38px; }

/* ---------- fields ---------- */
.lei24-app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 18px; }
.lei24-app-full { grid-column: 1 / -1; }
.lei24-app-field { display: flex; flex-direction: column; gap: 6px; }
.lei24-app-label { font-size: 13px; font-weight: 600; color: var(--app-text); }
.lei24-app-req { color: var(--app-red); }
.lei24-app-input, .lei24-app-select {
  width: 100%; padding: 12px 14px; font-size: 15px; color: var(--app-navy);
  background: #fff; border: 1.5px solid var(--app-border); border-radius: 9px;
}
.lei24-app-input::placeholder { color: var(--app-faint); }
.lei24-app-mono { font-family: var(--app-mono); }
.lei24-app-select {
  appearance: none; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--app-faint) 50%), linear-gradient(135deg, var(--app-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.lei24-app-gap-top { margin-top: 14px; }
.lei24-app-gap-top-lg { margin-top: 18px; }

/* ---------- search ---------- */
.lei24-app-search { position: relative; max-width: 560px; }
.lei24-app-search::before {
  content: ""; position: absolute; right: 16px; top: 16px; width: 16px; height: 16px; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>");
}
.lei24-app-search-input { padding: 14px 16px 14px 44px; font-size: 16px; border-radius: 10px; }
.lei24-app-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.lei24-app-search-note { margin: 8px 0 0; font-size: 13px; color: var(--app-muted); }
.lei24-app-search-note.is-error { color: #991B1B; }

.lei24-app-suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none; max-height: 340px; overflow-y: auto;
  background: #fff; border: 1px solid var(--app-line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, .14);
}
.lei24-app-option {
  display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 10px 12px;
  background: transparent; border: 0; border-radius: 8px; text-align: left; cursor: pointer;
}
.lei24-app-option:hover, .lei24-app-option.is-active { background: var(--app-soft); }
.lei24-app-option-name { font-size: 15px; font-weight: 600; color: var(--app-navy); overflow-wrap: anywhere; }
.lei24-app-option-meta { font-size: 12.5px; color: var(--app-muted); font-family: var(--app-mono); letter-spacing: .01em; }
.lei24-app-option-meta .is-issued { color: var(--app-green); }
.lei24-app-option-meta .is-lapsed { color: var(--app-red); }
.lei24-app-flag { display: inline-block; width: 16px; height: auto; margin-right: 4px; vertical-align: -2px; border-radius: 2px; }

.lei24-app-filled {
  margin: 0 0 6px; padding: 10px 14px; font-size: 13.5px; color: #065F46;
  background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 9px;
}

/* ---------- picked LEI (renew / transfer) ---------- */
.lei24-app-picked {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 560px; padding: 16px 18px; background: var(--app-soft); border: 1px solid #CFE0FA; border-radius: 12px;
}
.lei24-app-picked-name { display: block; font-family: Nunito, sans-serif; font-size: 16px; font-weight: 700; color: var(--app-navy); }
.lei24-app-picked-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--app-text); }
.lei24-app-picked-meta b { font-weight: 600; color: var(--app-muted); }
.lei24-app-picked-meta code { font-family: var(--app-mono); background: transparent; padding: 0; font-size: 13px; }
.lei24-app-picked-change {
  flex: none; padding: 8px 14px; background: #fff; border: 1.5px solid var(--app-border); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--app-text); cursor: pointer;
}
.lei24-app-picked-change:hover { border-color: var(--app-primary); color: var(--app-primary); }
.lei24-app-pill { display: inline-block; padding: 1px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.lei24-app-pill.is-issued { color: #166534; background: #DCFCE7; }
.lei24-app-pill.is-lapsed { color: #991B1B; background: #FEE2E2; }

/* ---------- rows inside "The entity" ---------- */
.lei24-app-row {
  display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 12px 30px;
  padding: 22px 0; border-top: 1px solid var(--app-hair);
}
.lei24-app-row-title { font-family: Nunito, sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.lei24-app-row-hint { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--app-faint); }
.lei24-app-stack { display: flex; flex-direction: column; gap: 18px; }

/* ---------- checkbox ---------- */
.lei24-app-opt { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.lei24-app-check { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px; cursor: pointer; }
.lei24-app-check-box {
  display: flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid var(--app-border); border-radius: 5px; background: #fff; color: #fff; font-size: 13px;
}
.lei24-app-opt:checked + .lei24-app-check .lei24-app-check-box { background: var(--app-primary); border-color: var(--app-primary); }
.lei24-app-opt:checked + .lei24-app-check .lei24-app-check-box::after { content: "\2713"; }
.lei24-app-check-title { display: block; font-size: 14.5px; font-weight: 500; }
.lei24-app-check-sub { display: block; margin-top: 2px; font-size: 13px; color: var(--app-muted); }

/* ---------- switch ---------- */
.lei24-app-switch-row { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; cursor: pointer; }
.lei24-app-switch-text { max-width: 520px; }
.lei24-app-switch-title { display: block; font-size: 15px; font-weight: 600; }
.lei24-app-switch-sub { display: block; margin-top: 3px; font-size: 13px; color: var(--app-muted); }
.lei24-app-switch { flex: none; width: 52px; height: 30px; padding: 3px; border-radius: 15px; background: #cbd5e4; transition: background .15s; }
.lei24-app-switch::after {
  content: ""; display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .3); transition: transform .15s;
}
.lei24-app-opt:checked + .lei24-app-switch-row .lei24-app-switch { background: var(--app-primary); }
.lei24-app-opt:checked + .lei24-app-switch-row .lei24-app-switch::after { transform: translateX(22px); }

/* conditional blocks, revealed by the checkbox that precedes them */
.lei24-app-reveal, .lei24-app-reveal-off { display: none; }
.lei24-app-opt:checked ~ .lei24-app-reveal { display: block; }
.lei24-app-opt:not(:checked) ~ .lei24-app-reveal-off { display: block; }
.lei24-app-subcard { margin-top: 16px; padding: 16px 18px; background: #f7f9fd; border: 1px solid var(--app-line); border-radius: 12px; }
.lei24-app-subcard-title { margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--app-text); }
.lei24-app-divide { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--app-line); }
.lei24-app-divide-top { padding-top: 18px; border-top: 1px solid var(--app-hair); }

/* ---------- plans ---------- */
.lei24-app-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 14px; }
.lei24-app-plan {
  position: relative; display: block; padding: 18px; cursor: pointer;
  background: #fff; border: 2px solid var(--app-line); border-radius: 13px; transition: border-color .12s;
}
.lei24-app-plan:has(.lei24-app-plan-input:checked) { border-color: var(--app-primary); }
.lei24-app-plan-input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.lei24-app-plan-head { display: flex; justify-content: space-between; align-items: center; }
.lei24-app-plan-name { font-size: 14px; font-weight: 600; }
.lei24-app-plan-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--app-border); background: #fff; }
.lei24-app-plan-input:checked ~ .lei24-app-plan-head .lei24-app-plan-dot { border-color: var(--app-primary); background: var(--app-primary); box-shadow: inset 0 0 0 3px #fff; }
.lei24-app-plan-price { display: block; margin-top: 14px; font-family: Nunito, sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.lei24-app-plan-per { font-family: Roboto, sans-serif; font-size: 14px; font-weight: 500; color: var(--app-muted); }
.lei24-app-plan-foot { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--app-hair); font-size: 13px; color: var(--app-muted); }
.lei24-app-save { color: var(--app-green); font-weight: 600; }
.lei24-app-badge {
  position: absolute; top: -11px; left: 18px; padding: 4px 10px; white-space: nowrap;
  background: var(--app-navy); color: #fff; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}

/* ---------- order bar ---------- */
.lei24-app-order {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
  padding: 24px 28px 26px; background: #fff; border: 1px solid var(--app-line); border-radius: 16px;
}
.lei24-app-order-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 240px; }
.lei24-app-order-label { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--app-faint); }
.lei24-app-order-total { font-family: Nunito, sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.lei24-app-order-vat { font-size: 13px; color: var(--app-muted); }
.lei24-app-order-right { flex: 1; min-width: 200px; max-width: 420px; }
.lei24-app-cta {
  width: 100%; padding: 16px; border: 2px solid var(--app-primary); border-radius: 11px;
  background: var(--app-primary); color: #fff; font-family: Nunito, sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.lei24-app-cta:hover { background: #fff; color: var(--app-primary); }
.lei24-app-order-error { margin: 10px 0 0; font-size: 13px; color: #991B1B; }

@media (max-width: 720px) {
  .lei24-app-card { padding: 22px 18px 24px; }
  .lei24-app-card-lead, .lei24-app-card-body { margin-left: 0; }
  .lei24-app-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lei24-app-order { padding: 22px 18px 24px; }
  .lei24-app-order-right { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lei24-app * { transition: none !important; }
}


/* ---------- automatic renewal, above the hand-over button ---------- */
.lei24-app-check.lei24-app-autorenew { margin: 0 0 14px; }
