/* ── Radio / checkbox groups ────────────────────────────────────────────── */
.radio-group,
.checkbox-group {
  display: grid;
  gap: var(--space-8);
}

.radio-option,
.checkbox-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-8);
  background: var(--color-white);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--color-primary-500);
}

.radio-input,
.checkbox-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.radio-option:has(.radio-input:checked),
.checkbox-option:has(.checkbox-input:checked:not(.checkbox-fee-input)) {
  border-color: var(--color-primary-500);
  background: var(--color-primary-500-10-on-white);
}

.radio-option:has(.radio-input:focus-visible),
.checkbox-option:has(.checkbox-input:focus-visible) {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 1px;
}

.radio-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-neutral-300);
  position: relative;
}

.radio-input:checked ~ .radio-mark {
  border-color: var(--color-primary-500);
}

.radio-input:checked ~ .radio-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-500);
}

.checkbox-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-4);
  border: 1.5px solid var(--color-neutral-300);
  background: var(--color-white);
  position: relative;
}

.checkbox-input:checked ~ .checkbox-mark {
  border-color: var(--color-primary-500);
  background: var(--color-primary-500);
}

.checkbox-input:checked ~ .checkbox-mark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.radio-label,
.checkbox-label {
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body-md);
  color: var(--color-neutral-900);
  font-weight: 500;
}

.radio-group.is-invalid .radio-option,
.checkbox-group.is-invalid .checkbox-option {
  border-color: var(--color-error-500);
}

/* ── Checkbox option with nested follow-up fields: option + fields share
   one highlighted card ──────────────────────────────────────────────── */
.checkbox-option-wrap {
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-8);
  transition: border-color .15s, background-color .15s;
}

.checkbox-option-wrap:hover {
  border-color: var(--color-primary-500);
}

.checkbox-option-wrap:has(.checkbox-input:checked:not(.checkbox-fee-input)) {
  border-color: var(--color-primary-500);
  background: color-mix(in srgb, var(--color-primary-500-10-on-white) 20%, var(--color-white));
}
.checkbox-option-wrap:has(.checkbox-input:checked:not(.checkbox-fee-input)) .checkbox-option-wrap{
  background-color:var(--color-white);
}
.checkbox-option-wrap:has(.checkbox-input:focus-visible:not(.checkbox-fee-input)) {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 1px;
}

.checkbox-option-wrap .checkbox-option {
  border: 0;
}

.checkbox-option-wrap .checkbox-option:has(.checkbox-input:checked) {
  background: transparent;
}

.checkbox-option-wrap .checkbox-option:has(.checkbox-input:focus-visible) {
  outline: none;
}

.checkbox-group.is-invalid .checkbox-option-wrap {
  border-color: var(--color-error-500);
}

.checkbox-children {
  display: grid;
  gap: var(--space-8);
  padding: 0 var(--space-16) var(--space-12) 48px;
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height .25s ease, opacity .2s ease, padding-bottom .25s ease;
}
.checkbox-children[hidden] {
  display: grid;
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  pointer-events: none;
}
.checkbox-children .group { margin: 0; }
.checkbox-children label { font-weight: 500; color: var(--color-neutral-700); }

/* ── Upload ──────────────────────────────────────────────────────────────── */
.group:has(.upload) .field-desc { color: var(--color-neutral-700); }
.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-24);
  margin-top: var(--space-4);
  border: 1.5px dashed var(--color-neutral-300);
  border-radius: var(--radius-8);
  cursor: pointer;
  text-align: center;
  color: var(--color-neutral-700);
  transition: border-color .15s, background-color .15s;
}

.upload:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 1px;
}

.upload-icon { color: var(--color-neutral-500); }

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

.upload-cta {
  color: var(--color-primary-500);
  font-weight: var(--font-weight-bold);
}

.upload-filename {
  display: none;
}

.upload-hint {
  font-size: var(--font-size-body-xs);
  line-height: var(--line-height-body-xs);
  color: var(--color-neutral-500);
}

.upload.has-file {
  border-style: solid;
  border-color: var(--color-primary-500);
  background: var(--color-primary-500-05-on-white, var(--color-primary-500-10-on-white));
}

.upload.is-dragover {
  border-style: solid;
  border-color: var(--color-primary-500);
  background: var(--color-primary-500-05-on-white, rgba(0,0,0,.04));
}

.upload.is-invalid {
  border-color: var(--color-error-500);
}

/* ── Camera-only upload: capture is the only path, no file picker ───────── */
.upload--camera-only {
  cursor: default;
}

.upload--camera-only .upload-cta,
.upload--camera-only .upload-hint {
  display: none;
}

.upload--camera-only .upload-camera-btn {
  padding: var(--space-12) var(--space-24);
  background: var(--color-primary-500);
  color: var(--color-white);
}

/* ── Upload verification status (mocked OCR / liveness check) ───────────── */
.upload-verify {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-top: var(--space-8);
  padding: var(--space-12) var(--space-16);
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-4);
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
}

.upload-verify[hidden] { display: none; }

.upload-verify.is-processing {
  border-color: var(--color-neutral-300);
  color: var(--color-neutral-700);
}

.upload-verify.is-pass {
  border-color: var(--color-primary-500);
  background: var(--color-primary-500-10-on-white);
  color: var(--color-primary-500);
}

.upload-verify.is-fail {
  border-color: var(--color-error-500);
  background: var(--color-error-100);
  color: var(--color-error-500);
}

.upload-verify-text {
  flex: 1 1 auto;
  min-width: 0;
}

.upload-verify-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
}

.upload-verify.is-pass .upload-verify-icon { background: var(--color-primary-500); }
.upload-verify.is-fail .upload-verify-icon { background: var(--color-error-500); }

.upload-verify-spinner {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-neutral-300);
  border-top-color: var(--color-primary-500);
  border-radius: 50%;
  animation: upSpin .7s linear infinite;
}

@keyframes upSpin { to { transform: rotate(360deg); } }

.upload-verify-retake {
  flex: 0 0 auto;
  padding: var(--space-4) var(--space-12);
  border: 1.5px solid currentColor;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-error-500);
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .upload-verify-spinner,
  .camera-shutter-spinner { animation: none; }
}

/* ── eKYC capture (camera-first ID + liveness steps) ───────────────────── */
.ekyc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  text-align: center;
}

.ekyc-illustration {
  width: 96px;
  height: 96px;
  padding: var(--space-16);
  box-sizing: border-box;

  border-radius: var(--radius-8);
  object-fit: contain;
}

.ekyc-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}

.ekyc-frame {
  position: relative;
  width: 184px;
  height: 184px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ekyc-frame .ekyc-illustration {
  width: 100%;
  height: 100%;
  background: none;
  object-fit: contain;
  padding: var(--space-16);
  height: auto;
    border-radius: 6px;
    padding: 0;
    width: calc(100% - 32px);
}

.ekyc-frame-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-primary-500);
}

.ekyc-frame-corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: var(--radius-4) 0 0 0; }
.ekyc-frame-corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 var(--radius-4) 0 0; }
.ekyc-frame-corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 var(--radius-4); }
.ekyc-frame-corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 var(--radius-4) 0; }

.ekyc-tips {
  align-self: stretch;
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body-md);
  color: var(--color-neutral-700);
  text-align: left;
  margin-top: var(--space-24);
}

.ekyc-input { display: none; }

.ekyc-stage {
  position: relative;
  width: calc(100% - 50px);
  max-width: 320px;
  aspect-ratio: 1.586;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-neutral-100);
  border-radius: var(--radius-8);
  overflow: hidden;
}

.ekyc-stage--oval {
  aspect-ratio: 1 / 1;
  max-width: 120px;
}

.ekyc-guide {
  position: absolute;
  inset: 12px;
  border: 2px dashed var(--color-neutral-500);
  border-radius: var(--radius-4);
  pointer-events: none;
}

.ekyc-stage--oval .ekyc-guide {
  inset: 18px;
  border-radius: 50%;
}

.ekyc-shot {
  width: calc(100% - 50px);
  height: 100%;
  object-fit: cover;
}

.ekyc.has-shot .ekyc-guide { display: none; }

.ekyc-placeholder-icon {
  width: 56px;
  height: 56px;
  color: var(--color-neutral-400);
  pointer-events: none;
}

.ekyc.has-shot .ekyc-placeholder-icon { display: none; }

.ekyc-instructions {
  margin: 0;
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-700);
}

.ekyc-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-8);
  padding: var(--space-12) var(--space-24);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-primary-500);
  color: var(--color-white);
  font-size: var(--font-size-body-md);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}

.ekyc-btn[hidden] { display: none; }

.ekyc .upload-verify { width: 100%; }

/* ── Upload previews: selected files with thumbnail + remove ───────────── */
.upload-previews {
  display: grid;
  gap: var(--space-8);
  width: calc(100% - 0px);
  margin-top: var(--space-8);
}

.upload-previews:empty {
  margin-top: 0;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-8) var(--space-12);
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-4);
  text-align: left;
  background: var(--color-white);
  overflow: hidden;
}

.upload-preview-thumb {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-4);
  object-fit: cover;
}

.upload-preview-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-4);
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-body-xs);
  font-weight: var(--font-weight-bold);
}

.upload-preview-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview-remove {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
  font-size: var(--font-size-body-md);
  line-height: 1;
  cursor: pointer;
}

.upload-preview-remove:hover {
  background: var(--color-error-100);
  color: var(--color-error-500);
}

/* ── OCR source photo (review step) ─────────────────────────────────────── */
.ocr-photo-label {
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-neutral-700);
}
.ocr-photo {
  width: 100%;
  aspect-ratio: 1.586 / 1;
  object-fit: cover;
  border-radius: var(--radius-8);
  border: 1.5px solid var(--color-neutral-300);
}

/* ── Embedded document (iframe) ─────────────────────────────────────────── */
.tc-frame {
  width: 100%;
  height: min(var(--tc-height), 40vh);
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-8);
  background: var(--color-white);
}

/* T&C document: fill the space below it (down to the footer) instead of
   leaving it capped at a small fraction of the viewport. */
#tc_document.tc-frame {
  height: max(160px, calc(100dvh - 545px));
}

/* Pack a consent document together with its choice into a single card */
.group:has(.tc-frame):has(+ .group .radio-group),
.group:has(.tc-frame):has(+ .group .checkbox-group) {
  border: 1.5px solid var(--color-neutral-300);
  border-bottom: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-8) var(--radius-8) 0 0;
  padding: 8px 0 0 0;
  margin-bottom: 0;
  gap: 0;
  overflow: hidden;
}
.group:has(.tc-frame):has(+ .group .radio-group) .tc-frame,
.group:has(.tc-frame):has(+ .group .checkbox-group) .tc-frame {
  border: none;
  border-radius: 0;
}
.group:has(.tc-frame):has(+ .group .radio-group) label,
.group:has(.tc-frame):has(+ .group .checkbox-group) label {
  padding: var(--space-8) var(--space-16) var(--space-12);
  font-size: var(--font-size-body-lg);
  color: var(--color-neutral-900);
  border-bottom: 1px solid var(--color-neutral-300);
}
.group:has(.tc-frame) + .group:has(.radio-group),
.group:has(.tc-frame) + .group:has(.checkbox-group) {
  border: 1.5px solid var(--color-neutral-300);
  border-top: none;
  border-radius: 0 0 var(--radius-8) var(--radius-8);
  padding: 16px;
  margin-top: 0;
}
.group:has(.tc-frame) + .group:has(.radio-group) {
  background: var(--color-white);
}
.group:has(.tc-frame) + .group:has(.checkbox-group) {
  background: var(--color-white);
}

/* Space between consecutive consent cards */
.group:has(.radio-group) + .group:has(.tc-frame) {
  margin-top: var(--space-32);
}

/* ── OTP verification (6-digit code, countdown, resend) ──────────────────── */
.otp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  text-align: center;
}

.otp-icon {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-500-10-on-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.otp-icon svg { width: 64px; height: 64px; }

.otp-dest {
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body-lg);
  color: var(--color-neutral-700);
  margin: 0;
}

.otp-dest strong { color: var(--color-neutral-900); }

.otp-ref {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-900);
  margin: 0;
}

.otp-boxes {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin: var(--space-8) 0;
}

.otp-box {
  width: 44px;
  height: 52px;
  padding: 0;
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-8);
  background: var(--color-white);
  font-family: var(--font-family-base);
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-bold);
  color: var(--color-neutral-900);
  text-align: center;
  transition: border .18s, box-shadow .18s;
  box-sizing: border-box;
}

.otp-box:focus-visible { outline: 0; border-color: var(--color-primary-500); }

.otp-boxes.is-invalid .otp-box { border-color: var(--color-error-500); }

.otp-boxes.is-invalid .otp-box:focus-visible {
  outline: 2px solid var(--color-pink-500-40);
}

.otp-timer,
.otp-resend {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-700);
  margin: 0;
}

.otp-resend-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-500);
  cursor: pointer;
}

.otp-resend-btn:hover { text-decoration: underline; }

.otp-note {
  width: calc(100% - 50px);
  margin-top: var(--space-8);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-8);
  background: var(--color-primary-500-10-on-white);
  color: var(--color-neutral-700);
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  box-sizing: border-box;
}
.otp-note.debug {
  background: white;
  border: 1px solid var(--color-neutral-300);
}
.otp-note.check-mail {
  background: var(--color-primary-500-10-on-white);
  color: var(--color-primary-700);
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  text-align: left;
}
.otp-note.check-mail > svg{
  position: relative;
  top: 2px;
}
/* The OTP layout is centered end-to-end, so its error message is too */
.group:has(.otp-card) .error {
  justify-content: center;
}

/* ── Director group ─────────────────────────────────────────────────────── */
.director-group { margin: 0; }

.dg-count-wrap { display: grid; gap: var(--space-4); }

.dg-count-label {
  font-size: var(--font-size-body-md);
  font-weight: 500;
  color: var(--color-neutral-900);
}

.dg-count-picker { display: flex; gap: var(--space-8); }

.dg-count-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--color-neutral-300);
  background: var(--color-white);
  font-family: var(--font-family-base);
  font-size: var(--font-size-body-md);
  font-weight: 500;
  color: var(--color-neutral-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .18s, background .18s, color .18s;
}

.dg-count-btn.is-active {
  border-color: var(--color-primary-500);
  background: var(--color-primary-500);
  color: var(--color-white);
}

.dg-count-btn:not(.is-active):hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
}

#dg-directors-1 { margin-top: var(--space-8); }
#dg-directors-5 { margin-bottom: var(--space-24); }
.dg-divider {
  border: none;
  border-top: 1px solid var(--color-neutral-300);
  margin: 0 0 var(--space-24) 0;
}

.dg-block { margin-bottom: 24px; }

.dg-block-title {
  font-size: var(--font-size-body-lg);
  font-weight: 600;
  color: var(--color-neutral-900);
  margin-bottom: var(--space-4);
}

.dg-block .group { margin: var(--space-16) 0; }
.dg-block .group:last-child { margin-bottom: 0; }

.dg-select-wrap { position: relative; }

.dg-select-wrap::after {
  content: '';
  position: absolute;
  right: var(--space-16);
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23707070' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  pointer-events: none;
}

select.dg-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--space-40);
  cursor: pointer;
  height: var(--control-height);
  padding-top: 0;
  padding-bottom: 0;
}

select.dg-select.is-invalid { border-color: var(--color-error-500); }

/* ── Mobile handoff gate (desktop visitors before eKYC steps) ───────────── */
.mobile-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}

.mobile-gate-card {
  width: calc(100% - 50px);
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-8);
  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  text-align: center;
}

.mobile-gate-title {
  font-weight: var(--font-weight-bold);
  color: var(--color-neutral-900);
}

.mobile-gate-qr {
  border-radius: var(--radius-4);
}

.mobile-gate-text {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-700);
  margin: 0;
}

.mobile-gate-done {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-500);
  margin: 0;
  text-align: center;
}

/* ── Plan cards (radio-group with description/badge) ────────────────────── */
.radio-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-weight: 600;
}

.radio-desc {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-700);
  font-weight: 400;
}

.radio-option--card {
  align-items: flex-start;
  padding: var(--space-16);
}

/* ── Checkbox options with description ───────────────────────────────── */
.checkbox-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-weight: 500;
}

.checkbox-desc {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--color-neutral-700);
  font-weight: 400;
}

.checkbox-option--card {
  align-items: flex-start;
  padding: var(--space-16);
}

.checkbox-fee-list {
  display: grid;
  gap: var(--space-8);
  list-style: none;
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
}

.checkbox-fee-list.checkbox-children {
  padding: var(--space-8) var(--space-16) var(--space-12) 48px;
  margin: 0;
  transition: max-height .25s ease, opacity .2s ease, padding-bottom .25s ease;
}

.checkbox-fee-list.checkbox-children[hidden] {
  padding-bottom: 0;
}

.checkbox-fee-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-8);
  background: var(--color-white);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.checkbox-fee-option:hover {
  border-color: var(--color-primary-500);
}

.checkbox-fee-option:has(.checkbox-fee-input:checked) {
  border-color: var(--color-primary-500);
  background: var(--color-primary-500-10-on-white);
}

.checkbox-fee-option:has(.checkbox-fee-input:focus-visible) {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 1px;
}

.checkbox-fee-option .checkbox-label {
  flex: 1;
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  font-weight: 400;
  color: var(--color-neutral-900);
}

.checkbox-fee-option .checkbox-fee {
  flex-shrink: 0;
  color: var(--color-neutral-900);
  font-weight: 600;
}

.radio-badge {
  position: absolute;
  top: var(--space-12);
  right: var(--space-12);
  background: var(--color-secondary-100);
  color: var(--color-secondary-900);
  border-radius: var(--radius-pill);
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-body-xs);
  font-weight: var(--font-weight-bold);
}

/* ── Camera capture ──────────────────────────────────────────────────────── */
.upload-camera-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) var(--space-16);
  border: 1.5px solid var(--color-primary-500);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-primary-500);
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}

/* Dark-gray overlay with the camera view as a boxed "window": instructions
   and the camera box (with its framing guide) grouped together and centered
   as a unit, with the shutter pinned to the bottom. */
.camera-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding: var(--space-24);
  background: #111111;
  color: var(--color-white);
}

.camera-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-16);
  min-height: 0;
}

.camera-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: var(--space-12);
}

.camera-header[hidden] { display: none; }

.camera-illustration {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  padding: var(--space-16);
  box-sizing: border-box;
  background: var(--color-gray-900-80);
  border-radius: var(--radius-8);
  object-fit: contain;
  transform: translate(-50%, -50%);
  transition: transform .6s ease-in-out, opacity .4s ease;
}

@keyframes card-flip {
  0%   { transform: translate(-50%, -50%) rotateY(0deg);  }
  50%  { transform: translate(-50%, -50%) rotateY(90deg); }
  100% { transform: translate(-50%, -50%) rotateY(0deg);  }
}

.camera-illustration.is-flipping {
  animation: card-flip 1s ease-in-out forwards;
  transition: opacity .4s ease;
}

.camera-illustration.is-hidden {
  opacity: 0;
}

.camera-stage:has(.camera-frame--rect) .camera-illustration {
  width: 85%;
  height: auto;
  aspect-ratio: 1.586 / 1;
  padding: 0;
  background: none;
  border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  .camera-illustration { transition: opacity .4s ease; }
}

.camera-instructions {
  align-self: stretch;
  font-size: var(--font-size-h5);
  line-height: 32px;
  text-align: center;
  white-space: pre-line;
  max-width: 32em;
  margin: 0 auto;
  margin-bottom: var(--space-24);
}

.camera-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-8);
  overflow: hidden;
  background: #000;
}

.camera-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.camera-freeze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-freeze[hidden] { display: none; }

.camera-frame--rect,
.camera-frame--oval {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px dashed var(--color-white);
  pointer-events: none;
}

.camera-frame--rect {
  width: 85%;
  aspect-ratio: 1.586 / 1;
  border-radius: var(--radius-4);
  border: none;
}

.camera-frame--oval {
  width: min(78%, 320px, calc((100dvh - 270px) * 0.75));
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.8);
}

@media (min-width: 768px) {
  .camera-frame--oval {
    width: min(88%, 600px, calc((100dvh - 270px) * 0.75));
    border-radius: 32px;
  }
}

@media (orientation: landscape) {
  .camera-frame--oval {
    height: min(calc(100dvh - 180px), 400px);
    width: auto;
  }
}


.camera-stage:has(.camera-frame--oval) {
  position: fixed;
  inset: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  z-index: 0;
}

.camera-stage:has(.camera-frame--oval) .camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-overlay:has(.camera-frame--oval) {
  background: transparent;
}

.camera-overlay:has(.camera-frame--oval) .camera-body,
.camera-overlay:has(.camera-frame--oval) .camera-controls {
  position: relative;
  z-index: 1;
}

.camera-overlay:has(.camera-frame--oval) .camera-body {
  justify-content: flex-start;
}

.camera-overlay:has(.camera-frame--oval) .camera-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px 24px 0;
  z-index: 2;
}

.camera-overlay:has(.camera-frame--oval) .camera-instructions {
  margin-top: 24px;
}

.camera-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-16);
  margin-bottom: var(--space-16);
}

.camera-shutter {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  border: 4px solid var(--color-white);
  background: transparent;
  cursor: pointer;
}

/* visibility (not display:none) so the shutter keeps its footprint and
   .camera-controls doesn't shrink, which would re-center .camera-stage
   and cause a layout shift. */
.camera-shutter[hidden] {
  display: inline-block;
  visibility: hidden;
}

.camera-shutter-fill {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--color-white);
}

.camera-shutter.is-loading .camera-shutter-fill { display: none; }

.camera-shutter-spinner {
  display: none;
  position: absolute;
  inset: 6px;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: upSpin .7s linear infinite;
}

.camera-shutter.is-loading {
  border-color: rgba(255, 255, 255, .25);
  cursor: default;
}

.camera-shutter.is-loading .camera-shutter-spinner { display: block; }

.camera-close {
  justify-self: start;
  width: 32px;
  height: 32px;
  margin-left: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-white);
  font-size: 32px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
}

.camera-error {
  font-size: var(--font-size-body-sm);
  color: var(--color-error-100);
  text-align: center;
  max-width: 32em;
}

.camera-error[hidden] {
  display: none;
}

/* ── In-overlay verify result (freeze-frame pass/fail) ──────────────────── */
.camera-result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-16);
  padding: var(--space-24);
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
}

.camera-result[hidden] { display: none; }

.camera-result-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
}

.camera-result.is-pass .camera-result-icon { background: var(--color-success-500); }
.camera-result.is-fail .camera-result-icon { background: var(--color-error-500); }

.camera-result-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  margin-bottom: var(--space-16);
}

.camera-result-text {
  margin: 0;
  font-size: var(--font-size-body-xl);
  color: var(--color-white);
  max-width: 28em;
}

.camera-result-text:empty { display: none; }

.camera-retake {
  padding: var(--space-12) var(--space-32);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-neutral-900);
  font-family: inherit;
  font-size: var(--font-size-body-md);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  width: calc(100% - 50px);
}

.camera-retake[hidden] { display: none; }

.camera-continue {
  padding: var(--space-12) var(--space-32);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-success-500);
  color: var(--color-white);
  font-family: inherit;
  font-size: var(--font-size-body-md);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  width: calc(100% - 50px);
}

/* ── Address cascade ─────────────────────────────────────────────────────── */
.address-cascade { display: contents; }
.address-cascade[hidden] { display: none; }

.ac-select-wrap { position: relative; }

.ac-select-wrap::after {
  content: '';
  position: absolute;
  right: var(--space-16);
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23707070' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  pointer-events: none;
}

.ac-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--space-40);
  cursor: pointer;
  height: var(--control-height);
  padding-top: 0;
  padding-bottom: 0;
  width: 100%;
}

.ac-select-wrap select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ac-select-wrap select.is-invalid { border-color: var(--color-error-500); }

.camera-continue[hidden] { display: none; }
