/* SchoolDay v244: Manage Parents/Carers.

   Linked BEFORE admin-function-shell-v2365.css, which is the cosmetic sweep
   and has to stay last. */

.parents-admin-toolbar-v244 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.parents-admin-toolbar-v244 p {
  margin: 0;
}

.parents-admin-list-v244 {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.parents-admin-row-v244 {
  display: grid;
  /* minmax(0, …) on every track. A long email address in an auto column sizes
     to its max-content and pushes the whole row off the edge of the card --
     the fault a floated legend caused in the pupil form. */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(18, 59, 93, 0.18);
  border-radius: 0.6rem;
  background: #ffffff;
}

.parents-admin-row-v244 h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.parents-admin-row-v244 p {
  margin: 0 0 0.2rem;
  /* An address with no spaces in it will not wrap without this. */
  overflow-wrap: anywhere;
}

.parents-admin-state-v244 {
  text-align: right;
}

.parents-admin-activation-v244 {
  font-weight: 700;
}

/* Activated and not activated differ by WORDS as well as colour -- the text
   says which -- so a colour-blind reader is not relying on the green. */
.parents-admin-activation-v244[data-activated="true"] {
  color: #1b7f3b;
}

.parents-admin-activation-v244[data-activated="false"] {
  color: #8a5a00;
}

@media (max-width: 900px) {
  .parents-admin-row-v244 {
    grid-template-columns: minmax(0, 1fr);
  }
  .parents-admin-state-v244 {
    text-align: left;
  }
}

/* v245: the decision controls. Added to this file rather than a new one so the
   row and the buttons inside it cannot end up styled by two stylesheets that
   disagree about the grid. */

.parents-admin-actions-v244 {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(18, 59, 93, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.parents-admin-actions-v244 label {
  font-weight: 600;
}

.parents-admin-actions-v244 select,
.parents-admin-actions-v244 input[type="text"],
.parents-admin-actions-v244 textarea {
  padding: 0.5rem;
  font: inherit;
  border: 1px solid rgba(18, 59, 93, 0.35);
  border-radius: 0.4rem;
  /* Zero minimum and border-box: a long pupil label in an auto-sized control
     otherwise widens the grid track and pushes the row off the card. */
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.parents-admin-suggested-v244 {
  margin: 0;
  color: #1b7f3b;
  font-weight: 600;
}

.parents-admin-buttons-v244 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.parents-admin-edit-v244,
.parents-admin-info-v244 {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px dashed rgba(18, 59, 93, 0.3);
  border-radius: 0.5rem;
}

.parents-admin-edit-v244[hidden],
.parents-admin-info-v244[hidden] {
  display: none;
}

/* v246: the "Add - Unaligned to class" panel. Same frame as Edit pupil and
   Request more information -- three panels that open under one row should not
   each look like a different feature. */
.parents-admin-create-v244 {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px dashed rgba(18, 59, 93, 0.3);
  border-radius: 0.5rem;
}

.parents-admin-create-v244[hidden] {
  display: none;
}

.parents-admin-create-v244 input[type="text"] {
  padding: 0.5rem;
  font: inherit;
  border: 1px solid rgba(18, 59, 93, 0.35);
  border-radius: 0.4rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* A disabled Approve has to LOOK disabled. The default on a .button-link is
   barely different, and a button that cannot do anything should say so. */
.parents-admin-buttons-v244 button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.parents-admin-actions-v244 optgroup {
  font-style: normal;
  font-weight: 700;
}
