/* Siftra admin styles. Deliberately plain: no build step, no framework. */

.siftra-wrap {
	max-width: 1100px;
}

.siftra-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.siftra-title .dashicons {
	font-size: 26px;
	width: 26px;
	height: 26px;
}

.siftra-lead {
	max-width: 780px;
	font-size: 14px;
	color: #50575e;
}

.siftra-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 20px 24px;
	margin: 18px 0;
	max-width: 980px;
}

.siftra-card h2 {
	margin-top: 0;
	font-size: 17px;
}

.siftra-card-start {
	border-left: 4px solid #2271b1;
}

.siftra-checks {
	margin: 6px 0 18px 20px;
	list-style: disc;
	color: #3c434a;
}

.siftra-checks li {
	margin-bottom: 2px;
}

.siftra-inline-field {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0;
}

.siftra-inline-field label {
	min-width: 170px;
}

.siftra-footnote {
	color: #646970;
	font-size: 12px;
	margin-top: 14px;
}

.siftra-hint {
	color: #50575e;
}

/* Progress */

.siftra-bar {
	height: 14px;
	background: #f0f0f1;
	border-radius: 7px;
	overflow: hidden;
	margin: 12px 0 8px;
}

.siftra-bar-inner {
	height: 100%;
	width: 0;
	background: #2271b1;
	transition: width 0.4s ease;
}

.siftra-progress-text {
	margin: 0 0 12px;
	font-weight: 600;
}

/* Summary cards.
   This is a list, not a row of divs: a screen reader announces "list, 4 items"
   and then reads each figure with its label, instead of running all four
   numbers together into one number soup. role="list" in the markup keeps the
   semantics even though list-style is removed. */

.siftra-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 8px;
	padding: 0;
	list-style: none;
}

.siftra-stat {
	flex: 1 1 170px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-left: 4px solid #a7aaad;
	border-radius: 4px;
	padding: 14px 16px;
}

.siftra-stat-error {
	border-left-color: #d63638;
}

.siftra-stat-warning {
	border-left-color: #dba617;
}

.siftra-stat-number {
	display: block;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
}

.siftra-stat-label {
	color: #646970;
	font-size: 12px;
}

.siftra-meta {
	color: #646970;
}

.siftra-rescan {
	margin: 6px 0 24px;
}

/* Findings */

.siftra-section-title {
	margin-top: 26px;
}

.siftra-rule {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	margin: 10px 0;
	max-width: 980px;
}

.siftra-rule summary {
	cursor: pointer;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}

/* display:flex removes the native disclosure triangle, so draw one. */
.siftra-rule summary::-webkit-details-marker {
	display: none;
}

.siftra-rule summary::marker {
	content: "";
}

.siftra-rule summary::before {
	content: "";
	flex: 0 0 auto;
	width: 0;
	height: 0;
	border-left: 6px solid #8c8f94;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	transform-origin: 30% 50%;
	transition: transform 0.15s ease;
}

.siftra-rule[open] > summary::before {
	transform: rotate(90deg);
}

.siftra-rule summary:hover {
	background: #f6f7f7;
}

.siftra-rule summary:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.siftra-rule-label {
	flex: 1 1 auto;
}

.siftra-wcag {
	color: #646970;
	font-size: 11px;
	font-weight: 400;
	background: #f0f0f1;
	border-radius: 3px;
	padding: 2px 6px;
}

.siftra-badge {
	display: inline-block;
	min-width: 26px;
	text-align: center;
	border-radius: 10px;
	padding: 1px 8px;
	color: #fff;
	font-size: 12px;
	line-height: 18px;
}

.siftra-badge-error {
	background: #d63638;
}

.siftra-badge-warning {
	background: #b26200;
}

.siftra-badge-notice {
	background: #646970;
}

.siftra-fix {
	margin: 0;
	padding: 12px 16px;
	background: #f6f7f7;
	border-top: 1px solid #f0f0f1;
	border-bottom: 1px solid #f0f0f1;
	color: #3c434a;
}

.siftra-table {
	border: 0;
	table-layout: fixed;
}

.siftra-table th {
	font-weight: 600;
}

.siftra-col-page {
	width: 30%;
}

.siftra-table th:nth-child(2),
.siftra-table td:nth-child(2) {
	width: 28%;
}

.siftra-url {
	display: block;
	/* #8c8f94 was 3.24:1 on white and fails AA at 11px. #646970 is 5.53:1. */
	color: #646970;
	font-size: 11px;
	word-break: break-all;
}

.siftra-selector,
.siftra-snippet {
	display: block;
	font-size: 11px;
	/* break-all splits "img" into "i / mg"; keep words intact and break at spaces first. */
	word-break: normal;
	overflow-wrap: break-word;
	background: #f6f7f7;
	padding: 4px 6px;
	border-radius: 3px;
	margin-top: 6px;
	color: #50575e;
}

.siftra-message {
	display: block;
}

.siftra-warning {
	background: #fcf9e8;
	border-left: 4px solid #dba617;
	padding: 10px 14px;
	margin: 12px 0;
}

/* Visible confirmation for copy actions. Also announced, because it carries role="status". */
.siftra-copy-status {
	display: inline-block;
	margin-left: 10px;
	color: #2271b1;
	font-weight: 600;
}
