/* KYC wizard — self-contained styles (no framework dependency; Bootstrap-friendly). */

.kyc-widget { border: 1px solid #e3e3e3; border-radius: 12px; padding: 14px; background: #fafafa; }
.kyc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 700; }
.kyc-head .kyc-sub { font-weight: 400; font-size: .85em; color: #666; }
.kyc-consent { font-size: .8em; color: #666; margin: 0 0 10px; }

.kyc-steps { display: flex; flex-direction: column; gap: 10px; }
.kyc-step { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e5e5e5;
  border-radius: 10px; padding: 12px; cursor: pointer; user-select: none; transition: border-color .15s; }
.kyc-step:hover { border-color: #f0a500; }
.kyc-step.done { border-color: #28a745; background: #f6fff8; cursor: default; }
.kyc-step-icon { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; background: #fff3d6;
  display: flex; align-items: center; justify-content: center; font-size: 24px; }
.kyc-step.done .kyc-step-icon { background: #d9f2e0; }
.kyc-step-txt { flex: 1; min-width: 0; }
.kyc-step-txt .bn { display: block; font-weight: 700; font-size: 1.02em; }
.kyc-step-txt .en { display: block; font-size: .8em; color: #777; }
.kyc-step-state { font-size: .85em; font-weight: 600; color: #b58900; white-space: nowrap; }
.kyc-step.done .kyc-step-state { color: #28a745; }
.kyc-step .kyc-retake { font-size: .75em; color: #888; text-decoration: underline; margin-left: 8px; cursor: pointer; }
.kyc-flag-note { font-size: .8em; color: #b58900; margin-top: 8px; }
.kyc-done-note { font-size: .9em; color: #28a745; font-weight: 600; margin-top: 10px; }
.kyc-error { color: #c0392b; font-size: .85em; margin-top: 8px; }
.kyc-noscript { color: #c0392b; font-weight: 600; padding: 10px; }

/* Fullscreen flow overlay */
.kyc-modal { position: fixed; inset: 0; z-index: 20000; background: rgba(10,10,12,.96); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  height: 100vh; height: 100dvh; /* dvh tracks the visible area so buttons never hide behind the mobile browser bar */ }
.kyc-modal * { box-sizing: border-box; }
.kyc-m-inner { width: 100%; max-width: 560px; display: flex; flex-direction: column; min-height: 100%;
  padding: 14px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.kyc-m-top { display: flex; align-items: flex-start; gap: 10px; }
.kyc-m-title { flex: 1; }
.kyc-m-title .bn { display: block; font-size: 1.15em; font-weight: 700; }
.kyc-m-title .en { display: block; font-size: .85em; opacity: .75; }
.kyc-m-close { background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 8px;
  font-size: 1.1em; line-height: 1; padding: 8px 12px; cursor: pointer; }
.kyc-m-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 16px 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.kyc-bigbtn { display: flex; align-items: center; gap: 12px; width: 100%; background: #fff; color: #222;
  border: none; border-radius: 12px; padding: 16px; font-size: 1.05em; font-weight: 700; cursor: pointer; text-align: left; }
.kyc-bigbtn .ico { font-size: 26px; }
.kyc-bigbtn .en { display: block; font-size: .78em; font-weight: 400; color: #777; }
.kyc-bigbtn.secondary { background: rgba(255,255,255,.12); color: #fff; }
.kyc-bigbtn.secondary .en { color: rgba(255,255,255,.65); }
.kyc-bigbtn:disabled { opacity: .5; cursor: default; }

/* The video is capped by height (max-height) so the video + capture button always
   fit one screen on a phone; width/height auto keeps the true aspect ratio, so the
   guide→crop mapping (computed from the video's rendered box in JS) stays correct. */
.kyc-video-wrap { position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.kyc-video-wrap video { display: block; max-width: 100%; max-height: var(--kyc-cam-h, 48vh);
  width: auto; height: auto; }
.kyc-video-wrap.mirror video { transform: scaleX(-1); }
.kyc-guide { position: absolute; inset: 0; pointer-events: none; }
.kyc-guide .frame { position: absolute; border: 3px solid rgba(255,196,0,.95); border-radius: 12px;
  box-shadow: 0 0 0 2000px rgba(0,0,0,.45); }
.kyc-guide .oval { position: absolute; border: 3px solid rgba(255,196,0,.95); border-radius: 50%;
  box-shadow: 0 0 0 2000px rgba(0,0,0,.45); }
.kyc-guide.ok .frame, .kyc-guide.ok .oval { border-color: #35d073; }
.kyc-live-msg { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; }
.kyc-live-msg .pill { display: inline-block; background: rgba(0,0,0,.65); border-radius: 999px; padding: 8px 16px; }
.kyc-live-msg .bn { font-weight: 700; }
.kyc-live-msg .en { display: block; font-size: .75em; opacity: .8; }
.kyc-challenge-ico { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-size: 44px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }

.kyc-shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: #ffc400;
  cursor: pointer; margin: 4px auto 0; }
.kyc-shutter:active { transform: scale(.94); }

.kyc-preview { width: 100%; border-radius: 12px; }
.kyc-row { display: flex; gap: 10px; width: 100%; }
.kyc-row > * { flex: 1; }

.kyc-spin { width: 44px; height: 44px; border: 5px solid rgba(255,255,255,.25); border-top-color: #ffc400;
  border-radius: 50%; animation: kycspin .9s linear infinite; }
@keyframes kycspin { to { transform: rotate(360deg); } }
.kyc-status-txt { text-align: center; }
.kyc-status-txt .bn { font-weight: 700; font-size: 1.05em; display: block; }
.kyc-status-txt .en { font-size: .82em; opacity: .75; display: block; }
.kyc-status-txt.err .bn { color: #ff8a80; }
.kyc-checklist { width: 100%; font-size: .92em; background: rgba(255,255,255,.08); border-radius: 10px; padding: 12px 14px; }
.kyc-checklist div { padding: 3px 0; }
.kyc-progressbar { width: 100%; height: 8px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
.kyc-progressbar > div { height: 100%; background: #ffc400; width: 0; transition: width .3s; }

@media (min-width: 768px) {
  .kyc-m-inner { justify-content: center; }
}
