@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap'); 

:root {
  --admissio-green: #003d36;
  --admissio-lime: #d7df72;

  --text-dark: #202033;
  --text-muted: #7a7c8a;

  --background: #ffffff;
  --background-soft: #ececef;

  --error: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;

  width: 100%;
  min-height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;

  background: var(--background);
  color: var(--text-dark);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ============================================================
   GENERAL
============================================================ */

.hidden {
  display: none !important;
}

.decoder-hidden {
  position: fixed;

  width: 1px;
  height: 1px;

  left: -9999px;
  top: -9999px;

  overflow: hidden;

  opacity: 0;

  pointer-events: none;
}


/* ============================================================
   HEADER
============================================================ */

.topbar {
  width: 100%;
  height: 76px;

  background: var(--admissio-green);

  display: flex;
  align-items: center;

  padding: 0 20px;
}

.admissio-logo {
  height: 34px;
  width: auto;

  display: block;
}


/* ============================================================
   PAGE
============================================================ */

.page {
  width: 100%;
  max-width: 480px;

  margin: 0 auto;

  padding: 28px 28px 40px;
}


/* ============================================================
   PROGRESS
============================================================ */

.progress {
  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 28px;
}

.progress-step {
  width: 14px;
  height: 14px;

  border-radius: 50%;

  border: 2px solid #d4d5da;

  background: #ffffff;
}

.progress-step.active {
  border-color: #8e9664;

  background: #8e9664;

  box-shadow:
    inset 0 0 0 3px #ffffff;
}

.progress-line {
  width: 24px;
  height: 2px;

  background: #d4d5da;
}


/* ============================================================
   TEXT
============================================================ */

.content h1 {
  margin: 0 0 18px;

  font-size: 27px;
  line-height: 1.2;

  font-weight: 600;

  color: var(--text-dark);
}

.content p {
  margin: 0 0 14px;

  font-size: 16px;
  line-height: 1.55;

  font-weight: 400;

  color: var(--text-muted);
}

.content .instruction {
  margin-top: 18px;

  font-weight: 500;
}


/* ============================================================
   MOBILE SCANNER
============================================================ */

#scanner-container {
  margin-top: 22px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

#camera-container {
  position: relative;

  width: 84vw;
  max-width: 400px;

  aspect-ratio: 4 / 3;

  overflow: hidden;

  border-radius: 12px;

  background: var(--background-soft);
}

#camera {
  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;
}


/* ============================================================
   CAMERA OVERLAY
============================================================ */

.camera-overlay {
  position: absolute;

  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

.card-frame {
  position: relative;

  width: 88%;

  aspect-ratio: 85.6 / 54;

  border: 3px solid var(--admissio-lime);

  border-radius: 10px;

  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.22);
}


/*
  QR position on the physical HSE card.

  The decoder uses this guide's actual
  screen coordinates when cropping the
  camera image.
*/

.qr-guide {
  position: absolute;

  width: 20%;

  aspect-ratio: 1 / 1;

  top: 10%;
  left: 45%;

  border: 2px solid rgba(215, 223, 114, 0.95);

  border-radius: 5px;
}


/* ============================================================
   SCANNER MESSAGE
============================================================ */

#scanner-message {
  margin-top: 14px !important;
  margin-bottom: 0 !important;

  text-align: center;

  font-size: 14px !important;
  line-height: 1.5 !important;

  color: var(--text-muted) !important;
}


/* ============================================================
   STATUS
============================================================ */

#status {
  margin-top: 12px;

  min-height: 20px;

  font-size: 13px;
  line-height: 1.4;

  text-align: center;

  color: var(--text-muted);
}

#status.error {
  color: var(--error);
}


/* ============================================================
   DESKTOP HANDOFF
============================================================ */

#desktop-handoff {
  margin-top: 30px;
}

#desktop-handoff h2 {
  margin: 0 0 12px;

  font-size: 22px;
  line-height: 1.3;

  font-weight: 600;

  color: var(--text-dark);
}

#desktop-description {
  margin-bottom: 20px;
}

#handoff-qr {
  display: inline-flex;

  padding: 14px;

  background: #ffffff;

  border: 1px solid #e1e2e6;

  border-radius: 10px;
}

#handoff-qr img,
#handoff-qr canvas {
  display: block;
}


/* ============================================================
   SCAN RESULT
============================================================ */

#scan-result {
  width: 100%;

  margin-top: 24px;
}

.result-box {
  width: 100%;

  margin-bottom: 14px;

  padding: 14px 16px;

  background: #f5f6f7;

  border-radius: 10px;
}

.result-label {
  margin-bottom: 6px;

  font-size: 12px;
  font-weight: 600;

  color: var(--text-muted);

  text-transform: uppercase;

  letter-spacing: 0.04em;
}

.result-value {
  font-size: 13px;
  line-height: 1.5;

  color: var(--text-dark);

  overflow-wrap: anywhere;
  word-break: break-word;
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 768px) {

  .topbar {
    height: 74px;

    padding: 0 20px;
  }

  .admissio-logo {
    height: 31px;
  }

  .page {
    padding: 28px 28px 32px;
  }

  .progress {
    margin-bottom: 26px;
  }

  .content h1 {
    margin-bottom: 16px;

    font-size: 26px;
    line-height: 1.2;
  }

  .content p {
    font-size: 16px;
    line-height: 1.55;
  }

  #camera-container {
    width: 84vw;
    max-width: 400px;
  }

}


/* ============================================================
   DESKTOP
============================================================ */

@media (min-width: 769px) {

  .mobile-only {
    display: none !important;
  }

  .page {
    max-width: 560px;

    padding-top: 38px;
  }

  #desktop-handoff {
    margin-top: 26px;
  }

}