/* Sending work (S5-F2, S5-F3; s/send.js): Check and Send, the camera and
   file buttons, Sent, Not Sent Yet, One Page Didn't Send, the blurry check,
   and Unsend or Replace over a card. */
.sp-send {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
/* Check and Send: a nav-bar title, the piece under it, Send pinned at the bottom. */
.sp-send-head .sp-send-title {
  font-size: 17px;
  font-weight: 600;
}
.sp-send-piece-head {
  font-size: 16px;
  font-weight: 600;
  color: var(--sp-text);
}
.sp-main.sp-send > .sp-fine {
  margin-top: 0;
}
.sp-send-foot .sp-btn {
  width: 100%;
}
.sp-send-foot {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: auto -16px 0;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(245, 245, 247, 0.96);
}
.sp-send-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-send-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}
.sp-send-head-words {
  display: flex;
  flex-direction: column;
}
.sp-send-head-piece,
.sp-send-piece {
  margin: 0;
  font-size: 15px;
  color: #58585d;
  overflow-wrap: anywhere;
}
.sp-send-head-page {
  font-size: 17px;
  font-weight: 700;
}
.sp-send-due {
  margin: 0;
  font-size: 15px;
}
/* Sending Late: one amber panel with a clock (the board). */
.sp-send-late-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sp-amber-soft);
  box-shadow: inset 0 0 0 1px #f5c88a;
  color: var(--sp-amber-text);
}
.sp-send-late-panel svg {
  flex: none;
}
.sp-send-late-words {
  display: flex;
  flex-direction: column;
}
.sp-send-late-panel .sp-send-due {
  font-weight: 700;
}
.sp-send-late {
  margin: 0;
  font-size: 14px;
  color: #6b3a00;
}
.sp-send-pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
/* Add Page or File: the board's dashed tile, the last in the grid. */
.sp-send-add-tile {
  position: relative;
  height: 100%;
  min-height: 120px;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border: 2px dashed var(--sp-field);
  border-radius: 10px;
  color: #0060c8;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.sp-send-add-tile:focus-within {
  outline: 3px solid var(--sp-blue);
  outline-offset: 2px;
}
.sp-send-page {
  position: relative;
}
.sp-send-page-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--sp-line, #d1d1d6);
  background: #e5e5ea;
  display: block;
}
/* Not Sent Yet and One Page Didn't Send: the pages small, in a row. */
.sp-send-mini {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.sp-send-mini-img {
  display: block;
  width: 60px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--sp-line);
  background: #fff;
}
.sp-send-mini-waiting .sp-send-mini-img {
  width: 52px;
  height: 68px;
  opacity: 0.6;
}
.sp-send-page-failed .sp-send-mini-img {
  border: 2px solid var(--sp-red);
  opacity: 0.6;
}
.sp-send-mark {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.sp-send-mark-ok {
  background: var(--sp-green-line);
}
.sp-send-mark-bad {
  background: var(--sp-red);
}
.sp-send-page-n {
  position: absolute;
  left: 6px;
  bottom: 6px;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-send-page-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.sp-send-add,
.sp-send-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp-send-row {
  display: flex;
  gap: 8px;
}
.sp-send-row .sp-btn {
  flex: 1;
}
.sp-send label.sp-btn {
  position: relative;
  cursor: pointer;
}
.sp-send-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
label.sp-btn:focus-within {
  outline: 3px solid var(--sp-blue);
  outline-offset: 2px;
}
.sp-send-hint,
.sp-send-msg {
  margin: 0;
  font-size: 14px;
  color: #58585d;
}
.sp-send-note-label {
  font-size: 15px;
  font-weight: 600;
}
.sp-send-note {
  width: 100%;
  box-sizing: border-box;
  /* Six lines to start; it grows with the writing (StudentPage.grow), so a long note is read whole. */
  min-height: 160px;
  border: 1px solid var(--sp-line, #d1d1d6);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  background: #fff;
  resize: none;
  overflow: hidden;
}
.sp-send-count {
  margin: -4px 0 0;
  font-size: 14px;
  color: #58585d;
}
.sp-send-count:empty {
  display: none;
}
/* See the Assignment, open over the photos: the card's instructions and links, then the rubric's cards. It
   borrows .sp-view for the rubric's own styles (s/page-view.css), without its page-filling height. */
.sp-send-about-btn {
  width: 100%;
}
.sp-send-about.sp-view {
  min-height: 0;
  gap: 12px;
}
.sp-send-about-rubric {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Sent, Not Sent Yet, One Page Didn't Send: centred on the screen. */
.sp-send-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 8px;
  text-align: center;
}
.sp-send-center .sp-send-title {
  font-size: 26px;
}
.sp-send-center .sp-send-line {
  margin: 0;
  font-size: 16px;
  color: #3a3a3c;
}
.sp-send-center > .sp-send-piece {
  font-size: 16px;
  font-weight: 600;
  color: var(--sp-text);
}
.sp-send-center > .sp-send-col,
.sp-send-center > .sp-btn {
  margin-top: 24px;
}
.sp-send-big {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 42px;
}
.sp-send-big-done {
  background: var(--sp-blue-fill);
  color: #fff;
}
.sp-send-big-wait {
  background: var(--sp-amber-soft);
  color: var(--sp-amber-text);
}
.sp-send-big-bad {
  background: var(--sp-red-soft);
  color: var(--sp-red);
}
.sp-send-grey {
  background: var(--sp-fill);
  color: var(--sp-text);
}
.sp-send-center .sp-send-col,
.sp-send-center .sp-btn {
  align-self: stretch;
}
.sp-send-when {
  margin: 0;
  font-size: 15px;
  color: #58585d;
}
.sp-send-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.sp-send-thumb {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--sp-line, #d1d1d6);
}
/* Blurry Photo, Retake: a dark camera screen (the board). */
.sp-app:has(> .sp-send-dark) {
  background: #000;
}
.sp-main.sp-send-dark {
  background: #000;
  color: #fff;
}
.sp-send-dark .sp-fine {
  color: #c7c7cc;
}
.sp-send-blurry-head {
  justify-content: space-between;
}
.sp-send-blurry-head::after {
  content: '';
  width: 64px;
}
.sp-send-blurry-cancel {
  width: 64px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  text-align: left;
}
.sp-send-blurry-head .sp-send-head-words {
  flex: 1;
  min-width: 0;
  align-items: center;
  text-align: center;
}
.sp-send-dark .sp-send-head-piece {
  font-size: 12px;
  color: #c7c7cc;
}
.sp-send-dark .sp-send-head-page {
  font-size: 18px;
}
.sp-send-blurry-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-send-blurry-img {
  max-width: 100%;
  max-height: calc(var(--sp-steady-h, 100vh) * 0.52);
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  filter: blur(0);
}
.sp-send-panel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #fff8e1;
  color: var(--sp-text);
}
.sp-send-panel svg {
  flex: none;
  color: #7a5900;
}
.sp-send-panel-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-send-panel .sp-send-title {
  font-size: 16px;
}
.sp-send-panel .sp-send-line {
  margin: 0;
  font-size: 14px;
}
.sp-send-blurry-keep {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.sp-send-ask-body {
  margin: 0;
  line-height: 1.45;
}
/* Unsend or Replace: the board's action sheet. The question and its answer
   in one card, the way out in a card of its own. */
.sp-sheet.sp-send-ask {
  left: 8px;
  right: 8px;
  bottom: calc(30px + env(safe-area-inset-bottom));
  max-width: 544px;
  padding: 0;
  gap: 8px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.sp-send-ask-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px 0;
  border-radius: 16px;
  background: var(--sp-card);
  text-align: center;
}
.sp-send-ask-card .sp-sheet-title {
  padding: 0;
  font-size: 18px;
}
.sp-send-ask-body {
  color: #3a3a3c;
  font-size: 15px;
}
.sp-send-ask .sp-send-ask-yes {
  margin: 8px -16px 0;
  min-height: 50px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 0 0 16px 16px;
  background: transparent;
  color: var(--sp-blue);
}
.sp-send-ask .sp-send-ask-danger {
  color: var(--sp-red-text);
}
.sp-send-ask .sp-send-ask-no {
  min-height: 56px;
  border-radius: 16px;
  background: var(--sp-card);
  color: var(--sp-blue);
}
.sp-send-ask .sp-btn:disabled {
  opacity: 0.6;
}
.sp-send-head .sp-head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--sp-blue, #007aff);
}
