/* the law Johny studies: the areas with their bars, the texts with their state and what changed */
/* One file for one part of the application: a change of that part touches only this file. */
.law-areas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px 18px;
}
.law-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.law-area-head {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.badge.law-none {
  color: var(--muted);
}
.badge.law-good,
.badge.law-current {
  color: #166534;
}
.badge.law-little {
  color: #92400e;
}
.badge.law-old {
  color: #b91c1c;
  border-color: color-mix(in srgb, #b91c1c 45%, transparent);
}
html[data-theme='dark'] .badge.law-good,
html[data-theme='dark'] .badge.law-current {
  color: #86efac;
}
html[data-theme='dark'] .badge.law-little {
  color: #fcd34d;
}
html[data-theme='dark'] .badge.law-old {
  color: #fca5a5;
}
.law-doc.old .law-doc-main > b {
  color: var(--muted);
}
.law-doc-main {
  flex: 1 1 auto;
  min-width: 0;
}
.law-change {
  margin-top: 6px;
}
.law-change p {
  margin: 4px 0;
}
.law-fold {
  margin-top: 10px;
}
.law-fold > summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}
/* the list of the texts of the law: air between the title, the badges and the next text */
.law-doc {
  padding: 14px 0;
}
.law-doc-main > b {
  display: block;
  margin-bottom: 8px;
  line-height: 1.35;
}
.law-doc-main > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.law-doc-main > div .muted {
  line-height: 1.4;
}
.law-change {
  margin-top: 10px;
}
/* the buttons of a text stay in a row on the right, however long its title is */
.req-files li.law-doc {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
}
.req-files li.law-doc > a.btn,
.req-files li.law-doc > form {
  flex: none;
}
.req-files li.law-doc > .law-doc-main {
  flex: 1 1 0;
  min-width: 0;
}

/* the card of the scanned files being read */
.ocr-job {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 0;
}
.ocr-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ocr-main > b {
  line-height: 1.35;
}
.ocr-job > a.btn,
.ocr-job > form {
  flex: none;
}
.ocr-failed.badge {
  color: var(--bad, #b3261e);
}
.ocr-done.badge {
  color: #1a7f4b;
}
/* on a phone the buttons go under the text, in a row, so that the text keeps the whole width */
@media (max-width: 640px) {
  .ocr-job {
    flex-wrap: wrap;
  }
  .ocr-main {
    flex: 1 1 100%;
  }
}
