/* ============================================================
   CHOGM VIP — desktop layout
   Loaded only on real desktops (see the <link media=...> in index.html):
   wide screen AND a mouse. Phones/tablets never load this file, so the
   mobile form is exactly the standard one. Layout only — no behaviour.
   Structure: top nav bar · section sidebar (chogm-desktop.js) · workspace
   where every step is a page title + white card.
   ============================================================ */

:root {
  --cd-nav-h: 68px;
  --cd-side-w: 280px;
  --cd-page-w: 1000px;
  --cd-card-pad: 44px;
  --cd-bg: #eef2f4;
  --cd-ink: #12313d;
  --cd-muted: #5d7380;
  --cd-line: #dde4e8;
  --cd-green: #116b57;
  --cd-green-soft: #e5f2ee;
}

html, body { background: var(--cd-bg); }

/* ---------- Top navigation bar ---------- */
.chogm-desktop-brand {
  display: flex;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--cd-nav-h);
  padding: 0 32px;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--cd-line);
  z-index: 60;
}
.chogm-brand-left { display: flex; align-items: center; gap: 18px; }
.chogm-desktop-brand img { height: 42px; width: auto; display: block; }
.chogm-brand-divider { width: 1px; height: 30px; background: var(--cd-line); }
.chogm-brand-title { font-size: 16px; font-weight: 700; color: var(--cd-ink); letter-spacing: 0.2px; }
.chogm-desktop-brand .chogm-badge { margin: 0 0 0 4px; font-size: 11px; padding: 5px 10px; }
.chogm-brand-right { font-size: 13px; color: var(--cd-muted); }

/* ---------- Workspace (the former phone frame) ---------- */
.mobile-view {
  position: fixed;
  top: var(--cd-nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  margin: 0;
  border: none;
  box-shadow: none;
}
html.chogm-with-sidebar .mobile-view { left: var(--cd-side-w); }
.progress-bar, .progress-bar.visible { display: none !important; }  /* the sidebar shows progress */
.scroll-arrow { display: none !important; }                          /* desktop has scrollbars */

/* ---------- Section sidebar ---------- */
.chogm-sidebar {
  display: none;
  position: fixed;
  top: var(--cd-nav-h);
  left: 0;
  bottom: 0;
  width: var(--cd-side-w);
  padding: 32px 22px 24px;
  background: #fff;
  border-right: 1px solid var(--cd-line);
  overflow-y: auto;
  z-index: 55;
  flex-direction: column;
}
html.chogm-with-sidebar .chogm-sidebar { display: flex; }
.chogm-sidebar-heading {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--cd-muted); margin: 0 0 14px 10px;
}
.chogm-sidebar-list { list-style: none; margin: 0; padding: 0; }
.chogm-sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; margin-bottom: 2px;
  border-radius: 10px;
  font-size: 14.5px; color: var(--cd-muted);
}
.chogm-sidebar-num {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  border: 1.5px solid #c8d2d8; color: #8a9ba5; background: #fff;
}
.chogm-sidebar-item.is-current { background: var(--cd-green-soft); color: var(--cd-ink); font-weight: 700; }
.chogm-sidebar-item.is-current .chogm-sidebar-num { background: var(--cd-green); border-color: var(--cd-green); color: #fff; }
.chogm-sidebar-item.is-done { color: var(--cd-ink); }
.chogm-sidebar-item.is-done .chogm-sidebar-num { background: var(--cd-green-soft); border-color: var(--cd-green-soft); color: transparent; position: relative; }
.chogm-sidebar-item.is-done .chogm-sidebar-num::after {
  content: ''; position: absolute; width: 6px; height: 11px; margin-top: -2px;
  border: solid var(--cd-green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.chogm-sidebar-note {
  margin-top: auto; padding: 14px; border-radius: 10px;
  background: #f5f8f9; color: var(--cd-muted); font-size: 12.5px; line-height: 1.5;
}

/* ---------- Every form step: page title + white card ---------- */
.step:not(#step-landing):not(#step-traveler-type):not(#step-passport-scan):not(#step-id-card-scan):not(#step-face-scan):not(#step-passport-confirm):not(#step-id-card-confirm) {
  background: var(--cd-bg);
  padding: 0 40px;
}
.step:not(#step-landing):not(#step-traveler-type):not(#step-passport-scan):not(#step-id-card-scan):not(#step-face-scan):not(#step-passport-confirm):not(#step-id-card-confirm) > .step-header {
  position: relative;
  width: 100%;
  max-width: var(--cd-page-w);
  margin: 0 auto;
  padding: 34px 0 18px;
  background: none;
  border: none;
  color: var(--cd-ink);
  font-size: 26px;
  font-weight: 700;
  text-align: left;
  justify-content: flex-start;
  flex: 0 0 auto;
}
.step:not(#step-landing):not(#step-traveler-type):not(#step-passport-scan):not(#step-id-card-scan):not(#step-face-scan):not(#step-passport-confirm):not(#step-id-card-confirm) > .step-content {
  flex: 0 0 auto;
  overflow: visible;
  width: 100%;
  max-width: var(--cd-page-w);
  margin: 0 auto 40px;
  padding: 36px var(--cd-card-pad) 0;
  background: #fff;
  border: 1px solid var(--cd-line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 40, 52, 0.04), 0 10px 30px rgba(16, 40, 52, 0.06);
}
.step-content.centered-content { min-height: 460px; }

/* Text-size + language controls move to the right of the page title */
.step > .step-header .header-a11y-wrap { left: auto; right: 52px; }
.step > .step-header .header-lang-wrap { right: 0; }
.step:not(#step-landing):not(#step-traveler-type) > .step-header .a11y-trigger-btn {
  color: var(--cd-ink); border-color: #c5d0d6; font-size: 14px; padding: 6px 9px;
}

/* ---------- Typography inside cards ---------- */
.form-title { font-size: 20px; margin-bottom: 20px; }
.splash-text { font-size: 15.5px; max-width: 600px; line-height: 1.6; }
.splash-sub { max-width: 560px; }
.splash-guidelines { max-width: 600px; }
.passport-graphic { width: 280px; height: auto; }
.form-group label { font-size: 13.5px; }

/* ---------- Action bar at the bottom of each card ---------- */
.step-content .btn-row,
.step-content .btn-footer {
  margin: 32px calc(-1 * var(--cd-card-pad)) 0;
  width: calc(100% + 2 * var(--cd-card-pad));
  padding: 18px var(--cd-card-pad);
  border-radius: 0 0 14px 14px;
  background: #fafbfc;
  border-top: 1px solid var(--cd-line);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.step-content .btn-row { justify-content: flex-end; }
.btn-row .btn-primary { width: auto; min-width: 200px; flex: 0 0 auto; margin: 0; }
.step-content .btn-footer { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn-footer .btn-primary,
.btn-footer .btn-secondary { width: auto; min-width: 240px; }
.btn-footer .btn-link,
.btn-footer .chogm-upload-note { flex-basis: 100%; text-align: center; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary:hover, .btn-back:hover { filter: brightness(0.97); }

/* ---------- Two-column fields on the data-entry steps ---------- */
#step-contact > .step-content,
#step-traveler-details > .step-content,
#step-verify-data > .step-content,
#step-passport-manual > .step-content,
#step-id-card-details > .step-content,
#step-flight-arrival > .step-content,
#step-departure > .step-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  align-content: start;
}
#step-contact > .step-content > :not(.form-group),
#step-traveler-details > .step-content > :not(.form-group),
#step-verify-data > .step-content > :not(.form-group),
#step-passport-manual > .step-content > :not(.form-group),
#step-id-card-details > .step-content > :not(.form-group),
#step-flight-arrival > .step-content > :not(.form-group),
#step-departure > .step-content > :not(.form-group) {
  grid-column: 1 / -1;
}

/* ---------- Landing: full-width hero ---------- */
.bg-overlay {
  background: linear-gradient(90deg, rgba(8, 25, 33, 0.78) 0%, rgba(8, 25, 33, 0.45) 45%, rgba(8, 25, 33, 0.05) 80%);
}
#step-landing .landing-content {
  align-items: flex-start;
  justify-content: center;
  padding: 0 0 4vh 8vw;
}
#step-landing .logo-wrapper { margin-bottom: 8px; }
#step-landing .logo-wrapper .logo { width: 300px; height: auto; }
#landingReal { width: 100%; max-width: 620px; }
#landingReal .card.frosted {
  width: 100%;
  text-align: left;
  align-items: flex-start;
  padding: 40px 44px;
  border-radius: 16px;
  background-color: rgba(6, 22, 30, 0.55);
}
#landingReal .welcome-text { font-size: 36px; line-height: 1.15; text-align: left; margin-top: 6px; }
#landingReal .disclaimer-text { font-size: 17px; text-align: left; margin: 4px 0 8px; }
#step-landing .card.frosted + .card.frosted { width: auto; padding: 12px 16px; }
#landingReal .btn-start { max-width: 340px; margin: 10px 0 0; }
#landingReal .chogm-badge { margin: 0 0 6px; }
#landingA11yLangWrap { justify-content: flex-start !important; }

/* ---------- Traveler type: photo page with large option cards ---------- */
#step-traveler-type::before,
#step-traveler-type::after { position: absolute; }
#step-traveler-type > .step-header {
  background: none;
  border: none;
  font-size: 30px;
  font-weight: 700;
  padding: 56px 24px 8px;
}
#step-traveler-type > .step-content {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  gap: 28px;
  padding: 32px 48px 48px;
}
#step-traveler-type .visitor-box,
#step-traveler-type .oecs-box {
  flex: 1 1 420px;
  max-width: 520px;
  margin-top: 0;
  padding: 22px 20px;
}
#step-traveler-type .type-card { padding: 20px 22px; }
#step-traveler-type .type-card:hover { border-color: rgba(23, 219, 78, 0.8); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }

/* ---------- Camera + scan result screens: dark workspace ---------- */
#step-passport-scan,
#step-id-card-scan,
#step-face-scan { background: #0b1418; }
#step-passport-scan .passport-cam-ui,
#step-id-card-scan .id-card-cam-ui,
#step-face-scan .face-cam-ui {
  left: calc(50% - 340px);
  right: auto;
  width: 680px;
}

/* ---------- Passport photo picker ---------- */
.chogm-crop-wrap { max-width: 680px; }

/* Landing: let the hero text use the card width; controls left-aligned under it */
#landingReal { align-items: flex-start; }
#landingReal .welcome-text,
#landingReal .disclaimer-text { max-width: none; width: 100%; }
#landingReal .card.frosted + .card.frosted { margin-left: 0; }

/* Confirmation page: no page title, so give the card breathing room */
#step-complete > .step-content { margin-top: 56px !important; max-width: 720px !important; }
