/*
 * Wali dashboard: lightweight child selection and unboxed teacher notes.
 * Scoped presentation only. Existing select-child/do-task actions remain intact.
 * Loaded after inline styles, dark-mode and typography for cascade precedence.
 */
.app-frame .family-switch .family-cards {
  gap:10px!important;
}
.app-frame .family-switch .family-card {
  min-height:86px;
  padding:13px 15px!important;
  gap:12px!important;
  border:1px solid #e0e8f2!important;
  border-radius:12px;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#213955!important;
  transition:border-color .15s ease,background-color .15s ease;
}
.app-frame .family-switch .family-card:hover {
  border-color:#a8bfdc!important;
  background:#f8fbff!important;
}
.app-frame .family-switch .family-card.active,
.app-frame .family-switch .family-card[aria-pressed="true"] {
  background:#eef5ff!important;
  background-image:none!important;
  border-color:#d5e2f2!important;
  box-shadow:none!important;
  color:#213955!important;
  position:relative;
}
/* Selected card: a soft, solid surface with a slim accent only at the left. */
.app-frame .family-switch .family-card.active::before,
.app-frame .family-switch .family-card[aria-pressed="true"]::before {
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:#2767b8;
  pointer-events:none;
}
.app-frame .family-switch .family-card.active:hover,
.app-frame .family-switch .family-card[aria-pressed="true"]:hover {
  background:#eef5ff!important;
}
.app-frame .family-switch .family-card>.family-card-content {
  flex:1 1 auto;
  min-width:0;
  gap:4px;
  color:inherit!important;
}
.app-frame .family-switch .family-card .family-card-content strong,
.app-frame .family-switch .family-card.active strong,
.app-frame .family-switch .family-card[aria-pressed="true"] strong {
  color:#203a5b!important;
  font-size:14px;
}
.app-frame .family-switch .family-card .family-card-meta {
  display:flex;
  align-items:center;
  flex:0 0 auto;
  flex-wrap:wrap;
  gap:6px;
  color:#667b97!important;
  font-size:12px;
  line-height:1.5;
}
.app-frame .family-switch .family-card .family-card-percentage {
  display:inline;
  flex:0 0 auto;
  width:auto;
  min-width:0;
  padding:0!important;
  margin:0;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#3166a7!important;
  font-size:12px;
  font-weight:700;
  line-height:1.5;
  white-space:nowrap;
}
.app-frame .family-switch .family-card .family-card-current {
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  flex:0 0 auto;
  gap:5px;
  color:#356b9e!important;
  font-size:12px;
  font-weight:650;
  line-height:1.5;
}
.app-frame .family-switch .family-card .family-card-task {
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  flex:0 0 auto;
  width:auto;
  padding:0!important;
  margin:0;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#906420!important;
  font-size:12px;
  font-weight:650;
  line-height:1.5;
}
.app-frame .family-switch .family-card>.family-card-arrow {
  flex:0 0 20px;
  color:#7895b5!important;
}
.app-frame .family-switch .family-card.active>.family-card-arrow {
  color:#2964ad!important;
}
.app-frame .family-switch .family-card.active .family-avatar {
  outline:none!important;
  outline-offset:0!important;
}

/* Teacher's note is a line of readable text, never a colored inset box. */
.app-frame .task-panel .task-row .task-teacher-note {
  display:flex!important;
  flex-wrap:wrap;
  align-items:baseline;
  gap:4px 7px;
  width:auto;
  min-width:0;
  max-width:100%;
  margin:7px 0 3px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  color:inherit!important;
  overflow:visible!important;
}
.app-frame .task-panel .task-row .task-teacher-note strong {
  flex:0 0 auto;
  font-size:13px;
  font-weight:700;
  color:#365e8d!important;
  white-space:nowrap;
}
.app-frame .task-panel .task-row .task-teacher-note p {
  flex:1 1 190px;
  min-width:0;
  margin:0!important;
  padding:0!important;
  font-size:14px!important;
  line-height:1.55!important;
  color:#526985!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
}

/* Dark mode: quiet selection with readable metadata. */
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card,
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card.active {
  background:#1b304b!important;
  background-image:none!important;
  color:#e9f1ff!important;
  border-color:#405676!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card.active,
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card[aria-pressed="true"] {
  background:#233b59!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card.active {
  border-color:#405676!important;
  box-shadow:none!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card.active::before,
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card[aria-pressed="true"]::before {
  background:#8bbaff;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card:hover {
  background:#223c5b!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card.active:hover,
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card[aria-pressed="true"]:hover {
  background:#233b59!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card :is(.family-card-content,strong),
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card.active strong {
  color:#ecf5ff!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card .family-card-meta {
  color:#b8c9e0!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card .family-card-percentage,
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card .family-card-current {
  color:#a9cdfb!important;
  background:transparent!important;
}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card .family-card-task {
  color:#f0d29d!important;
  background:transparent!important;
}
:root[data-tmf-theme="dark"] .app-frame .task-panel .task-row .task-teacher-note {
  background:transparent!important;
  border:0!important;
  color:inherit!important;
}
:root[data-tmf-theme="dark"] .app-frame .task-panel .task-row .task-teacher-note strong {
  color:#bad6ff!important;
}
:root[data-tmf-theme="dark"] .app-frame .task-panel .task-row .task-teacher-note p {
  color:#cad8ea!important;
}
@media(max-width:680px) {
  .app-frame .family-switch .family-card {
    min-height:78px;
    padding:12px!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  .app-frame .family-switch .family-card {transition:none}
}

/* The selected child is identified beside their name, not on a separate row. */
.app-frame .family-switch .family-card .family-card-head {
  display:flex;flex:0 1 auto!important;flex-wrap:wrap;
  align-items:center;gap:5px 12px;min-width:0;width:100%;
}
.app-frame .family-switch .family-card .family-card-head>strong {
  flex:0 1 auto;min-width:0;font-weight:800!important;
}
.app-frame .family-switch .family-card.active .family-card-current {
  display:inline-flex;align-items:center;gap:5px;
  flex:0 0 auto!important;align-self:center;
  font-size:var(--tmf-type-label)!important;font-weight:800!important;
  line-height:1.35!important;white-space:nowrap;
}
.app-frame .family-switch .family-card .family-card-meta {
  order:2;gap:5px 9px;
}
.app-frame .family-switch .family-card .family-card-task {order:3}
:root[data-tmf-theme="dark"] .app-frame .family-switch .family-card.active .family-card-current {
  color:#b8d6ff!important;
}
