/* The Dashboard's Inbox tile (D4 of docs/plans/dashboard-inbox-plan.md; boards
   C1 and E2; redrawn by docs/plans/inbox-redesign-plan.md), in the middle
   row's left slot. One white box like the cards; the list scrolls inside it.
   The stacks, Roll Call and the targets have their own files. */
.dash-inbox {
  display: flex;
  flex-direction: column;
  padding: 16px 20px 12px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  min-height: 0;
  transition: box-shadow 200ms var(--ease-out);
}
.dash-inbox:focus {
  outline: none;
}
.dash-inbox:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
/* A click on To Grade in the top bar rings the tile. Gone at rest. */
.dash-inbox.is-ring {
  box-shadow:
    0 0 0 3px var(--active),
    var(--shadow-sm);
}
.dash-inbox-head {
  flex: 0 0 auto;
  flex-wrap: wrap;
  row-gap: 4px;
}
/* The head is 32 px tall with nothing under it (the question lines and the stacks have their own room), as the board draws it. */
.page-dashboard .dash-inbox-head,
.page-dashboard .dash-recent-head {
  margin-bottom: 0;
  min-height: 32px;
  gap: 12px;
}
.page-dashboard .dash-inbox-head a,
.page-dashboard .dash-recent-head a {
  font-size: var(--text-base);
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.dash-inbox-title {
  margin: 0;
  font: inherit;
  color: inherit;
}
.dash-inbox-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.dash-inbox-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y proximity;
  overscroll-behavior: contain;
}

.dash-inbox-list {
  display: flex;
  flex-direction: column;
}
.dash-inbox-late {
  white-space: nowrap;
}
/* Late is said in a word and in amber. */
.dash-inbox-late {
  font-weight: 600;
  color: var(--score-2-text);
}
/* All Caught Up. */
.dash-inbox-caught {
  padding: 10px 4px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-2);
}
/* All Caught Up and a drop on the tile (D5; boards E1 and E1b). The drop
   area is Add Work for the Class's own (.awt-drop in add-work-class.css):
   grey and dashed at rest, blue while files are held over the tile. */
.dash-inbox-body {
  position: relative;
}
.dash-inbox-drop-home {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  box-sizing: border-box;
  padding: 2px 0 0;
}
/* As board E1: "All Caught Up" on its line, then "Add Work For" and a chip
   a piece, the chosen one blue. */
.dash-inbox-drop-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.dash-inbox-drop-caught {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.dash-inbox-drop-for {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  max-width: 100%;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-2);
}
.dash-inbox-drop-for-label {
  white-space: nowrap;
}
.dash-inbox-drop-for-one {
  font-weight: 600;
  color: var(--text);
}
.dash-inbox-drop-chip {
  min-width: 0;
  max-width: 260px;
  height: 26px;
  padding: 0 10px;
  overflow: hidden;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 13px;
  cursor: pointer;
}
.dash-inbox-drop-chip:hover {
  background: var(--overlay-hover);
}
.dash-inbox-drop-chip[aria-checked='true'] {
  font-weight: 600;
  color: var(--link);
  background: var(--active-light);
  border-color: var(--active);
}
.dash-inbox-drop-area {
  flex: 1 1 auto;
  min-height: 0;
  cursor: pointer;
}
.dash-inbox-drop-pick:focus-visible,
.dash-inbox-drop-chip:focus-visible,
.dash-inbox-drop-wall:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.dash-inbox-drop-line {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.dash-inbox-drop-line b {
  font-weight: 600;
  color: var(--text);
}
/* After an action found the list of assessments changed: one plain sentence. */
.dash-inbox-drop-notice {
  margin: 0 0 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}
/* The line's link sits at its right end, as board E1 draws it. */
.dash-inbox-drop-line a,
.dash-inbox-drop-wall {
  float: right;
  margin: 0 0 0 12px;
  padding: 0;
  font: inherit;
  color: var(--link);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
}
.dash-inbox-drop-line a:hover,
.dash-inbox-drop-wall:hover {
  text-decoration: underline;
}
/* Beside Bulletins the Inbox is 299 px: the drop area loses its icon so all of it fits. */
@media (min-width: 901px) {
  .dash-row-left.has-bulletins .dash-inbox-drop-area svg {
    display: none;
  }
  .dash-row-left.has-bulletins .dash-inbox-drop-area {
    padding: 10px 12px;
    gap: 4px;
  }
  .dash-row-left.has-bulletins .dash-inbox-drop-home {
    gap: 6px;
  }
}
/* Files held over the tile: one opaque cover over its body, in Add Work's
   blue. Out of sight at rest: [hidden] wins over the display rule. */
.dash-inbox-drop-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  box-sizing: border-box;
  background: var(--surface);
  border-radius: 12px;
}
.dash-inbox-drop-cover[hidden] {
  display: none;
}
.dash-inbox-drop-cover-in {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 12px;
  text-align: center;
  color: var(--link);
  background: var(--active-light);
  border: 2px dashed var(--active);
  border-radius: 12px;
  pointer-events: none;
}
.dash-inbox-drop-cover.is-none .dash-inbox-drop-cover-in {
  color: var(--text-2);
  background: var(--bg);
  border-color: var(--border-2);
}

@media (prefers-reduced-motion: reduce) {
  .dash-inbox {
    transition: none;
  }
}

/* Under 600 px the tiles stack and the header (title, switch, link, button)
   wraps to a second line rather than run past the tile. */
@media (max-width: 600px) {
  #dash-inbox.is-stacks:not(.is-quiet) .dash-inbox-head {
    flex-wrap: wrap;
    row-gap: 4px;
  }
}

/* The stacks' green Return button and Return All put white words on the bright
   green dark mode uses for a level: dark words there (4.5:1 and more). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .dash-inbox-return-btn.is-solid,
  :root:not([data-theme='light']) .dash-inbox-action.is-return {
    color: #052e12;
  }
}
:root[data-theme='dark'] .dash-inbox-return-btn.is-solid,
:root[data-theme='dark'] .dash-inbox-action.is-return {
  color: #052e12;
}

/* A student's question, waiting: up to two lines above the stacks, then one
   link (DashInboxQuestions; DashRowSize shows as many lines as the stacks'
   height leaves room for). As the board draws them: 40 px lines, 8 px apart,
   12 px under the head. */
.dash-inbox-qs {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding-top: 12px;
}
.dash-inbox-q {
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  box-sizing: border-box;
  padding: 0 4px 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: var(--text-base);
  line-height: 20px;
}
.dash-inbox-q[hidden],
.dash-inbox-q-more[hidden] {
  display: none;
}
.dash-inbox-q-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-inbox-q-text b {
  font-weight: 600;
}
.dash-inbox-q:hover {
  background: var(--overlay-hover);
}
/* Answer is the app's grey button (styles.css .btn-ghost). */
.dash-inbox-q-answer {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 16px;
  font-size: var(--text-sm);
  font-weight: 600;
}
.dash-inbox-q-more {
  flex: 0 0 auto;
  align-self: flex-start;
  display: flex;
  align-items: center;
  height: 24px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: var(--text-sm);
  line-height: 20px;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
}
.dash-inbox-q-answer:focus-visible,
.dash-inbox-q-more:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
/* On an iPad every control is 44 px (teacher/tablet.css). */
html.fv-tablet .dash-inbox-q-answer,
html.fv-tablet .dash-inbox-q-more {
  min-height: 44px;
}

/* The one-line tile keeps its tighter head: room for the chips beside the switch. */
.page-dashboard .dash-inbox.is-quiet .dash-inbox-head {
  gap: 8px;
}
.page-dashboard .dash-inbox.is-quiet .dash-inbox-head a {
  font-size: var(--text-sm);
  font-weight: 500;
}
