/* v16.02: record lookup screen only.
   IMPORTANT: all selectors are scoped to the access state so the approved
   v15.18 certificate/report UI keeps its original layout and behavior. */

/* The reference lookup screen uses a full-width, visually smaller header. */
body.is-awaiting-record .site-header {
  height: 43px;
}
body.is-awaiting-record .header-inner {
  width: 100%;
  max-width: none;
  height: 43px;
  padding: 5px 8px;
}
body.is-awaiting-record .brand-logo {
  height: 28px;
}
body.is-awaiting-record .header-title {
  font-size: 13px;
  letter-spacing: .04em;
}

.record-access {
  width: 100%;
  background: #fff;
  min-height: calc(100vh - 43px);
  padding: 1px 20px 48px;
}

/* 345px matches the visible form width of the supplied desktop reference.
   The old 520px width was what made this screen feel zoomed-in. */
.record-access-card {
  width: min(100%, 345px);
  margin: 118px auto 0;
  transform: translateX(-10px);
}

.access-brand {
  display: inline-block;
  color: #514d8c;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .15em;
}

.record-access h1 {
  margin: 14px 0 11px;
  font-size: 29px;
  line-height: 1.2;
  color: #1a1a1a;
}

.access-intro {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#access-form { margin-top: 25px; }

#access-form label {
  display: block;
  margin-bottom: 8px;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
}

#appointment-access,
#test-date-access {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 13px;
  border: 1px solid #bcbad3;
  border-radius: 8px;
  background: #fff;
  color: #242333;
  font: inherit;
  font-size: 14.5px;
}

#appointment-access:focus-visible,
#test-date-access:focus-visible,
#access-submit:focus-visible {
  outline: 3px solid #7771c4;
  outline-offset: 3px;
}

#appointment-access[aria-invalid="true"],
#test-date-access[aria-invalid="true"] { border-color: #ad3030; }

.access-help {
  margin: 8px 0 19px;
  color: var(--text-secondary);
  font-size: 10.5px;
}

#test-date-access { margin-bottom: 19px; }

#access-submit {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 8px;
  background: #514d8c;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#access-submit:disabled { opacity: .65; cursor: wait; }

/* Reference: this link follows the left edge of the form, not the center. */
.access-official-link {
  margin: 16px 0 0;
  text-align: left;
  font-size: 10.5px;
}
.access-official-link a { text-decoration: underline; }

#access-status {
  min-height: 19px;
  margin: 11px 0 0;
  color: #8a2020;
  font-size: 10.5px;
  line-height: 1.45;
}
#access-status:empty { margin-top: 0; min-height: 0; }

body.is-awaiting-record { background: #fff; }
body.is-awaiting-record #app { display: none; }
body:not(.is-awaiting-record) #record-access { display: none; }

@media (max-width: 520px) {
  /* Only the access screen gets the centered mobile logo seen in the reference. */
  body.is-awaiting-record .site-header {
    height: 53px;
  }
  body.is-awaiting-record .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: none;
    height: 53px;
    padding: 10px 12px;
  }
  body.is-awaiting-record .brand {
    grid-column: 2;
    justify-self: center;
  }
  body.is-awaiting-record .brand-logo {
    height: 28px;
    width: auto;
  }
  body.is-awaiting-record .header-title {
    grid-column: 3;
    justify-self: end;
    max-width: 94px;
    font-size: 10px;
    line-height: 1.15;
    letter-spacing: .03em;
  }

  .record-access {
    min-height: 100vh;
    padding: 54px 16px 36px;
  }

  .record-access-card {
    width: min(100%, 345px);
    margin-top: 100px;
    transform: translateX(-5px);
  }

  .record-access h1 {
    font-size: 22.5px;
  }
}
