/**
 * MAS Core - blueprint frames (0.11.0).
 *
 * The design's signature: a hairline box with "+" registration marks 6px
 * outside each corner (11px arms, 55% ink). Until 0.11.0 only the cards drew
 * it. This sheet makes it reusable and applies it to:
 *
 *   .mas-blueprint            any element (the function "Short answer" box)
 *   .wp-block-table           every table in single post, function, play and
 *                             model bodies (the design's framed worked example)
 *
 * Loaded on those single views only (MAS_Core_Single_Styles).
 */

.mas-blueprint,
.entry-content .wp-block-table {
	position: relative;
	border: 1px solid var(--mas-rule);
	border-radius: var(--mas-radius);
}

.mas-blueprint::after,
.entry-content .wp-block-table::after {
	content: "";
	position: absolute;
	inset: -6px;
	pointer-events: none;
	background-repeat: no-repeat;
	background-image:
		linear-gradient(rgba(15, 23, 42, 0.55) 0 0), linear-gradient(rgba(15, 23, 42, 0.55) 0 0),
		linear-gradient(rgba(15, 23, 42, 0.55) 0 0), linear-gradient(rgba(15, 23, 42, 0.55) 0 0),
		linear-gradient(rgba(15, 23, 42, 0.55) 0 0), linear-gradient(rgba(15, 23, 42, 0.55) 0 0),
		linear-gradient(rgba(15, 23, 42, 0.55) 0 0), linear-gradient(rgba(15, 23, 42, 0.55) 0 0);
	background-size:
		1px 11px, 11px 1px,
		1px 11px, 11px 1px,
		1px 11px, 11px 1px,
		1px 11px, 11px 1px;
	background-position:
		left 5px top 0, left 0 top 5px,
		right 5px top 0, right 0 top 5px,
		left 5px bottom 0, left 0 bottom 5px,
		right 5px bottom 0, right 0 bottom 5px;
}

/* Framed tables. The frame sits on the figure, and overflow stays visible so
   the corner marks are never clipped. A table wider than the column (phones)
   scrolls inside .mas-table-scroll, a wrapper MAS_Core_Single_Styles adds
   around the <table> (0.11.1), so the last column is never cut off. */

.entry-content .wp-block-table {
	margin: 1.5rem 6px;
	padding: 4px 8px;
	overflow: visible;
}

.entry-content .wp-block-table .mas-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.entry-content .wp-block-table table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 14px;
}

.entry-content .wp-block-table th {
	padding: 8px;
	border: 0;
	border-bottom: 1px solid var(--mas-rule);
	color: var(--mas-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-align: left;
	text-transform: uppercase;
}

.entry-content .wp-block-table td {
	padding: 8px;
	overflow-wrap: break-word;
	border: 0;
	border-bottom: 1px solid var(--mas-rule-soft);
	color: var(--mas-ink);
}

.entry-content .wp-block-table tbody tr:last-child td {
	border-bottom: 0;
}

.entry-content .wp-block-table figcaption {
	margin: 6px 0 2px;
	color: var(--mas-muted);
	font-size: 13px;
}
