/* =====================================================================
   aslu-testing.css
   Testing-interface styles for lifeprint.com/testing/
   LAYERS ON TOP OF: lifeprint-style.css + lifeprint-quizzes.css (.lpq)
   Only contains what the /testing pages need beyond the shared quiz CSS.
   Encoding: UTF-8.  Line endings: CRLF (FrontPage-friendly).
   ===================================================================== */

.aslu-wrap {
  max-width: 900px;
  margin: 18px auto;
  padding: 0 12px;
  box-sizing: border-box;
}
.aslu-wrap *,
.aslu-wrap *::before,
.aslu-wrap *::after { box-sizing: border-box; }

/* --- Section cards reuse the .lpq look (black rounded border) --- */
.aslu-card {
  border: 2px solid #000;
  border-radius: 16px;
  background: #fff;
  padding: 18px 20px;
  margin: 0 0 18px 0;
}
.aslu-card h2 { margin: 0 0 12px 0; font-size: 24px; }
.aslu-intro { font-size: 18px; line-height: 1.45; }

/* --- Student entry form --- */
.aslu-field { margin: 0 0 14px 0; }
.aslu-field label {
  display: block;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 4px;
}
.aslu-field input[type="text"],
.aslu-field input[type="email"],
.aslu-field select {
  width: 100%;
  max-width: 480px;
  padding: 10px 12px;
  font-size: 18px;
  border: 2px solid #000;
  border-radius: 10px;
  font-family: inherit;
  background: #fff;
}
.aslu-field input:focus,
.aslu-field select:focus {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}
/* honeypot - visually hidden, off-screen, not display:none (bots skip those) */
.aslu-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* --- Buttons (match .lpq__btn but a touch larger for primary actions) --- */
.aslu-btn {
  padding: 12px 22px;
  border: 2px solid #000;
  border-radius: 12px;
  font-weight: bold;
  font-size: 19px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  line-height: 1.1;
}
.aslu-btn:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }
.aslu-btn--primary { background: #006b3c; color: #fff; border-color: #006b3c; }
.aslu-btn--primary:hover { background: #00582f; }
.aslu-btn:disabled { opacity: .45; cursor: default; }

/* --- Quiz availability list --- */
.aslu-quizpick { display: grid; gap: 10px; }
.aslu-quizpick .coming-soon {
  opacity: .55;
  font-style: italic;
}

/* --- Progress + unanswered indicators during a test --- */
.aslu-progress {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 8px 14px;
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aslu-q {
  border: 2px solid #000;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px 0;
  background: #fff;
}
.aslu-q.unanswered-flag { border-color: #cc6a00; background: #fff7ee; }
.aslu-q__stem { font-size: 21px; font-weight: bold; line-height: 1.35; margin: 0 0 10px 0; }
.aslu-q__num  { color: #555; font-size: 16px; }

/* choice rows - accessible radio/checkbox with large hit target */
.aslu-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid #000;
  border-radius: 10px;
  margin: 0 0 8px 0;
  font-size: 19px;
  line-height: 1.3;
  cursor: pointer;
}
.aslu-choice:hover { background: #f4f8ff; }
.aslu-choice input { margin-top: 4px; transform: scale(1.4); cursor: pointer; }
.aslu-choice.is-selected { background: #eef4ff; border-color: #1a73e8; }

/* --- Feedback / results screen --- */
.aslu-score {
  font-size: 26px;
  font-weight: bold;
  margin: 0 0 6px 0;
}
.aslu-score .pct { color: #006b3c; }
.aslu-missed {
  border: 2px solid #cc0000;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 10px 0;
  background: #fff5f5;
}
.aslu-missed .stem { font-weight: bold; }
.aslu-missed .yours  { color: #cc0000; }
.aslu-missed .right  { color: #006b3c; }
.aslu-note {
  border-left: 5px solid #1a73e8;
  background: #f2f7ff;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 16px;
}
.aslu-warn {
  border-left: 5px solid #cc6a00;
  background: #fff7ee;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 17px;
}
.aslu-status-line { font-size: 15px; color: #555; margin-top: 8px; }

/* --- Instructor results table --- */
.aslu-results-row {
  border: 2px solid #000;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 12px 0;
  font-size: 16px;
}
.aslu-results-row pre {
  white-space: pre-wrap;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px;
  margin: 0;
}

@media (max-width: 600px) {
  .aslu-card { padding: 14px; }
  .aslu-q__stem { font-size: 19px; }
  .aslu-choice { font-size: 17px; }
}

/* =====================================================================
   QUIZ-TAKING LAYOUT  (stage = progress + video; questions = scrolling list)
   Goal: keep the video in view while the student works through questions,
   so they never have to scroll back and forth. Mirrors the LVP responsive
   approach from lifeprint-style.css (edge-to-edge in portrait, video-left /
   content-right in landscape).
   ===================================================================== */

.aslu-quizlayout { display: block; }

/* Sticky stage - pins progress + video to the top while questions scroll. */
.aslu-stage {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  padding-top: 6px;
}
.aslu-questions { min-width: 0; }   /* allow the column to shrink in grid */

.aslu-controls-bar {
  border: 2px solid #000;
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  text-align: center;
  margin-top: 6px;
}

/* Video block */
.aslu-video { text-align: center; margin: 0 0 10px 0; }
.aslu-video__frame {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 2px solid #000;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.aslu-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ----- WIDE SCREENS: video left (sticky), questions right (scroll) -----
   Reclaim the wasted side margins, but cap the video at 640x360. The source
   quiz videos are roughly 360p, so enlarging past 640x360 only blurs the
   signer - better to keep it crisp and give the freed width to the questions. */
@media (min-width: 1080px) {
  .aslu-wrap { max-width: 1180px; }            /* use more of a desktop screen */

  /* keep the entry + feedback screens narrow and readable */
  #aslu-app > .aslu-card { max-width: 820px; margin-left: auto; margin-right: auto; }

  .aslu-quizlayout[data-has-video="true"] {
    display: grid;
    grid-template-columns: 656px 1fr;          /* 640 video + a little breathing room */
    gap: 32px;
    align-items: start;
  }
  .aslu-quizlayout[data-has-video="true"] .aslu-stage {
    position: sticky;
    top: 12px;
    align-self: start;
  }
  .aslu-quizlayout[data-has-video="true"] .aslu-video__frame {
    width: 640px;
    max-width: 640px;
    margin: 0 auto;                            /* 640x360 via aspect-ratio */
  }
  .aslu-quizlayout[data-has-video="true"] .aslu-progress { max-width: 640px; }
}

/* Medium landscape (tablets / small laptops, 700-1079px): still side-by-side,
   but let the video flex up to 640 rather than forcing a fixed track. */
@media (min-width: 700px) and (max-width: 1079px) {
  .aslu-quizlayout[data-has-video="true"] {
    display: grid;
    grid-template-columns: minmax(300px, 46%) 1fr;
    gap: 20px;
    align-items: start;
  }
  .aslu-quizlayout[data-has-video="true"] .aslu-stage {
    position: sticky;
    top: 12px;
    align-self: start;
  }
  .aslu-quizlayout[data-has-video="true"] .aslu-video__frame { max-width: 640px; }
}

/* ----- PHONE PORTRAIT: edge-to-edge video, no margins -----
   Once the quiz has started the student already knows which quiz/level they
   are on, so the progress box above the video is just wasted space. Hide it
   and let the video sit flush against the top and both side edges - maximum
   room for the signer's hands and for the questions below. */
@media (max-width: 600px) and (orientation: portrait) {
  .aslu-stage { padding-top: 0; }
  .aslu-progress { display: none; }            /* redundant in portrait */
  .aslu-video { margin: 0; }
  .aslu-video__frame {
    width: 100vw;
    max-width: none;
    margin-left: calc(-50vw + 50%);            /* break out of the padded container */
    margin-top: 0;
    border: 0;                                 /* flush on all sides */
    border-radius: 0;
  }
}

/* ----- PHONE LANDSCAPE: video hugs the left edge, questions on the right -----
   Video left margin -> 0 to maximize size; questions scroll beside it. */
@media (orientation: landscape) and (max-height: 600px) {
  .aslu-wrap { padding-left: 0; padding-right: 6px; }   /* video to the left edge */
  .aslu-quizlayout[data-has-video="true"] {
    display: grid;
    grid-template-columns: minmax(46%, 1fr) 1fr;
    gap: 12px;
    align-items: start;
  }
  .aslu-quizlayout[data-has-video="true"] .aslu-stage {
    position: sticky;
    top: 4px;
    align-self: start;
    padding-top: 2px;
  }
  .aslu-video { margin: 2px 0; }
  .aslu-video__frame {
    max-width: none;
    margin: 0;
    border-radius: 6px;
    border-left: 0;          /* flush to the left screen edge */
  }
  .aslu-progress { font-size: 14px; padding: 4px 8px; margin-bottom: 6px; }
  .aslu-q { padding: 8px 10px; margin-bottom: 8px; }
  .aslu-q__stem { font-size: 16px; }
  .aslu-choice { font-size: 15px; padding: 6px 8px; margin-bottom: 6px; }
  .aslu-choice input { transform: scale(1.2); }
}

/* =====================================================================
   MODAL DIALOG  (custom alert/confirm - larger type, custom button labels)
   ===================================================================== */
.aslu-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.aslu-modal {
  background: #fff;
  border: 2px solid #000;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 24px 26px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
}
.aslu-modal__title {
  font-size: 25px;
  font-weight: bold;
  line-height: 1.25;
  margin: 0 0 14px 0;
}
.aslu-modal__body {
  font-size: 21px;
  line-height: 1.5;
  margin: 0 0 20px 0;
}
.aslu-modal__buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.aslu-modal__buttons .aslu-btn {
  font-size: 20px;
  padding: 12px 24px;
}
@media (max-width: 600px) {
  .aslu-modal { padding: 18px 18px; }
  .aslu-modal__title { font-size: 22px; }
  .aslu-modal__body { font-size: 19px; }
  .aslu-modal__buttons .aslu-btn { font-size: 19px; flex: 1 1 auto; }
}

/* =====================================================================
   ACCESS CODE ROW + INFO ICON
   ===================================================================== */
.aslu-access-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.aslu-access-row input { max-width: 200px; }

/* "?" info icon - bold, circular, button-like, default text color */
.aslu-info-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: bold;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  color: inherit;          /* keep default text color, not link-blue */
}
.aslu-info-icon:hover { background: #eef4ff; }
.aslu-info-icon:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* Modal input (used for access-code re-entry) */
.aslu-modal__input {
  width: 100%;
  max-width: 260px;
  padding: 10px 12px;
  font-size: 19px;
  border: 2px solid #000;
  border-radius: 10px;
  font-family: inherit;
  margin: 0 0 16px 0;
}
.aslu-modal__input:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* =====================================================================
   CORRECT-A-SUBMISSION TOOL (correct.htm)
   ===================================================================== */
.cor-quiz {
  border: 2px solid #000;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  margin: 0 0 16px 0;
}
.cor-quiz__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.cor-quiz__score { font-weight: bold; font-size: 18px; }

.cor-row {
  border: 1px solid #ccc;
  border-left: 6px solid #ccc;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 6px 0;
}
.cor-row.band-auto   { border-left-color: #008a2e; background: #f3fbf5; }
.cor-row.band-review { border-left-color: #cc8a00; background: #fff9ec; }
.cor-row.band-miss   { border-left-color: #cc0000; background: #fff5f5; }
.cor-row__main {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
}
.cor-row__n    { font-weight: bold; }
.cor-row__texts { min-width: 0; font-size: 15px; line-height: 1.35; }
.cor-row__texts b { font-weight: bold; }
.cor-dbtag {
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  color: #006b3c;
  border: 1px solid #006b3c;
  border-radius: 6px;
  padding: 0 5px;
  margin-left: 4px;
}

.cor-row__toggle { display: flex; gap: 6px; }
.cor-tg {
  padding: 6px 12px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  font-weight: bold;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  opacity: 0.5;
}
.cor-tg:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }
.cor-row.dec-correct   .cor-tg--correct   { opacity: 1; background: #008a2e; color: #fff; border-color: #008a2e; }
.cor-row.dec-incorrect .cor-tg--incorrect { opacity: 1; background: #cc0000; color: #fff; border-color: #cc0000; }

.cor-row__add {
  display: flex;
  gap: 8px;
  margin: 8px 0 0 44px;
}
.cor-addinput {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 10px;
  font-size: 14px;
  border: 2px solid #000;
  border-radius: 8px;
  font-family: inherit;
}
.cor-adddb { font-size: 14px; padding: 6px 12px; flex: 0 0 auto; }

.cor-notes-label { display: block; font-weight: bold; margin: 10px 0 2px 0; }
.cor-notes {
  width: 100%;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 15px;
  font-family: inherit;
}

@media (max-width: 640px) {
  .cor-row__main { grid-template-columns: auto 1fr; }
  .cor-row__texts { grid-column: 1 / -1; }
  .cor-row__toggle { grid-column: 1 / -1; }
  .cor-row__add { margin-left: 0; flex-wrap: wrap; }
}
