/* Changelog and hook reference. Colors come from the theme's presets, with the token values as fallback. */

.wpsf-changelog,
.wpsf-hooks {
	--wpsf-line: var(--wp--preset--color--line, #d8e2ec);
	--wpsf-muted: var(--wp--preset--color--muted, #5a6d80);
	--wpsf-navy: var(--wp--preset--color--navy, #003a7f);
	--wpsf-amber-deep: var(--wp--preset--color--amber-deep, #933609);
	--wpsf-amber-wash: var(--wp--preset--color--amber-wash, #fdf0e7);
	--wpsf-pale: var(--wp--preset--color--pale, #ebf8ff);
	--wpsf-mist: var(--wp--preset--color--mist, #eef3f8);
}

/* Changelog. */
.wpsf-cl-version {
	padding-block: 1.5rem;
	border-bottom: 1px solid var(--wpsf-line);
}
.wpsf-cl-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 1rem;
	margin-bottom: 0.75rem;
}
.wpsf-cl-number {
	margin: 0;
	font-size: 1.5rem;
	font-variant-numeric: tabular-nums;
}
h3.wpsf-cl-number {
	font-size: 1.125rem;
}
.wpsf-cl-number a {
	color: inherit;
	text-decoration: none;
}
.wpsf-cl-number a:hover {
	text-decoration: underline;
}
.wpsf-cl-date,
.wpsf-cl-when {
	color: var(--wpsf-muted);
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}
.wpsf-cl-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.wpsf-cl-items li {
	display: grid;
	grid-template-columns: 7rem minmax(0, 1fr);
	gap: 0.75rem;
	align-items: baseline;
}
@media (max-width: 480px) {
	.wpsf-cl-items {
		gap: 1rem;
	}
	.wpsf-cl-items li {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.2rem;
	}
	.wpsf-cl-label {
		justify-self: start;
	}
}
.wpsf-cl-label {
	font-family: var(--wp--preset--font-family--display, inherit);
	font-size: var(--wp--preset--font-size--caption, 0.8125rem);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	border-radius: 4px;
	padding: 0.15rem 0.4rem;
	white-space: nowrap;
}
.wpsf-cl-label.is-nove {
	background: #e2f0ff;
	color: var(--wpsf-navy);
}
.wpsf-cl-label.is-zmena {
	background: var(--wpsf-mist);
	color: #44546a;
}
.wpsf-cl-label.is-oprava {
	background: var(--wpsf-amber-wash);
	color: var(--wpsf-amber-deep);
}
.wpsf-cl-label.is-bezpecnost {
	background: #fde8e8;
	color: #8f1d1d;
}
.wpsf-cl-text {
	min-width: 0;
	overflow-wrap: anywhere;
}
.wpsf-cl-older-title {
	margin-top: 2.5rem;
}
.wpsf-cl-group {
	border-bottom: 1px solid var(--wpsf-line);
	padding-block: 0.7rem;
}
.wpsf-cl-group summary {
	font-variant-numeric: tabular-nums;
}
.wpsf-cl-older-title + .wpsf-cl-group {
	border-top: 1px solid var(--wpsf-line);
}
.wpsf-cl-when {
	font-family: var(--wp--preset--font-family--body, inherit);
	font-weight: 400;
}
.wpsf-cl-group .wpsf-cl-version:last-child {
	border-bottom: 0;
}

/* Hook reference. */
.wpsf-hooks-meta {
	color: var(--wpsf-muted);
}
.wpsf-hooks-index ul {
	list-style: none;
	margin: 1rem 0 2rem;
	padding: 1rem 1.25rem;
	background: var(--wpsf-pale);
	border-radius: 8px;
	columns: 19rem;
	column-gap: 1.5rem;
}
.wpsf-hooks-index li {
	break-inside: avoid;
	padding-block: 0.15rem;
	overflow-wrap: anywhere;
	font-size: 0.875rem;
}
.wpsf-hooks-index a {
	text-decoration: none;
}
.wpsf-hooks-index code,
.wpsf-hook-name code {
	background: none;
	padding: 0;
}
.wpsf-hook {
	padding-block: 1.75rem;
	border-top: 1px solid var(--wpsf-line);
	scroll-margin-top: 1rem;
}
.wpsf-hook-name {
	margin: 0 0 0.4rem;
	font-size: 1.25rem;
	overflow-wrap: anywhere;
}
.wpsf-hook-name a {
	color: inherit;
	text-decoration: none;
}
.wpsf-hook-name a:hover {
	text-decoration: underline;
}
.wpsf-hook-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.9rem;
	align-items: center;
	color: var(--wpsf-muted);
	font-size: 0.9375rem;
	margin: 0 0 0.75rem;
}
.wpsf-pill {
	font-family: var(--wp--preset--font-family--display, inherit);
	font-size: var(--wp--preset--font-size--caption, 0.8125rem);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 4px;
	padding: 0.15rem 0.5rem;
	background: #e2f0ff;
	color: var(--wpsf-navy);
}
.wpsf-pill.is-action {
	background: var(--wpsf-amber-wash);
	color: var(--wpsf-amber-deep);
}
.wpsf-hook-summary {
	font-size: 1.0625rem;
}
.wpsf-hook-missing {
	color: var(--wpsf-muted);
	font-style: italic;
}
.wpsf-hook-params table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}
.wpsf-hook-params th,
.wpsf-hook-params td {
	text-align: left;
	padding: 0.5rem 0.6rem;
	border-bottom: 1px solid var(--wpsf-line);
	border-top: 0;
	border-left: 0;
	border-right: 0;
	vertical-align: top;
}
.wpsf-hook-params th {
	font-family: var(--wp--preset--font-family--display, inherit);
	font-size: var(--wp--preset--font-size--caption, 0.8125rem);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wpsf-muted);
}
.wpsf-hook-params td:first-child,
.wpsf-hook-params td:nth-child(2) {
	white-space: nowrap;
}
/* On a phone each parameter is one block: name and type on a line, the description under them. */
@media (max-width: 599px) {
	.wpsf-hook-params thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
	.wpsf-hook-params tr {
		display: grid;
		grid-template-columns: auto 1fr;
		column-gap: 0.75rem;
		padding-block: 0.6rem;
		border-bottom: 1px solid var(--wpsf-line);
	}
	.wpsf-hook-params td {
		border: 0;
		padding: 0;
	}
	.wpsf-hook-params td:first-child {
		white-space: normal;
		overflow-wrap: anywhere;
	}
	.wpsf-hook-params td:nth-child(3) {
		grid-column: 1 / -1;
		padding-top: 0.25rem;
	}
}
.wpsf-hook-usage {
	overflow-x: auto;
	white-space: pre;
}
.wpsf-hook-where {
	color: var(--wpsf-muted);
	font-size: 0.875rem;
	overflow-wrap: anywhere;
}

/* Requirements table on the homepage. */
.wpsf-requirements table {
	width: 100%;
	border-collapse: collapse;
}
.wpsf-requirements th,
.wpsf-requirements td {
	text-align: left;
	padding: 0.55rem 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line, #d8e2ec);
	vertical-align: top;
}
.wpsf-requirements th {
	font-weight: 600;
	padding-right: 1.25rem;
	white-space: nowrap;
	width: 1%;
}
.wpsf-requirements td {
	color: var(--wp--preset--color--muted, #5a6d80);
}
@media (max-width: 599px) {
	.wpsf-requirements th {
		white-space: normal;
		width: 45%;
	}
}

/* Code blocks and details are plain HTML here, so the theme's block styles do not reach them. */
.wpsf-hooks pre {
	background: var(--wpsf-mist);
	color: var(--wp--preset--color--navy-deep, #012a5c);
	border-radius: 8px;
	padding: 0.9rem 1.1rem;
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 0.85rem;
	line-height: 1.55;
	overflow-x: auto;
	white-space: pre;
	tab-size: 4;
}
.wpsf-hooks pre code {
	background: none;
	padding: 0;
	font-size: inherit;
	color: inherit;
}
.wpsf-changelog details summary,
.wpsf-hooks details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display, inherit);
	font-weight: 700;
}
