/* Table, quote and link list of the RUB web components (design/README.md).
   Part of the RUB Chair theme. */

/* Tables (staff lists, course lists): header in semi-bold, rows divided by
   fine lines. Scoped to core table blocks: a table another block renders
   (e.g. rub-chair/people-table) brings its own look. The style “Plain” has
   none (.is-style-rub-plain on the figure). */
.rub-table table,
.rub-content .wp-block-table:not(.is-style-rub-plain) table {
	border-collapse: collapse;
	font-size: 1rem;
	/* The library's table cells: Body Small 16/24, padding 12. */
	line-height: 1.5rem;
	width: 100%;
}

.rub-table :where(th, td),
.rub-content .wp-block-table:not(.is-style-rub-plain) :where(th, td) {
	border: 0;
	border-bottom: 1px solid var(--rub-line);
	padding: 0.75rem;
	text-align: left;
	vertical-align: top;
}

.rub-table th,
.rub-content .wp-block-table:not(.is-style-rub-plain) th {
	font-weight: 600;
}

.rub-content .wp-block-table :where(thead) {
	border-bottom: 0;
}

/* Style “Stripes”: no lines; the header and every second row light. */
.rub-content .wp-block-table.is-style-stripes {
	border-bottom: 0;
}

.rub-content .wp-block-table.is-style-stripes :where(th, td) {
	border-bottom: 0;
}

.rub-content .wp-block-table.is-style-stripes :is(thead tr, tbody tr:nth-child(even)) {
	background-color: var(--rub-subtle);
}

.rub-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: transparent;
}

/* Quote: the words large and extra bold in RUB Blau, no line; who said it
   below in running text. */
.rub-content .wp-block-quote {
	border: 0;
	color: var(--rub-blue);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 800;
	line-height: 1.22;
	margin-inline: 0;
	padding: 0;
}

.rub-content .wp-block-quote p {
	margin: 0;
}

.rub-content .wp-block-quote cite {
	color: var(--wp--preset--color--contrast);
	display: block;
	font-size: var(--wp--preset--font-size--medium);
	font-style: normal;
	font-weight: 400;
	line-height: 1.667;
	margin-top: 0.75rem;
}

/* List style “Link list”: one link per line with an arrow before it, as the
   link of the RUB web components (“→ Link text”), e.g. “Useful links”. */
.rub-content .is-style-rub-link-list {
	list-style: none;
	padding-left: 0;
}

.rub-content .is-style-rub-link-list li {
	margin-block: 0.5rem;
}

.rub-content .is-style-rub-link-list a {
	align-items: baseline;
	display: inline-flex;
	font-weight: 600;
	gap: 0.5rem;
}

.rub-content .is-style-rub-link-list a::before {
	align-self: center;
	background-color: currentColor;
	content: "";
	flex: none;
	height: 1.25rem;
	mask: url("../icons/arrow-right.svg") center / contain no-repeat;
	width: 1.25rem;
}

/* An ORCID iD is one number: don't break it at its hyphens. Only where the
   link shows the iD itself (contact lines); a link with a name as its text
   (“… on ORCID”) must wrap, or it sticks out on phones. */
:is(.rub-person-details__line--orcid, .is-style-rub-contact-lines li) a[href*="orcid.org/"] {
	white-space: nowrap;
}
