/* Documentation pages only. Enqueued on the two docs templates and nowhere else. */

/* A heading's own link, shown when you are near it rather than always — a page of permalinks that
   are visible all the time reads as clutter, and one that is never visible cannot be found. */
.docs-anchor {
	margin-left: .4em;
	color: #859590;
	opacity: 0;
	text-decoration: none;
	transition: opacity .15s ease;
}

.docs-h2:hover .docs-anchor,
.docs-h3:hover .docs-anchor,
.docs-anchor:focus {
	opacity: 1;
}

/* The contents panel marks where you are. */
.docs-toc__link.is-current {
	color: #1d6a55;
	border-left-color: #1d6a55;
	font-weight: 600;
}

/* Code. PHP's own highlighter emits inline colours; these override them to the brand's range so a
   snippet does not arrive in the default pink and blue of a 1998 php.ini. */
.docs-code {
	padding: 1rem 1.15rem;
	overflow-x: auto;
	background: #1e2a26;
	border-radius: .5rem;
	font-size: 13px;
	line-height: 1.7;
}

.docs-code code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	color: #dfe8e4;
}

/* highlight_string() writes a colour on every span; these are stronger and land in the palette. */
.docs-code span[style*="0000BB"],
.docs-code span[style*="0000bb"] { color: #9ecfbd !important; }  /* identifiers */
.docs-code span[style*="007700"] { color: #f0e2b6 !important; }  /* keywords */
.docs-code span[style*="DD0000"],
.docs-code span[style*="dd0000"] { color: #b9d8cb !important; }  /* strings */
.docs-code span[style*="FF8000"],
.docs-code span[style*="ff8000"] { color: #859590 !important; }  /* comments */
.docs-code span[style*="000000"] { color: #dfe8e4 !important; }  /* the wrapper span, and inline HTML */

.docs-body code:not(.docs-code code) {
	padding: .1em .35em;
	background: #f1f4f3;
	border-radius: .25rem;
	font-size: .9em;
}

/* One hook. Native details, so it opens with a keyboard for free. */
.hook summary::-webkit-details-marker {
	display: none;
}

.hook summary:hover {
	background: #f6f9f8;
}

.hook summary:focus-visible {
	outline: 2px solid #1d6a55;
	outline-offset: -2px;
}

.hook[hidden] {
	display: none;
}

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