/* MetaCert presentation layer. All selectors are scoped to the plugin. */

.page_metacert_certificates,
.page_metacert_verify {
	--metacert-ink: #2f2f2f;
	--metacert-muted: #666;
	--metacert-border: #d6d6d6;
	--metacert-border-strong: #b7b7b7;
	--metacert-surface: #fff;
	--metacert-surface-soft: #f5f5f5;
	--metacert-surface-hover: #ececec;
	color: var(--metacert-ink);
}

.metacert-page-header {
	margin: 0 0 1.75rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid #dedede;
}

.metacert-page-heading {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.metacert-page-header h1 {
	margin: 0;
	color: inherit;
}

.metacert-lead {
	max-width: 48rem;
	margin: .5rem 0 0;
	color: var(--metacert-muted);
	line-height: 1.6;
}

.metacert-heading-icon,
.metacert-review-card-icon,
.metacert-verification-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid #c9c9c9;
	border-radius: 50%;
	background: #f2f2f2;
	color: #3d3d3d;
}

.metacert-heading-icon svg,
.metacert-review-card-icon svg,
.metacert-verification-icon svg {
	width: 1.5rem;
	height: 1.5rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.metacert-table-panel {
	overflow: hidden;
	border: 1px solid var(--metacert-border-strong);
	border-radius: 5px;
	background: var(--metacert-surface);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.metacert-table-scroll {
	overflow-x: auto;
}

.metacert-table-scroll:focus {
	outline: 2px solid #555;
	outline-offset: -2px;
}

.metacert-table {
	width: 100%;
	min-width: 760px;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	background: var(--metacert-surface);
	font-size: .9rem;
}

.metacert-table th,
.metacert-table td {
	padding: .9rem 1rem;
	border-right: 1px solid var(--metacert-border);
	border-bottom: 1px solid var(--metacert-border);
	text-align: left;
	vertical-align: middle;
}

.metacert-table th:last-child,
.metacert-table td:last-child {
	border-right: 0;
}

.metacert-table tbody tr:last-child td {
	border-bottom: 0;
}

.metacert-table thead th {
	background: var(--metacert-surface-soft);
	color: #3b3b3b;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .025em;
	text-transform: uppercase;
}

.metacert-table tbody tr:nth-child(even) {
	background: #fafafa;
}

.metacert-table tbody tr:hover {
	background: var(--metacert-surface-hover);
}

.metacert-table-actions,
.metacert-action-cell {
	width: 1%;
	text-align: center !important;
	white-space: nowrap;
}

.metacert-title-cell {
	min-width: 15rem;
	font-weight: 600;
	line-height: 1.45;
}

.metacert-date {
	white-space: nowrap;
}

.metacert-code,
.metacert-detail--code code {
	display: inline-block;
	padding: .2rem .45rem;
	border: 1px solid #d0d0d0;
	border-radius: 3px;
	background: #f4f4f4;
	color: #333;
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: .82rem;
	font-weight: 600;
	white-space: nowrap;
}

.metacert-empty-value {
	color: #888;
}

.metacert-status {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .25rem .55rem;
	border: 1px solid #c7c7c7;
	border-radius: 999px;
	background: #f3f3f3;
	color: #444;
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.metacert-status::before {
	width: .45rem;
	height: .45rem;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	content: "";
}

.metacert-status--issued {
	border-color: #555;
	background: #4a4a4a;
	color: #fff;
}

.metacert-status--issued::before {
	border-color: #fff;
	background: #fff;
}

.metacert-status--pending {
	border-style: dashed;
}

.metacert-status--failed {
	border-color: #777;
	background: #e7e7e7;
	color: #2f2f2f;
}

.metacert-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	box-sizing: border-box;
	min-height: 2.35rem;
	padding: .45rem .8rem;
	border: 1px solid #3f3f3f;
	border-radius: 4px;
	font-family: inherit;
	font-size: .82rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.metacert-button--primary,
a.metacert-button--primary,
button.metacert-button--primary {
	background: #444;
	color: #fff !important;
}

.metacert-button--primary:hover,
.metacert-button--primary:focus {
	border-color: #272727;
	background: #272727;
	color: #fff !important;
}

.metacert-button--secondary,
a.metacert-button--secondary {
	border-color: #aaa;
	background: #fff;
	color: #333 !important;
}

.metacert-button--secondary:hover,
.metacert-button--secondary:focus {
	border-color: #666;
	background: #ededed;
	color: #222 !important;
}

.metacert-button:focus-visible,
.metacert-header-link:focus-visible {
	outline: 3px solid rgba(60, 60, 60, .28);
	outline-offset: 2px;
}

.metacert-icon {
	width: 1.05rem;
	height: 1.05rem;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.metacert-action-form {
	display: inline-flex;
	margin: 0;
}

.metacert-empty-state {
	padding: 3rem 1.5rem;
	border: 1px solid var(--metacert-border);
	border-radius: 5px;
	background: var(--metacert-surface-soft);
	text-align: center;
}

.metacert-empty-state h2 {
	margin: 1rem 0 .4rem;
	font-size: 1.15rem;
}

.metacert-empty-state p {
	max-width: 34rem;
	margin: 0 auto;
	color: var(--metacert-muted);
}

.metacert-empty-icon {
	width: 2.25rem;
	height: 2.25rem;
	fill: none;
	stroke: #555;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.metacert-review-card {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-top: 1.5rem;
	padding: 1.25rem;
	border: 1px solid #cfcfcf;
	border-left: 4px solid #555;
	border-radius: 4px;
	background: #f8f8f8;
	color: #333;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.metacert-review-card-content {
	min-width: 0;
}

.metacert-review-card h3 {
	margin: 0;
	font-size: 1rem;
}

.metacert-review-card p {
	margin: .35rem 0 0;
	color: #606060;
}

.metacert-review-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin-top: 1rem;
}

.metacert-header-action {
	display: flex;
	align-items: center;
	padding: 0 .35rem;
}

.metacert-header-action .metacert-header-link {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	box-sizing: border-box;
	min-height: 2.25rem;
	padding: .4rem .7rem;
	border: 1px solid #bdbdbd;
	border-radius: 4px;
	background: #f2f2f2;
	color: #353535 !important;
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
}

.metacert-header-action .metacert-header-link:hover,
.metacert-header-action .metacert-header-link:focus {
	border-color: #898989;
	background: #e3e3e3;
	color: #222 !important;
}

.metacert-page-header--verification {
	max-width: 50rem;
	margin-right: auto;
	margin-left: auto;
	text-align: center;
}

.metacert-verification-card {
	max-width: 50rem;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid var(--metacert-border-strong);
	border-radius: 6px;
	background: var(--metacert-surface);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.metacert-verification-status {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
	border-bottom: 1px solid var(--metacert-border);
	background: var(--metacert-surface-soft);
}

.metacert-verification-card .metacert-verification-icon {
	width: 3.25rem;
	height: 3.25rem;
	border-color: #444;
	background: #444;
	color: #fff;
}

.metacert-verification-card--invalid .metacert-verification-icon {
	border-color: #888;
	background: #e7e7e7;
	color: #444;
}

.metacert-verification-status h2 {
	margin: .15rem 0 0;
	font-size: 1.35rem;
	line-height: 1.3;
}

.metacert-verification-status p:last-child {
	margin: .45rem 0 0;
	color: var(--metacert-muted);
}

.metacert-eyebrow {
	margin: 0;
	color: var(--metacert-muted);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
}

.metacert-verification-body {
	padding: 1.5rem;
}

.metacert-verification-body h3 {
	margin: 0 0 1rem;
	font-size: 1rem;
}

.metacert-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	border-top: 1px solid var(--metacert-border);
	border-left: 1px solid var(--metacert-border);
}

.metacert-detail {
	min-width: 0;
	padding: 1rem;
	border-right: 1px solid var(--metacert-border);
	border-bottom: 1px solid var(--metacert-border);
}

.metacert-detail--wide,
.metacert-detail--code {
	grid-column: 1 / -1;
}

.metacert-detail dt {
	margin: 0 0 .3rem;
	color: var(--metacert-muted);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .025em;
	text-transform: uppercase;
}

.metacert-detail dd {
	margin: 0;
	color: var(--metacert-ink);
	font-weight: 600;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.metacert-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 700px) {
	.metacert-page-heading,
	.metacert-review-card,
	.metacert-verification-status {
		align-items: flex-start;
	}

	.metacert-heading-icon {
		width: 2.4rem;
		height: 2.4rem;
	}

	.metacert-details {
		grid-template-columns: 1fr;
	}

	.metacert-detail,
	.metacert-detail--wide,
	.metacert-detail--code {
		grid-column: 1;
	}

	.metacert-review-actions,
	.metacert-review-actions .metacert-action-form,
	.metacert-review-actions .metacert-button {
		width: 100%;
	}

	.metacert-header-action .metacert-header-link span {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.metacert-button {
		transition: none;
	}
}
