/* Regulatory mention quotes (Coverage and Findings): the passage, its page and section, and a table
   excerpt when the passage came from a table. Split out of regulatory.css. The excerpt table itself
   (.src-excerpt-*) is shared with the source viewer and lives in components.css. */

.reg-quote { margin: 0; }
.reg-quote mark, .reg-quote-link mark {
    background: var(--color-warning-tint); border-bottom: 2px solid var(--color-warning);
    padding: 1px 0; color: inherit;
}

/* One mention: the quote is the doorway to the source viewer, on the assignment table's quote-link
   pattern (pointer, hover underline, a small document icon that brightens). Page and section sit
   at the right; a pending mention adds a full-width strip with the rationale and the decision.
   The right column is bounded: a long section path used to size it to its full length (it was
   nowrap in an auto column) and squeeze the quote to a single character per line. */
.reg-quote-row {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, clamp(9rem, 28%, 18rem));
    gap: var(--space-2) var(--space-4); align-items: start; padding: var(--space-2) 0;
}
.reg-quote-row + .reg-quote-row { border-top: 1px solid var(--color-border-light); }
.reg-quote-link {
    display: block; min-width: 0; cursor: pointer; line-height: 1.5; font-size: var(--text-subhead); color: var(--color-navy);
    overflow-wrap: break-word;
    min-height: 24px; padding: var(--space-1) 0; /* the whole passage is the source-opening target */
}
.reg-quote-link:hover { color: var(--color-text-link-hover); text-decoration: underline; text-underline-offset: 3px; }
.reg-quote-link:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
.reg-quote-ico {
    width: 13px; height: 13px; margin-left: var(--space-1); vertical-align: -1px;
    color: var(--color-service-grey); opacity: .55; transition: opacity var(--duration-fast);
}
.reg-quote-link:hover .reg-quote-ico, .reg-quote-link:focus-visible .reg-quote-ico { opacity: 1; color: var(--color-text-link-hover); }
.reg-quote-src {
    min-width: 0; font-size: var(--text-caption1); color: var(--color-service-grey);
    text-align: right; overflow-wrap: anywhere;
}
.reg-quote-src b { display: block; font-weight: var(--font-regular); color: var(--color-navy); }
/* The section path is the list of headings the chunk covers, not the mention's own heading: clamp it
   to two lines; the full path is in the title tooltip. */
.reg-quote-path {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.reg-quote-src .reg-status { white-space: normal; justify-content: flex-end; margin-top: var(--space-1); }
.reg-quote-pend {
    grid-column: 1 / -1; background: var(--color-surface);
    border-left: 3px solid var(--color-warning); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: var(--space-2) var(--space-3);
}
.reg-quote-pend .reg-actions { margin-top: var(--space-2); }
@media (max-width: 720px) {
    .reg-quote-row { grid-template-columns: minmax(0, 1fr); }
    .reg-quote-src { text-align: left; }
    .reg-quote-src .reg-status { justify-content: flex-start; }
}

/* A table excerpt. The scroll container is the source-viewer button itself (it is focusable, so the
   keyboard can scroll it), which keeps a wide table inside the card instead of widening the page. */
.reg-quote-link:has(.src-excerpt-table), .reg-quote:has(.src-excerpt-table) { max-width: 100%; overflow-x: auto; }
.reg-quote:has(.src-excerpt-table):focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
.reg-quote-link:hover .src-excerpt-table { text-decoration: none; }
/* A styled scrollbar is always drawn (overlay scrollbars hide on macOS), so a table that is wider than
   the card visibly scrolls instead of looking cut off. */
.reg-quote-link:has(.src-excerpt-table)::-webkit-scrollbar, .reg-quote:has(.src-excerpt-table)::-webkit-scrollbar { height: 8px; }
.reg-quote-link:has(.src-excerpt-table)::-webkit-scrollbar-track, .reg-quote:has(.src-excerpt-table)::-webkit-scrollbar-track { background: var(--color-border-light); }
.reg-quote-link:has(.src-excerpt-table)::-webkit-scrollbar-thumb, .reg-quote:has(.src-excerpt-table)::-webkit-scrollbar-thumb { background: var(--color-service-grey); border-radius: 4px; }
