/* SchoolDay v210: responsive account header, pupils and registers. */

.admin-account-stack-v210 {
  display: grid;
  justify-items: end;
  gap: .16rem;
  min-width: 0;
}
.admin-thin-fallback-logo-v210 { display: none; }
.admin-account-stack-v210 #signOutButton { justify-self: end; }
.admin-header-user-summary-v210 {
  max-width: min(34vw, 390px) !important;
  text-align: right;
}
.admin-school-year-current-v209 {
  display: grid !important;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  justify-content: center;
  column-gap: .48rem;
  flex-wrap: nowrap !important;
}
.admin-school-year-current-v209 .admin-school-year-change-v209 {
  grid-column: 2;
  grid-row: 1;
}

.pupil-search-form-v210 {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr) auto;
  gap: .7rem;
  align-items: end;
  margin: .5rem 0 .8rem;
}
.pupil-search-form-v210 label { display: grid; gap: .28rem; font-weight: 750; }
.pupil-search-results-v210,
.register-class-list-v210 { display: grid; gap: .6rem; }
.pupil-result-v210,
.register-class-button-v210 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  width: 100%;
  padding: .75rem;
  border: 1px solid #cbd5e1;
  border-radius: .8rem;
  background: #fff;
}
.pupil-result-name-v210 { font-weight: 850; color: #0f172a; }
.pupil-result-meta-v210 { color: #64748b; font-size: .84rem; }
.pupil-result-actions-v210 { display: flex; flex-wrap: wrap; gap: .38rem; justify-content: flex-end; }
.pupil-result-actions-v210 button { min-height: 34px; padding: .38rem .58rem; font-size: .78rem; }
.pupil-workspace-v210 { margin-top: 1rem; border-top: 1px solid #d7e0eb; padding-top: 1rem; }
.pupil-workspace-heading-v210,
.pupil-editor-title-v210,
.register-toolbar-v210 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.pupil-workspace-heading-v210 h3,
.pupil-editor-title-v210 h3,
.register-toolbar-v210 h3 { margin: 0; }
.pupil-number-v210 { color: #475569; font-weight: 800; }
.pupil-action-placeholder-v210,
.pupil-contact-page-v210 {
  margin-top: .9rem;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: .8rem;
  background: #f8fafc;
}
.pupil-contacts-list-v210 {
  display: grid;
  gap: .75rem;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding-right: .35rem;
}
.responsible-adult-card-v210 {
  padding: .8rem;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  background: #fff;
}
.responsible-adult-card-v210 h4 { margin: 0 0 .3rem; }
.responsible-adult-contact-v210 { display: flex; flex-wrap: wrap; gap: .45rem 1rem; }
.pupil-timeline-form-v210 { margin-top: 1rem; }
.pupil-timeline-v210 { display: grid; gap: .7rem; border-left: 3px solid #b8d4ef; padding-left: 1rem; }
.pupil-timeline-entry-v210 { position: relative; padding: .78rem; border: 1px solid #d7e0eb; border-radius: .7rem; background: #fff; }
.pupil-timeline-entry-v210::before { content: ""; position: absolute; width: .72rem; height: .72rem; left: calc(-1rem - 7.5px); top: 1rem; border-radius: 50%; background: #1765a8; }
.pupil-timeline-entry-v210 h4 { margin: 0; }
.pupil-timeline-meta-v210 { margin: .18rem 0 .5rem; color: #64748b; font-size: .78rem; }

.register-class-button-v210 { text-align: left; cursor: pointer; }
.register-class-button-v210:hover { border-color: #1765a8; background: #f7fbff; }
.register-class-count-v210 { color: #475569; font-weight: 800; }
.register-toolbar-v210 { align-items: end; margin-bottom: .8rem; }
.register-period-tabs-v210 { display: flex; flex-wrap: wrap; gap: .45rem; }
.register-period-tabs-v210 button.active { background: #f5c542 !important; color: #111827 !important; }
.register-pupil-list-v210 { display: grid; gap: .55rem; }
.register-pupil-row-v210 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(94px, auto));
  gap: .5rem;
  align-items: center;
  padding: .7rem;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  background: #fff;
}
.register-mark-v210[data-status="present"].active { background: #18794e !important; border-color: #12623f !important; color: #fff !important; }
.register-mark-v210[data-status="absent"].active { background: #b42318 !important; border-color: #8f1c13 !important; color: #fff !important; }

.manage-pupils-layout-v210 {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: start;
}
.manage-pupil-form-v210 { position: sticky; top: calc(var(--admin-header-sticky-height, 82px) + .7rem); max-height: calc(100dvh - var(--admin-header-sticky-height, 82px) - 1.4rem); overflow-y: auto; padding: .9rem; border: 1px solid #cbd5e1; border-radius: .8rem; }
.pupil-archive-filter-v210 { align-self: end; min-height: 42px; }
.responsible-adults-editor-v210 { border-top: 1px solid #d7e0eb; padding-top: .8rem; }
.responsible-adult-editor-row-v210 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .7rem; padding: .75rem; border: 1px solid #d7e0eb; border-radius: .75rem; }
.responsible-adult-editor-row-v210 .adult-row-actions-v210 { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

@media (max-width: 900px) {
  .admin-body .site-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "actions brand" "year year" !important;
    justify-items: stretch !important;
    gap: .28rem .6rem !important;
    padding: .35rem .55rem !important;
    text-align: initial !important;
  }
  .admin-body .site-header .header-brand {
    grid-area: brand;
    width: auto !important;
    justify-self: end !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }
  .admin-body .site-header .site-logo { width: auto !important; max-width: 110px; max-height: 38px; }
  .admin-thin-fallback-logo-v210 { display: block; width: 36px; height: 36px; object-fit: contain; }
  .admin-body .site-header .site-logo:not([hidden]) ~ .admin-thin-fallback-logo-v210 { display: none; }
  .admin-header-title-stack-v209,
  #changeSchoolButton,
  .admin-body .site-header > nav > a,
  #adminZoomControls { display: none !important; }
  .admin-body .site-header > nav {
    grid-area: actions;
    display: block !important;
    width: auto !important;
    justify-self: start !important;
    justify-content: start !important;
  }
  .admin-account-stack-v210 { justify-items: start; gap: .05rem; }
  .admin-account-stack-v210 #signOutButton { justify-self: start; min-height: 30px; padding: .3rem .55rem; }
  .admin-header-user-summary-v210 {
    max-width: 54vw !important;
    text-align: left;
    font-size: 0 !important;
    line-height: 1.1 !important;
  }
  .admin-header-user-summary-v210::after {
    content: attr(data-short-name);
    display: block;
    max-width: 54vw;
    overflow: hidden;
    color: inherit;
    font-size: .7rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-school-year-control-v209 { grid-area: year; width: 100%; }
  .admin-school-year-current-v209 { width: 100%; grid-template-columns: minmax(0, auto) auto !important; justify-content: center !important; }
  .admin-school-year-control-v209 .admin-banner-year { font-size: .82rem !important; }
  .admin-school-year-change-v209 { min-height: 27px !important; padding: .25rem .48rem !important; }
  .admin-school-year-chooser-v209 { top: calc(100% + .25rem); }

  .pupil-search-form-v210 { grid-template-columns: minmax(0, 1fr) minmax(150px, .7fr) auto; }
  .manage-pupils-layout-v210 { grid-template-columns: 1fr; }
  .manage-pupil-form-v210 { position: static; max-height: none; }
}

@media (max-width: 650px) {
  .pupil-search-form-v210 { grid-template-columns: 1fr; }
  .pupil-search-form-v210 button { width: 100%; }
  .pupil-result-v210 { grid-template-columns: 1fr; }
  .pupil-result-actions-v210 { justify-content: flex-start; }
  .pupil-workspace-heading-v210,
  .register-toolbar-v210 { align-items: stretch; flex-direction: column; }
  .register-period-tabs-v210 { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .register-pupil-row-v210 { grid-template-columns: minmax(0, 1fr) repeat(2, 82px); }
  .register-pupil-row-v210 button { min-width: 0; padding: .45rem .28rem; }
  .responsible-adult-editor-row-v210 { grid-template-columns: 1fr; }
  .responsible-adult-editor-row-v210 .adult-row-actions-v210 { grid-column: auto; }
}
