/* /fix: the supplier picker, the approval cards (a plot before and after) and the downloads.
   Builds on check.css. */

.pick { display: grid; gap: 8px; margin: 0 0 18px; max-width: 520px; }
.pick label { font-weight: 650; }
.pick select, .pick input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; }
.pick p { margin: 0; }
.pick__name { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.pick__row { display: flex; gap: 8px; }
.pick__row input { flex: 1; min-width: 0; }

.drop.is-waiting { opacity: 0.55; }

.results section > h2, .downloads h2 { margin: 14px 0 6px; }
.results section > p { margin: 0 0 10px; max-width: 78ch; }

.approvals { display: grid; gap: 16px; }
.approval { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 16px 18px; display: grid; gap: 12px; }
.approval.is-approved { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.approval.is-skipped { opacity: 0.6; }
.approval__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.approval__head h3 { font-family: var(--font-mono); font-size: 1rem; margin: 0; display: inline; }
.approval__head div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.approval__buttons { display: flex; gap: 8px; }
.approval.is-approved .approval__buttons button:first-child { background: var(--ok); border-color: var(--ok); }
.approval__what { margin: 0; padding-left: 1.1em; display: grid; gap: 2px; }
.approval__body { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 720px) { .approval__body { grid-template-columns: minmax(0, 1fr); } }
.approval__figure { display: grid; gap: 6px; }
.approval__legend { margin: 0; display: flex; gap: 16px; color: var(--muted); }
.approval__side { display: grid; gap: 10px; justify-items: start; }
.approval__side p { margin: 0; max-width: 40ch; }
.approval__facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 0.93rem; }
.approval__facts dt { color: var(--muted); }
.approval__facts dd { margin: 0; font-family: var(--font-mono); font-size: 0.88rem; }
.approval__map { margin: 0; max-width: 78ch; }
.is-over { color: var(--bad); font-weight: 600; }

.plotview { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); }
.plotview path.is-after, .plotview circle.is-after { fill: var(--ok); fill-opacity: 0.22; stroke: var(--ok); stroke-width: 2; stroke-linejoin: round; fill-rule: evenodd; }
.plotview path.is-before, .plotview circle.is-before { fill: none; stroke: var(--warn); stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; }
.plotview__scale path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.plotview__scale text { font-family: var(--font-mono); font-size: 11px; fill: var(--ink); }
/* over map images the lines need to stand out against any colour */
.plotview.has-map path.is-after, .plotview.has-map circle.is-after { stroke: #0b6b47; fill: #0b6b47; fill-opacity: 0.18; stroke-width: 2.5; }
.plotview.has-map path.is-before, .plotview.has-map circle.is-before { stroke: #b54708; stroke-width: 2.5; }
.plotview.has-map .plotview__scale path { stroke: #14201b; }
.plotview.has-map .plotview__scale text { fill: #14201b; paint-order: stroke; stroke: #fff; stroke-width: 3px; }

.key { display: inline-flex; align-items: center; gap: 6px; }
.key::before { content: ""; width: 22px; height: 0; border-top: 2px solid var(--ok); }
.key.is-before::before { border-top: 2px dashed var(--warn); }

.locator { width: 132px; height: 132px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); }
.locator__land { fill: var(--surface); stroke: var(--muted); stroke-width: 1; stroke-linejoin: round; }
.locator circle.is-after { fill: var(--ok); stroke: var(--surface); stroke-width: 1.5; }
.locator circle.is-before { fill: var(--warn); stroke: var(--surface); stroke-width: 1.5; }

.review { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.review summary { padding: 12px 14px; cursor: pointer; font-weight: 650; }
.review .console { border: 0; border-top: 1px solid var(--line); border-radius: 0; }

.downloads { border: 1px solid var(--accent); border-radius: 12px; padding: 16px 18px; background: var(--surface); display: grid; gap: 10px; }
.downloads h2, .downloads p { margin: 0; }
.downloads__links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* narrow screens: nothing may be wider than the page */
#fix .results { grid-template-columns: minmax(0, 1fr); }
#fix .results > *, .approvals, .approval, .approval > *, .approval__body > *, .downloads > * { min-width: 0; }
.approval { grid-template-columns: minmax(0, 1fr); }
.approval__what li, .approval__map, .downloads p { overflow-wrap: anywhere; }
.downloads { grid-template-columns: minmax(0, 1fr); }
.downloads__links .btn { white-space: normal; text-align: left; }

/* approving one type of fix at a time */
.bulk { display: grid; gap: 10px; margin: 0 0 12px; }
.bulk__row { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface); padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.bulk__row p { margin: 0; }
.bulk__list { display: grid; gap: 10px; min-width: 0; }
.bulk__list .table-scroll { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.bulk__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* the two positions of a plot whose latitude and longitude were the wrong way round */
.approval__dots { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dot { display: inline-flex; align-items: center; gap: 6px; }
.dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.dot.is-before::before { background: var(--warn); }
#build { justify-self: start; }
#build[hidden] { display: none; }
