
/*
 * NKORANMAN SHS — restore the student identity confirmation layout
 * to the supplied reference screenshot, with a single-screen desktop view.
 * This stylesheet applies only while the identity confirmation panel is open.
 */

@media (min-width: 801px) {
  html:has(body.student-profile-open #identityPanel:not([hidden])),
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) {
    height: 100%;
    overflow: hidden !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) {
    min-height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-access-shell {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none !important;
    height: 100dvh;
    min-height: 0 !important;
    max-height: 100dvh;
    margin: 0 !important;
    padding: 0 20px 12px !important;
    box-sizing: border-box;
    overflow: hidden !important;
  }

  /* The reference page begins with the status strip, not the large school hero. */
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-access-shell > .nk-student-hero,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-access-shell > .quiz-hero {
    display: none !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentStatus {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-height: 49px;
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: 0 0 12px 12px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.45;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #recoveryNotice:not([hidden]) {
    flex: 0 0 auto;
    margin: 0 0 8px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.35;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .accessibility-tools {
    display: flex;
    flex: 0 0 52px;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    width: 100%;
    max-width: none;
    margin: 0 clamp(12px, 7.2vw, 134px) 46px 0;
    padding: 0;
    box-sizing: border-box;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .accessibility-tools > button {
    min-height: 52px !important;
    padding: 10px 17px;
    border-radius: 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-font-setting {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    white-space: nowrap;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-font-setting input {
    width: 114px;
    min-height: 52px;
    padding: 8px 11px;
    font-size: 14px;
  }

  /* Restore the two-column arrangement shown in the supplied image. */
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentWorkspace:not([hidden]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 262px !important;
    align-items: start;
    gap: 26px;
    width: min(100%, 1430px);
    max-width: 1430px;
    min-height: 0;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-main-column {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0;
    width: 100%;
  }

  /* Active-session strip sits above the confirmation card, centred in the main column. */
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 930px);
    max-width: 930px;
    min-height: 76px;
    margin: 0 auto 12px;
    padding: 13px 18px;
    gap: 12px;
    border-radius: 17px;
    box-sizing: border-box;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-copy strong {
    font-size: 14px;
    line-height: 1.35;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-copy small {
    max-width: none;
    font-size: 12px;
    line-height: 1.4;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-bar .student-logout-button {
    min-height: 44px;
    padding: 9px 18px;
    font-size: 13px;
    border-radius: 11px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel {
    display: block;
    width: 100%;
    min-height: 514px;
    max-height: calc(100dvh - 350px);
    margin: 0;
    padding: 30px 32px;
    border-radius: 24px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(22, 59, 94, .055);
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel h2 {
    margin: 0 0 24px;
    font-size: 24px;
    line-height: 1.3;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dl {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0 0 24px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dt,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dd {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dd {
    font-weight: 750;
    color: #123e65;
    overflow-wrap: anywhere;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > p {
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.4;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel #personalInstructions {
    max-height: 72px;
    overflow: hidden;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel .actions button {
    min-height: 52px;
    padding: 11px 17px;
    border-radius: 12px;
    font-size: 15px;
  }

  /* Portrait returns to the larger reference-card treatment at the right. */
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0;
    min-height: 0;
    width: 262px;
    align-self: start;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-card {
    position: fixed !important;
    top: 44.3vh !important;
    left: auto;
    right: auto;
    width: 262px !important;
    padding: 19px !important;
    border-radius: 18px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(18, 58, 96, .075);
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-frame {
    width: 100%;
    height: 282px;
    border-radius: 14px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-placeholder {
    font-size: 54px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-caption {
    display: grid;
    gap: 5px;
    margin-top: 15px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-caption small {
    font-size: 11px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-caption strong {
    font-size: 17px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-caption span {
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
}

/* Shorter laptop displays: preserve the same layout but tighten it to fit. */
@media (min-width: 801px) and (max-height: 800px) {
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .accessibility-tools {
    margin-bottom: 20px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentWorkspace:not([hidden]) {
    gap: 18px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-bar {
    min-height: 58px;
    margin-bottom: 8px;
    padding: 8px 13px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel {
    min-height: 0;
    max-height: calc(100dvh - 250px);
    padding: 18px 22px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel h2 {
    margin-bottom: 14px;
    font-size: 21px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dl {
    gap: 7px 12px;
    margin-bottom: 13px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > p {
    margin: 7px 0;
    font-size: 14px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel .actions button {
    min-height: 42px;
    padding: 8px 13px;
    font-size: 13px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-card {
    top: 38vh !important;
    padding: 12px !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-frame {
    height: 220px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-caption {
    margin-top: 9px;
    gap: 3px;
  }
}

/* At very short desktop heights, avoid clipping essential text. */
@media (min-width: 801px) and (max-height: 650px) {
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) {
    overflow-y: auto !important;
    max-height: none;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-access-shell {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible !important;
    padding-bottom: 20px !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel {
    max-height: none;
    overflow: visible;
  }
}

/* Small screens: preserve the reference content without squeezing it off-screen. */
@media (max-width: 800px) {
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) {
    overflow-y: auto;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-access-shell {
    display: block !important;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    padding: 10px 14px 20px !important;
    overflow: visible !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-access-shell > .nk-student-hero {
    display: none !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentStatus {
    margin: 0 0 10px;
    padding: 9px 11px;
    min-height: 0;
    border-radius: 10px;
    font-size: 13px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .accessibility-tools {
    justify-content: flex-end;
    gap: 5px;
    margin: 0 0 12px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .accessibility-tools > button {
    min-height: 36px !important;
    padding: 6px 9px;
    font-size: 11px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-font-setting {
    gap: 4px;
    font-size: 10px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .quiz-font-setting input {
    width: 54px;
    min-height: 36px;
    font-size: 12px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentWorkspace:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0 auto;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-main-column {
    width: 100%;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-bar {
    width: 100%;
    min-height: 54px;
    margin: 0 0 9px;
    padding: 8px 10px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel {
    min-height: 0;
    max-height: none;
    padding: 16px;
    border-radius: 16px;
    overflow: visible;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel h2 {
    margin-bottom: 14px;
    font-size: 19px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dl {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 7px 9px;
    margin-bottom: 14px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dt,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel dd,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > p {
    font-size: 13px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel .actions button {
    min-height: 42px;
    font-size: 13px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait {
    order: -1;
    width: 100%;
    min-height: 0;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-card {
    position: static !important;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100% !important;
    padding: 8px 10px !important;
    border-radius: 12px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-frame {
    width: 68px;
    height: 76px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-caption {
    margin: 0;
    gap: 3px;
  }
}


/* Identity confirmation refinement:
   move the student details into the highlighted centre-left area
   and place the portrait inside the main white card for easier identification. */
@media (min-width: 801px) {
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentWorkspace:not([hidden]) {
    position: relative;
    grid-template-columns: minmax(0, 1fr) !important;
    width: min(100%, 1450px);
    max-width: 1450px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-main-column {
    width: 100%;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-bar {
    width: min(100%, 1110px);
    max-width: 1110px;
    margin-left: 130px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel {
    position: relative;
    min-height: 445px;
    max-height: calc(100dvh - 350px);
    padding: 26px 320px 24px 32px;
    overflow: hidden;
  }

  /* Move the visible identification details from the far left into the marked red area. */
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > h2,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > dl,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > p,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > .actions {
    width: min(100%, 560px);
    max-width: 560px;
    margin-left: 165px;
    margin-right: 0;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > h2 {
    margin-top: 0;
    margin-bottom: 18px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > dl {
    grid-template-columns: 126px minmax(0, 1fr);
    margin-bottom: 18px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > p {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > #personalInstructions {
    width: min(calc(100% - 353px), 560px);
    max-width: 560px;
    margin-left: 165px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > .actions {
    margin-top: 16px;
  }

  /* Place the portrait inside the white confirmation card, in the marked blue area. */
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait {
    position: absolute !important;
    top: 142px;
    right: 34px;
    width: 252px;
    z-index: 3;
    pointer-events: auto;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-card {
    position: static !important;
    width: 252px !important;
    padding: 16px !important;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(18, 58, 96, .075);
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-frame {
    height: 260px;
  }
}

@media (min-width: 801px) and (max-height: 800px) {
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) .student-session-bar {
    margin-left: 110px;
    width: min(100%, 1050px);
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel {
    min-height: 0;
    max-height: calc(100dvh - 255px);
    padding: 18px 300px 18px 26px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > h2,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > dl,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > p,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > .actions,
  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #identityPanel > #personalInstructions {
    margin-left: 145px;
    width: min(100%, 500px);
    max-width: 500px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait {
    top: 100px;
    right: 28px;
    width: 228px;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-card {
    width: 228px !important;
    padding: 12px !important;
  }

  body.student-quiz.student-profile-open:has(#identityPanel:not([hidden])) #studentPortrait .portrait-frame {
    height: 214px;
  }
}


/*
 * Hide the full welcome/school banner only while the student is on
 * the "Confirm your details" screen. This applies on desktop, tablets,
 * and phones; the access-code page and quiz screens are not affected.
 */
body:has(#identityPanel:not([hidden])) .nk-student-hero {
  display: none !important;
}
