/* The inbox is a pile of customer driver's licenses. The band across the top
   wears the conversation's status colour, so the pile can be read at a glance. */
.licenses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.licenses > li { display: grid; }

.license {
  --band: var(--accent);
  --on-band: var(--on-accent);

  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background-color: var(--surface);
  background-image: repeating-radial-gradient(circle at 100% 0, transparent 0 11px, color-mix(in srgb, var(--accent) 7%, transparent) 11px 12px);
  box-shadow: 0 1px 0 var(--line), 0 10px 18px -14px rgb(0 0 0 / 0.45);
  color: var(--ink);
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

a.license:hover { color: var(--ink); transform: translateY(-2px) rotate(-0.4deg); box-shadow: 0 1px 0 var(--line), 0 14px 22px -14px rgb(0 0 0 / 0.5); }

.license--needs-reply { --band: var(--coral); }
.license--waiting { --band: var(--amber); --on-band: #22252d; }
.license--resolved { --band: var(--mint); }
.license--unread { border-color: var(--coral); }

.license__band {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.9rem;
  background: var(--band);
  color: var(--on-band);
  font: 700 0.75rem/1.2 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.license__issuer { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.license__kind { flex: none; opacity: 0.85; }

.license__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem 0.4rem;
}

.license__photo :is(.figure, .portrait) {
  display: block;
  width: 96px;
  height: 96px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
}

.license__fields {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 0.4rem 0.8rem;
  min-width: 0;
}

.license__field { display: grid; min-width: 0; font-size: 0.92rem; line-height: 1.3; }
.license__field--name, .license__field--wide { grid-column: 1 / -1; }

.license__label {
  color: var(--coral);
  font: 700 0.62rem/1.3 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.license__name {
  font: 800 1.15rem/1.15 var(--font-display);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.license__subject {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.license__number { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85rem; letter-spacing: 0.04em; }
.license__wait { white-space: nowrap; }

.license__excerpt {
  margin: 0.2rem 0.9rem 0.3rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.license__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.1rem 0.9rem 0.75rem;
}

.license__signature {
  min-width: 0;
  overflow: hidden;
  color: var(--accent-deep);
  font: 600 1.55rem/1.1 var(--font-hand);
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: rotate(-3deg);
  transform-origin: left bottom;
}

/* The faded second photo real licenses carry. */
.license__ghost {
  position: absolute;
  right: 0.9rem;
  bottom: 3rem;
  opacity: 0.1;
  pointer-events: none;
}

.license__ghost :is(.figure, .portrait) { display: block; width: 40px; height: 40px; }
.license__ghost .portrait { filter: grayscale(1); }

.license__stamp {
  position: absolute;
  top: 2.4rem;
  right: 0.8rem;
  padding: 0.05rem 0.45rem;
  border: 2.5px solid var(--coral);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--coral);
  font: 800 0.85rem/1.3 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(8deg);
}
