/* pages/requests.css — Requests (blocked-site notice + "Ask a parent"), plus the
 * dashboard's "Requests waiting" panel. Page-specific styles only; the design system
 * (tokens, panels, buttons, msg, legend, empty state, lock note) lives in the shared
 * webkit (kit.css). Tokens only, so light + dark and AA contrast carry over; long
 * site, child and device names wrap, so there is no sideways scroll on a phone. */

.rq-head h1 { margin-bottom: 4px; }
.rq-intro { max-width: 62ch; margin: 0 0 var(--gap); }

/* Waiting / Recent switch: a quiet segmented control. The on state is --text on
 * --surface (AA in both themes); the count pill is --primary-strong on --primary-soft. */
.rq-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: var(--gap);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
}
.rq-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; background: none; padding: 6px 14px; border-radius: 8px; color: var(--text-muted);
}
.rq-tab:hover { background: var(--surface-3); color: var(--text); }
.rq-tab.on { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow); }
.rq-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong);
  font-size: 0.74rem; font-weight: 750; line-height: 1;
}

/* the list */
.rq-panel { padding-top: 4px; padding-bottom: 4px; }
.rq-panel > .lock-note { margin-top: 14px; }
.rq-list { list-style: none; margin: 0; padding: 0; }
.rq-item {
  display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.rq-list .rq-item:first-child { border-top: none; }
.rq-main { flex: 1 1 320px; min-width: 0; }
.rq-title {
  display: inline-block; max-width: 100%; font-weight: 700; font-size: 1rem; color: var(--text);
  overflow-wrap: anywhere; word-break: break-word;
}
a.rq-title { color: var(--text); }
a.rq-title:hover { color: var(--primary); }
.rq-title[tabindex="-1"]:focus { outline: none; }
.rq-title[tabindex="-1"]:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.rq-meta { font-size: 0.84rem; margin-top: 2px; overflow-wrap: anywhere; }
.rq-reason {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 8px;
  font-size: 0.88rem; color: var(--text); overflow-wrap: anywhere;
}
.rq-reason .ico-sm { flex: none; margin-top: 3px; color: var(--text-muted); }
/* Always-blocked (filter-bypass) requests: the reason glyph turns amber as a quiet
 * cue; the strong warning itself is the confirm dialog. */
.rq-item.is-risky .rq-reason .ico-sm { color: var(--warn); }
.rq-hosts { font-size: 0.82rem; margin-top: 6px; overflow-wrap: anywhere; }

.rq-side { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 0; }
.rq-status { display: inline-flex; align-items: center; gap: 7px; font-size: 0.84rem; font-weight: 650; text-align: right; }
.rq-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; background: var(--text-faint); }
.rq-s-pending { color: var(--warn); }
.rq-s-pending .rq-dot { background: var(--warn); }
.rq-s-allowed { color: var(--ok); }
.rq-s-allowed .rq-dot { background: var(--ok); }
.rq-s-declined { color: var(--danger); }
.rq-s-declined .rq-dot { background: var(--danger); }
.rq-s-expired { color: var(--text-muted); }
.rq-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.rq-actions button { padding: 7px 14px; }
.rq-error .msg { margin-bottom: 12px; }

/* dashboard "Requests waiting" (top 3) */
.rq-summary-slot:empty { display: none; }
.rq-summary-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 4px; }
.rq-summary-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.rq-summary-all { font-weight: 650; }
.rq-list-compact .rq-item { padding: 12px 0; }
.rq-list-compact .rq-side { align-self: center; }

@media (max-width: 640px) {
  .rq-tabs { display: flex; }
  .rq-tab { flex: 1 1 0; }
  .rq-side { width: 100%; align-items: stretch; }
  .rq-status { text-align: left; }
  .rq-actions { justify-content: stretch; }
  .rq-actions button { flex: 1 1 auto; }
  .rq-list-compact .rq-side { width: auto; }
}
