/* The page's actions and the Findings report (app-report.js). Quiet and Shopify-simple (Dusan, 16. 11.). */

/* Export and Report stand on the title's row, at the sheet's top right, as Shopify's Orders has Export and Create
   order. The title is drawn by app.js above the screens (see .screens > .page-title in app.css), so the actions are
   moved up onto its row from inside their own screen: its centre is 30px above the screen's first line, 24px on a phone. */
.screen.has-actions { position: relative; }
.page-actions { position: absolute; z-index: 2; top: -45px; right: calc(19px - var(--to-edge)); display: flex; gap: 8px; }
@media (max-width: 767px) { .page-actions { top: -39px; } }

/* ---------- The report, in a dialog ---------- */
.report-dialog { width: min(760px, calc(100vw - 32px)); }
.report-dialog[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; }
.rp-scope { margin-top: 6px; font-size: 13.5px; color: var(--mute); overflow-wrap: anywhere; }
.rp-body { min-height: 0; overflow-y: auto; margin: 16px -24px 0; padding: 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rp-body > .skeleton, .rp-body > .state { padding: 18px 0; }
.rp-quiet { padding: 14px 0; font-size: 14px; color: var(--mute); }
.rp-empty { padding: 28px 0; text-align: center; font-size: 15px; color: var(--ink-2); }
.rp-note { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-md); background: var(--app-tile); font-size: 13.5px; color: var(--ink-2); }
.rp-sec { padding: 16px 0 18px; }
.rp-sec + .rp-sec { border-top: 1px solid var(--line); }
.rp-h { margin: 0 0 10px; font-size: 13px; font-weight: 560; letter-spacing: 0; color: var(--ink-2); }
.rp-total { margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.rp-total b { font-size: 26px; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.rp-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.rp-counts div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rp-counts dt { color: var(--ink-2); }
.rp-counts dd { margin: 0; font-weight: 500; color: var(--ink); }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rp-table th, .rp-table td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.rp-table thead th { font-size: 12.5px; font-weight: 500; color: var(--mute); }
.rp-table tbody th { color: var(--ink); }
.rp-table .num { text-align: right; padding-right: 0; }
.rp-table th.num + th, .rp-table td.num + td { padding-left: 20px; }
.rp-serious { display: grid; list-style: none; margin: 0; padding: 0; }
.rp-serious li { display: grid; gap: 4px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rp-link { font-size: 13.5px; line-height: 1.45; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.rp-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.rp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--mute); }
@media (max-width: 767px) {
  .rp-pair { grid-template-columns: minmax(0, 1fr); }
  .report-dialog .modal-actions .btn { flex: 1 1 auto; }
}

/* ---------- On paper ---------- */
/* The print copy is never seen on screen; on paper it is the only thing there is: black on white, the organization,
   the scope and the time it was made at the top. */
.report-print { display: none; }
@media print {
  @page { margin: 16mm; }
  html, body { background: #fff !important; }
  body > *:not(.report-print) { display: none !important; }
  .report-print { display: block !important; max-width: none; margin: 0; padding: 0; background: #fff; color: #000; font: 11pt/1.45 "Helvetica Neue", Arial, sans-serif; }
  .report-print *, .report-print *::before, .report-print *::after { background: none !important; color: #000 !important; box-shadow: none !important; border-color: #000 !important; animation: none !important; }
  .report-print .rp-org { margin: 0; font-size: 18pt; font-weight: 600; }
  .report-print .rp-domain { margin: 0 0 10pt; font-size: 10pt; }
  .report-print h2 { margin: 0; font-size: 14pt; font-weight: 600; }
  .report-print .rp-scope, .report-print .rp-generated { margin: 2pt 0 0; padding: 0; font-size: 10pt; }
  .report-print .rp-generated { margin-bottom: 12pt; }
  .report-print .rp-sec { padding: 10pt 0 6pt; border-top: 0.5pt solid #000; break-inside: avoid; }
  .report-print .rp-sec:first-child { border-top: 0; }
  .report-print .rp-h { margin: 0 0 6pt; font-size: 11pt; font-weight: 600; }
  .report-print .rp-total b { font-size: 16pt; }
  .report-print a { text-decoration: none; }
  .report-print .rp-table th, .report-print .rp-table td, .report-print .rp-counts div, .report-print .rp-serious li { border-bottom: 0.5pt solid #999 !important; }
  .report-print .rp-serious li, .report-print .rp-table tr { break-inside: avoid; }
}
