/*
 * DISC-1: first-visit notice.
 * A notice a visitor reads once: the words in a panel, and a button that says
 * they have read it. The theme then closes the notice and remembers that in
 * the visitor's own browser (inc/first-visit.php), so it is not shown there
 * again until its words change. Without scripts the notice simply stays.
 */

.wprk-disc-1.wprk-section {
	padding-block: var(--wp--preset--spacing--50);
}

.wprk-disc-1.wprk-section[hidden] {
	display: none;
}

/*
 * When the notice closes, the place in the page passes to what follows it, so
 * the next press of the Tab key goes on from there. That is a place, not a
 * control, and it is not ringed.
 */
.wprk-disc-1[hidden] ~ [tabindex="-1"]:focus {
	outline: 0;
}

.wprk-disc-1 .wprk-disc-1__panel {
	align-items: end;
	background-color: var(--wprk-card-bg);
	border: 1px solid var(--wprk-border);
	border-radius: var(--wp--custom--radius--lg);
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	justify-content: space-between;
	padding: var(--wp--preset--spacing--40);
}

.wprk-disc-1 .wprk-disc-1__panel > * {
	margin: 0;
	min-width: 0;
}

.wprk-disc-1 .wprk-disc-1__text {
	flex: 1 1 28rem;
	max-width: 54rem;
}

.wprk-disc-1 .wprk-disc-1__text > * {
	margin: 0;
}

.wprk-disc-1 .wprk-disc-1__text > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

.wprk-disc-1 .wprk-disc-1__text :where(h2) {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.25;
}

.wprk-disc-1 .wprk-disc-1__text :where(p:not(.wprk-eyebrow)) {
	line-height: 1.6;
}

.wprk-disc-1 .wprk-disc-1__agree {
	flex: none;
}

/*
 * Front end only: the button closes the notice, which takes the theme's
 * script. Until that script has found the notice the button is not shown, so
 * a visitor without scripts is not offered a button that does nothing.
 */
:where(body:not(.editor-styles-wrapper)) .wprk-disc-1:not(.is-ready) .wprk-disc-1__agree {
	display: none;
}

@media (min-width: 782px) {
	.wprk-disc-1 .wprk-disc-1__panel {
		padding: var(--wp--preset--spacing--50);
	}
}
