/*
 * WP Octo Connect: a light layer over the theme. Colours derive from the text colour, so the
 * output follows the theme in light and dark. Override the custom properties to adjust.
 */
.wpocto-connect {
	--wpocto-gap: 1.5rem;
	--wpocto-radius: 0.5rem;
	--wpocto-border: color-mix(in srgb, currentColor 15%, transparent);
	--wpocto-muted: color-mix(in srgb, currentColor 70%, transparent);
	--wpocto-surface: color-mix(in srgb, currentColor 4%, transparent);
	--wpocto-accent: var(--wp--preset--color--primary, currentColor);
}

.wpocto-roadmap__heading,
.wpocto-subprocessors__heading,
.wpocto-agreement__title {
	margin: 0 0 1rem;
	font-weight: 600;
}

.wpocto-connect__notice {
	padding: 1rem;
	border: 1px dashed var(--wpocto-border);
	border-radius: var(--wpocto-radius);
	color: var(--wpocto-muted);
}

/* Cards: roadmap items and plans */
.wpocto-roadmap__list,
.wpocto-plans__list,
.wpocto-plan__features,
.wpocto-subprocessors__upcoming {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpocto-roadmap__list,
.wpocto-plans__list {
	display: grid;
	gap: var(--wpocto-gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.wpocto-roadmap__group + .wpocto-roadmap__group {
	margin-top: calc(var(--wpocto-gap) * 2);
}

.wpocto-card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	height: 100%;
	padding: 1.25rem;
	border: 1px solid var(--wpocto-border);
	border-radius: var(--wpocto-radius);
	background: var(--wpocto-surface);
}

.wpocto-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}

.wpocto-card__title,
.wpocto-card__text {
	margin: 0;
}

.wpocto-card__title {
	font-weight: 600;
}

.wpocto-card__text {
	color: var(--wpocto-muted);
}

.wpocto-card__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin-top: auto;
	font-size: 0.875em;
}

.wpocto-badge {
	flex-shrink: 0;
	padding: 0.125rem 0.5rem;
	border: 1px solid var(--wpocto-border);
	border-radius: 999px;
	font-size: 0.75em;
	line-height: 1.6;
	white-space: nowrap;
}

.wpocto-badge--featured {
	border-color: var(--wpocto-accent);
	color: var(--wpocto-accent);
}

.wpocto-roadmap__votes,
.wpocto-roadmap__updated,
.wpocto-agreement__meta,
.wpocto-subprocessors__date {
	color: var(--wpocto-muted);
}

/* Plans */
.wpocto-plan--featured {
	border-color: var(--wpocto-accent);
}

.wpocto-plan__amount {
	margin: 0 0 0.5rem;
}

.wpocto-plan__value {
	font-size: 1.75em;
	font-weight: 700;
}

.wpocto-plan__interval {
	color: var(--wpocto-muted);
}

.wpocto-button {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid currentColor;
	border-radius: var(--wpocto-radius);
	text-decoration: none;
}

.wpocto-plan__features li {
	padding: 0.25rem 0 0.25rem 1.5rem;
	position: relative;
}

.wpocto-plan__features li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var(--wpocto-accent);
}

/* Agreement */
.wpocto-agreement__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	font-size: 0.875em;
}

.wpocto-agreement__body :where(h2, h3, h4, h5, h6) {
	margin: 1.5em 0 0.5em;
	font-weight: 600;
}

.wpocto-agreement__body :where(p, ul, ol, dl, table, blockquote, pre) {
	margin: 0 0 1em;
}

.wpocto-agreement__body :where(ul) {
	padding-left: 1.5em;
	list-style: disc;
}

.wpocto-agreement__body :where(ol) {
	padding-left: 1.5em;
	list-style: decimal;
}

.wpocto-agreement__body :where(a) {
	text-decoration: underline;
}

.wpocto-agreement__body :where(th, td) {
	padding: 0.375rem 0.75rem;
	border: 1px solid var(--wpocto-border);
	text-align: left;
}

/* Subprocessors */
.wpocto-table-wrap {
	overflow-x: auto;
}

.wpocto-table {
	width: 100%;
	border-collapse: collapse;
}

.wpocto-table th,
.wpocto-table td {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--wpocto-border);
	text-align: left;
	vertical-align: top;
}

.wpocto-subprocessors__heading {
	margin-top: 2rem;
}

.wpocto-subprocessors__change {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wpocto-border);
}

.wpocto-subprocessors__date {
	display: inline-block;
	margin-left: 0.5rem;
	font-size: 0.875em;
}

.wpocto-connect .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
