/**
* Demos screen and import wizard.
*
* Typography first. The WordPress admin sets 13px as its base, which suits a
* dense settings screen but not a wizard a client reads once and has to trust.
* Everything here works from a 16px body size with generous line height, and
* the sizes below step down from it rather than being picked one by one.
*
* Colour still comes from the admin, so the screen follows the user's admin
* colour scheme without any work.
*/
/* Demos screen -------------------------------------------------------- */
/*
* The screen uses the whole width, so a wide monitor shows more demos rather
* than the same three with empty space beside them. Text blocks cap their own
* line length.
*/
.pagecore-demos {
	font-size: 16px;
	line-height: 1.6;
}

.pagecore-demos__head {
	margin-bottom: 4px;
}

.pagecore-demos__synced {
	font-size: 14px;
	color: #646970;
}

.pagecore-demos__intro {
	max-width: 68ch;
	margin-bottom: 24px;
	font-size: 16px;
	line-height: 1.6;
}

/*
* Columns by window width, never more than five:
*
*   window >= 1600 -> 5
*   window  > 1200 -> 4
*   window <= 1200 -> 3
*   window <=  782 -> 2  (tablet, where the admin goes to its mobile layout)
*   window <=  600 -> 1  (phone)
*
* 782 and 600 are the admin's own breakpoints, so the grid changes where the
* rest of the screen does.
*/
.pagecore-demos__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 28px 20px;
	margin-top: 24px;
}

@media (max-width: 1599px) {
	.pagecore-demos__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 1200px) {
	.pagecore-demos__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 32px 24px;
	}
}

@media (max-width: 782px) {
	.pagecore-demos__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px 16px;
	}
}

@media (max-width: 600px) {
	.pagecore-demos__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.pagecore-demos .components-notice__content {
	font-size: 16px;
	line-height: 1.6;
}

/*
* A card is a white box: the screenshot on top, the site's name in a bar
* along the bottom. The screenshot is the top of the home page and stays
* still; Preview is where somebody goes to see the rest. Import and Preview
* wait over the screenshot until the card is hovered.
*/
.pagecore-demo-card {
	min-width: 0;
	overflow: hidden;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.pagecore-demo-card:hover,
.pagecore-demo-card:focus-within {
	border-color: #c3c4c7;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.pagecore-demo-card__frame {
	position: relative;
	overflow: hidden;
	background: #f0f0f1;
}

.pagecore-demo-card__shot {
	position: relative;
	background-color: #f0f0f1;
	background-repeat: no-repeat;
	background-size: 100% auto;
	background-position: center top;
	aspect-ratio: 3 / 4;
	max-width: 100%;
}

.pagecore-demo-card__actions {
	position: absolute;
	inset: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	align-content: center;
	gap: 8px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.8);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.pagecore-demo-card:hover .pagecore-demo-card__actions,
.pagecore-demo-card:focus-within .pagecore-demo-card__actions {
	opacity: 1;
}

.pagecore-demo-card__actions .components-button {
	justify-content: center;
	min-width: 112px;
	height: auto;
	min-height: 44px;
	padding: 10px 24px;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
}

/* Kept white so it reads as a button over the screenshot, not a hole in the wash. */
.pagecore-demo-card__actions .components-button.is-secondary {
	background: #fff;
}

/*
* Nothing to hover on a touch screen, so the buttons stay out, on a strip
* along the bottom that leaves most of the screenshot clear.
*/
@media (hover: none) {
	.pagecore-demo-card__actions {
		inset: auto 0 0;
		padding: 12px;
		background: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
		opacity: 1;
	}
}

.pagecore-demo-card__badge {
	position: absolute;
	inset-block-end: 10px;
	inset-inline-start: 10px;
	background: rgba(0, 0, 0, 0.66);
	color: #fff;
	font-size: 13px;
	padding: 3px 9px;
	border-radius: 3px;
}

.pagecore-demos .pagecore-demo-card__title {
	margin: 0;
	padding: 14px 18px;
	border-top: 1px solid #dcdcde;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	color: #1d2327;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.pagecore-demo-card,
	.pagecore-demo-card__actions {
		transition: none;
	}
}

.pagecore-wizard .components-modal__header .components-modal__header-heading {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.25;
}

.pagecore-wizard .components-modal__header {
	height: auto;
	padding-block: 20px;
}

.pagecore-wizard .components-notice__content {
	font-size: 16px;
	line-height: 1.6;
}

.pagecore-wizard .components-base-control__label, .pagecore-wizard .components-radio-control__option label, .pagecore-wizard .components-radio-control__label, .pagecore-wizard .components-checkbox-control__label {
	font-size: 16px;
	line-height: 1.5;
}

/* The tick box stays level with the first line of its larger label. */
.pagecore-wizard .components-checkbox-control__input-container {
	margin-top: calc((24px - var(--checkbox-input-size)) / 2);
}

.pagecore-wizard__panel .components-checkbox-control__help {
	margin-top: 8px;
}

/* Options in a choice sit close together: WordPress's own 12px gap, plus
 * the old 8px margin here, spread a three-line choice over a lot of space. */
.pagecore-wizard .components-radio-control__group-wrapper {
	gap: 8px;
}

.pagecore-wizard .components-button {
	font-size: 15px;
	height: auto;
	min-height: 40px;
	padding: 8px 18px;
}

.pagecore-wizard .components-button.has-icon {
	padding: 8px;
}

.pagecore-wizard__step {
	font-size: 16px;
	line-height: 1.6;
}

.pagecore-wizard__step > .components-notice {
	margin: 0 0 16px;
}

.pagecore-wizard__loading {
	text-align: center;
	padding: 56px 0;
	font-size: 16px;
}

.pagecore-wizard__panel {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
}

.pagecore-wizard__panel h3 {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 1.3;
}

.pagecore-wizard__panel p {
	margin: 0 0 12px;
	max-width: 68ch;
	font-size: 16px;
	line-height: 1.6;
}

.pagecore-wizard__panel .components-notice {
	margin: 14px 0;
}

.pagecore-wizard__panel .components-notice:last-child {
	margin-bottom: 0;
}

.pagecore-wizard__details {
	margin-bottom: 20px;
}

.pagecore-wizard__details summary {
	cursor: pointer;
	font-size: 16px;
	color: #2271b1;
	padding: 6px 0;
}

.pagecore-wizard__checks {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.pagecore-wizard__checks li {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3px;
	padding: 10px 0 10px 26px;
	border-bottom: 1px solid #f0f0f1;
	position: relative;
	font-size: 16px;
	line-height: 1.5;
}

.pagecore-wizard__checks li::before {
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 10px;
	font-size: 16px;
}

.pagecore-wizard__checks li.is-passed::before {
	content: "\2713";
	color: #2a7b3f;
}

.pagecore-wizard__checks li.is-failed.is-blocker::before {
	content: "\2715";
	color: #b32d2e;
}

.pagecore-wizard__checks li.is-failed.is-warning::before {
	content: "!";
	color: #996800;
	font-weight: 700;
}

.pagecore-wizard__checks li span {
	color: #50575e;
}

.pagecore-wizard__reasons {
	margin: 10px 0 0 20px;
	font-size: 16px;
	line-height: 1.6;
}

.pagecore-wizard__reasons li {
	margin-bottom: 4px;
}

.pagecore-wizard__reasons code {
	font-size: 14px;
}

.pagecore-wizard__result {
	margin: 0 0 20px;
	font-size: 16px;
	color: #50575e;
}

.pagecore-wizard__next {
	margin: 0;
	padding-inline-start: 20px;
	font-size: 16px;
	line-height: 1.6;
}

.pagecore-wizard__next li {
	margin-bottom: 6px;
}

.pagecore-wizard__note {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.55;
	color: #646970;
}

.pagecore-wizard__note code {
	font-size: 13px;
}

.pagecore-wizard__ready {
	margin: 20px 0;
	font-size: 16px;
	font-weight: 600;
}

.pagecore-wizard__plugins {
	margin: 8px 0 10px 20px;
	list-style: disc;
	font-size: 16px;
}

.pagecore-wizard__removal {
	margin: 10px 0 6px;
	max-width: 66ch;
	font-size: 16px;
	line-height: 1.6;
}

.pagecore-wizard__removal-list {
	margin: 0 0 10px;
	padding-inline-start: 20px;
	list-style: disc;
	font-size: 16px;
	line-height: 1.55;
}

.pagecore-wizard__removal-list li {
	margin-bottom: 3px;
}

.pagecore-wizard__actions {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #dcdcde;
}

/* Step indicator ------------------------------------------------------ */
.pagecore-steps {
	display: flex;
	list-style: none;
	margin: 0 0 24px;
	padding: 0 0 20px;
	border-bottom: 1px solid #dcdcde;
	gap: 10px;
	flex-wrap: wrap;
}

.pagecore-steps__item {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	color: #8c8f94;
	font-size: 16px;
}

.pagecore-steps__item::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: #dcdcde;
	min-width: 14px;
}

.pagecore-steps__item:last-child::after {
	display: none;
}

.pagecore-steps__item.is-active {
	color: #1d2327;
	font-weight: 600;
}

.pagecore-steps__item.is-done {
	color: #2a7b3f;
}

.pagecore-steps__number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	border-radius: 50%;
	border: 1px solid #dcdcde;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.pagecore-steps__item.is-active .pagecore-steps__number {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
}

.pagecore-steps__item.is-done .pagecore-steps__number {
	border-color: #2a7b3f;
	color: #2a7b3f;
}

.pagecore-steps__label {
	white-space: nowrap;
}

/* Summary panels ------------------------------------------------------ */
.pagecore-summary {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 18px 20px;
	margin: 20px 0 0;
}

.pagecore-summary__title {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.3;
}

.pagecore-summary__line {
	margin: 0 0 8px;
	max-width: 68ch;
	font-size: 16px;
	line-height: 1.6;
	color: #50575e;
}

.pagecore-summary__line:last-child {
	margin-bottom: 0;
}

.pagecore-summary__list {
	margin: 0;
	padding-inline-start: 20px;
	list-style: disc;
	font-size: 16px;
	line-height: 1.55;
	color: #50575e;
}

.pagecore-summary__list li {
	margin-bottom: 5px;
}

/* Progress ------------------------------------------------------------ */
.pagecore-progress {
	margin: 24px 0 16px;
}

.pagecore-progress__bar {
	height: 12px;
	background: #f0f0f1;
	border-radius: 6px;
	overflow: hidden;
}

.pagecore-progress__bar span {
	display: block;
	height: 100%;
	background: #2271b1;
	transition: width 0.3s ease;
}

.pagecore-progress__status {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 14px 0 0;
	font-size: 16px;
	line-height: 1.5;
}

.pagecore-progress__percent {
	margin-inline-start: auto;
	font-variant-numeric: tabular-nums;
	color: #646970;
}

.pagecore-log {
	max-height: 220px;
	overflow-y: auto;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 14px 16px;
	background: #f6f7f7;
	font-size: 13px;
}

.pagecore-log__line {
	margin: 0 0 6px;
	line-height: 1.6;
}

.pagecore-log__line.is-warning {
	color: #8a6100;
}

.pagecore-log__line.is-error {
	color: #b32d2e;
}

@media (prefers-reduced-motion: reduce) {
	.pagecore-progress__bar span {
		transition: none;
	}

}


/* Pro demos: the same gold marker the pattern and kit cards use. The shot
 * is already positioned, so the marker sits in its corner. */
.pagecore-demo-card__pro {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	padding: 3px 10px;
	border-radius: 999px;
	background: linear-gradient(135deg, #f7c65c, #e99a2c);
	color: #1e1e1e;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.06em;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}
