/* ==== Administration > Privacy requests (/admin/privacy, /admin/privacy/{id}; V1.44, Law 25): the log of the requests, a
   request's form and history, what each store holds about the person, the export and the deletion plan (prq-) ====
   Same look as the rest of OneStop (app.css: toolbar, panel, table, status, notice, hint, btn). Loaded by Components\App.razor
   for every page, after app.css. Pages: TTech.Platform.Client\Apps\Admin\PrivacyRequestsPage.razor and PrivacyRequestPage.razor.
   Every colour is a token of app.css (light and dark). Classes built in code: prq-due-late, prq-due-soon, prq-due-ok, prq-due-done
   (the deadline), prq-act-<action> (Delete, Anonymize, Keep, Review, Expires), prq-state-<state> (Found, None, NotAvailable,
   Failed). Phones: the form one column, the tables scroll (700 px and below). */

/* ---- The form (a new request, a request's details) ---- */
.prq-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.prq-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.prq-field.prq-wide { grid-column: 1 / -1; }
.prq-field input, .prq-field select, .prq-field textarea {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
}
.prq-field textarea { min-height: 70px; resize: vertical; }
.prq-field input:focus, .prq-field select:focus, .prq-field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.prq-actions { display: flex; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; gap: 8px; }
.prq-error { color: var(--bad); font-size: 0.82rem; font-weight: 700; }
.prq-law { margin: 0 0 10px; }

/* ---- The deadline (30 days from the receipt) ---- */
.prq-due { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.76rem; font-weight: 800; white-space: nowrap; }
.prq-due-ok { background: var(--good-soft); color: var(--good-text); }
.prq-due-soon { background: var(--warn-soft); color: var(--warn); }
.prq-due-late { background: var(--bad-soft); color: var(--bad); }
.prq-due-done { background: var(--chip); color: var(--muted); }

/* ---- A request's head ---- */
.prq-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.prq-head h2 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.prq-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; color: var(--muted); font-size: 0.84rem; }
.prq-facts strong { color: var(--text); }

/* ---- What was searched for, and the stores ---- */
.prq-searched { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.prq-term { padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--chip-text); font-size: 0.78rem; font-family: var(--mono, monospace); }
.prq-db { margin: 14px 0 6px; font-size: 0.95rem; font-weight: 900; }
.prq-stores { display: flex; flex-direction: column; gap: 6px; }
.prq-store { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.prq-store > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; cursor: pointer; list-style: none; }
.prq-store > summary::-webkit-details-marker { display: none; }
.prq-store > summary::before { content: "▸"; color: var(--muted); }
.prq-store[open] > summary::before { content: "▾"; }
.prq-store-name { font-weight: 800; }
.prq-store-table { color: var(--muted); font-size: 0.78rem; font-family: var(--mono, monospace); }
.prq-count { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; }
.prq-store-body { padding: 0 12px 10px; }
.prq-store-body .table td { max-width: 320px; overflow-wrap: anywhere; vertical-align: top; }
.prq-include { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.prq-state-None .prq-store-name, .prq-state-NotAvailable .prq-store-name { color: var(--muted); font-weight: 600; }
.prq-state-NotAvailable, .prq-state-Failed { background: var(--panel-2, var(--panel)); }
.prq-state-Failed > summary .prq-count { color: var(--bad); }
.prq-message { margin: 0 0 6px; color: var(--muted); font-size: 0.8rem; }

/* ---- The deletion plan ---- */
.prq-act { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.prq-act-Delete { background: var(--bad-soft); color: var(--bad); }
.prq-act-Anonymize { background: var(--info-soft); color: var(--info); }
.prq-act-Keep { background: var(--gold-soft); color: var(--gold-text); }
.prq-act-Review { background: var(--note-soft); color: var(--warn); }
.prq-act-Expires { background: var(--chip); color: var(--muted); }
.prq-plan td { vertical-align: top; }
.prq-plan .prq-why { color: var(--muted); font-size: 0.8rem; }
.prq-sql {
  max-height: 420px;
  margin: 8px 0 0;
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre;
}

/* ---- The history ---- */
.prq-events td { vertical-align: top; }
.prq-events .prq-detail { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .prq-form { grid-template-columns: minmax(0, 1fr); }
  .prq-count { margin-left: 0; }
}
