/* The product, drawn: the distributor's screen, the shop's phone, the pink copy and the small
   pictures beside each stop of the day. Sizes are set in px on purpose: these are pictures of an
   app, and they should look like one at every width. */

.fig {
  margin: 0;
}

.fig figcaption {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 46em;
}

.figno {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--ink);
  margin-right: 6px;
}

/* ---- The distributor's screen ------------------------------------------------------ */

.app {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  box-shadow: 0 2px 0 var(--ink), 0 40px 70px -30px rgba(27, 20, 24, 0.45);
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--rule);
  background: #faf6f7;
}

.app-dots {
  display: flex;
  gap: 5px;
}

.app-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rule-strong);
}

.app-title {
  font-weight: 700;
}

.app-search {
  flex: 1;
  max-width: 300px;
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: #8a7a80;
  background: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
  font-weight: 700;
  font-size: 12px;
}

.app-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.app-list,
.app-msg {
  display: none;
}

.app-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--rule);
}

.app-tabs span {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.app-tabs span.on {
  background: var(--ink);
  color: var(--white);
}

.app-tabs b {
  font-weight: 700;
  margin-left: 2px;
}

.app-list ul {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.app-list li {
  display: grid;
  padding: 7px 8px;
  border-radius: 6px;
}

.app-list li.on {
  background: var(--pink);
  box-shadow: inset 3px 0 0 var(--rani);
}

.q-shop {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-meta {
  color: var(--muted);
  font-size: 12px;
}

.app-msg {
  padding: 12px 14px;
  background: #fbf4f6;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.app-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.read-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  color: var(--green);
  font-weight: 600;
  font-size: 12px;
}

.tick {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}

.tick::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 4px;
  height: 7px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.app-order {
  padding: 12px 14px 14px;
}

.ord-head {
  display: grid;
  margin-bottom: 8px;
}

.ord-no {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.1;
}

.ord-shop {
  color: var(--muted);
}

.ord-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ord-table th {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: left;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule);
}

.ord-table th:not(:first-child),
.ord-table td.num {
  text-align: right;
  padding-left: 8px;
  white-space: nowrap;
}

.ord-table td {
  padding: 6px 0;
  border-bottom: 1px solid #f2eaed;
  vertical-align: top;
}

.chip {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-size: 11px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.ord-sum {
  margin: 8px 0 0;
  display: grid;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.ord-sum div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.ord-sum dd {
  margin: 0;
}

.ord-sum .grand {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
}

.ord-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.fake-btn {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--rani);
  color: var(--white);
  font-weight: 700;
  white-space: nowrap;
}

.fake-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

/* ---- Chat bubbles (a generic chat, not WhatsApp's own look) ------------------------------ */

.bubble {
  display: grid;
  gap: 1px;
  max-width: 92%;
  padding: 7px 10px 8px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.4;
}

.bubble + .bubble,
.bubble + .pinkcopy {
  margin-top: 6px;
}

.bubble-in {
  border-top-left-radius: 2px;
}

.bubble-out {
  margin-left: auto;
  background: #fff4c9;
  border-color: var(--yellow-2);
  border-top-right-radius: 2px;
}

.b-time {
  justify-self: end;
  font-size: 10px;
  color: var(--muted);
}

.voice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 190px;
}

.play {
  width: 0;
  height: 0;
  border-left: 9px solid var(--ink);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.wave {
  flex: 1;
  height: 16px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 2px, transparent 2px 5px);
  clip-path: polygon(0 40%, 8% 20%, 16% 55%, 24% 10%, 32% 45%, 40% 25%, 48% 60%, 56% 15%, 64% 50%, 72% 30%, 80% 55%, 88% 35%, 100% 45%, 100% 60%, 88% 70%, 80% 80%, 72% 65%, 64% 85%, 56% 70%, 48% 90%, 40% 70%, 32% 80%, 24% 95%, 16% 70%, 8% 85%, 0 60%);
}

.vlen {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---- The shop's phone ---------------------------------------------------------------- */

.phone {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto;
  padding: 10px;
  background: var(--ink);
  border-radius: 34px;
  box-shadow: 0 40px 70px -30px rgba(27, 20, 24, 0.55);
}

.ph-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 12px 10px;
  background: var(--white);
  border-radius: 25px 25px 0 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}

.ph-back {
  width: 9px;
  height: 9px;
  border: solid var(--ink);
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
  margin-right: 2px;
}

.ph-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pink);
  font-weight: 700;
}

.ph-name {
  display: grid;
  font-weight: 700;
  line-height: 1.2;
}

.ph-name small {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.ph-chat {
  padding: 12px 10px 18px;
  background: #f3eee9 repeating-linear-gradient(135deg, transparent 0 14px, rgba(27, 20, 24, 0.025) 14px 15px);
  border-radius: 0 0 25px 25px;
  min-height: 380px;
}

/* The pink copy: a slip torn from the book, stamped. */
.pinkcopy {
  position: relative;
  max-width: 92%;
  padding: 14px 14px 52px;
  background: var(--pink);
  border: 1px solid var(--pink-deep);
  border-radius: 2px 10px 10px 10px;
  font-size: 13px;
  -webkit-mask: radial-gradient(circle 4px at 7px 0, transparent 98%, #000) -1px 0 / 14px 100% repeat-x;
  mask: radial-gradient(circle 4px at 7px 0, transparent 98%, #000) -1px 0 / 14px 100% repeat-x;
}

.pc-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rani);
}

.pc-lines {
  list-style: none;
  margin: 6px 0;
  padding: 0;
}

.pc-lines li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pc-lines .more {
  color: var(--muted);
}

.pc-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 6px;
  border-top: 1px solid var(--pink-deep);
}

.pc-total b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 19px;
}

.pc-del {
  margin-top: 2px;
  color: var(--muted);
}

/* The rubber stamp. */
.stamp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  justify-items: center;
  padding: 3px 8px;
  border: 2px solid var(--rani);
  border-radius: 6px;
  color: var(--rani);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-8deg);
  opacity: 0.88;
  line-height: 1.1;
  background: rgba(246, 214, 224, 0.4);
}

.stamp small {
  font-size: 8px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* ---- The small pictures beside the day's stops --------------------------------------- */

.mini {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 2px 0 var(--ink);
}

.mini-h {
  font-weight: 700;
  margin-bottom: 8px;
}

.mini-f {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.mini ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mini-queue li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #f2eaed;
}

.mini-queue em {
  font-style: normal;
  color: var(--muted);
  white-space: nowrap;
}

.mini-slip {
  background: var(--pink);
  border-color: var(--rani);
  padding-bottom: 50px;
}

.slip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}

.slip-row b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
}

.slip-row.ok span:last-child {
  color: var(--green);
  font-weight: 700;
}

.mini-pick table {
  width: 100%;
  border-collapse: collapse;
}

.mini-pick td {
  padding: 4px 0;
  border-bottom: 1px solid #f2eaed;
}

.mini-pick td:first-child {
  width: 36px;
  font-weight: 700;
  color: var(--rani-dark);
}

.mini-pick td.num {
  text-align: right;
  white-space: nowrap;
}

.mini-inv {
  background: var(--yellow);
  border-color: var(--ink);
}

.mini-remind {
  background: #f3eee9;
}

.mini-remind .bubble {
  max-width: 100%;
}

.mini-sum dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.mini-sum dt {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mini-sum dd {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.2;
}
