/**
* The header button and the lightbox it opens.
*
* The lightbox covers the editor rather than sitting inside it, so almost
* nothing here can be scoped to an editor class. Everything is under
* .pagecore-design-library instead.
*/
.pagecore-design-library__mount {
	display: flex;
	align-items: center;
	margin-left: 8px;
	order: 99;
}

.pagecore-design-library__button.components-button {
	background: #2145e6;
	border-radius: 4px;
	color: #fff;
	font-weight: 500;
	gap: 6px;
}

.pagecore-design-library__button.components-button:hover:not(:disabled) {
	background: #1b39c4;
	color: #fff;
}

.pagecore-design-library__backdrop {
	position: fixed;
	inset: 0;
	z-index: 100100;
	display: flex;
	padding: 50px;
	background: rgba(30, 30, 30, 0.45);
}

@media (max-width: 782px) {
	.pagecore-design-library__backdrop {
		padding: 0;
	}

}
.pagecore-design-library {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	background: #fff;
	color: #1e1e1e;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.pagecore-design-library__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 60px;
	padding: 0 16px;
	border-bottom: 1px solid #e0e0e0;
	flex: 0 0 auto;
}

.pagecore-design-library__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	font-weight: 600;
}

.pagecore-design-library__brand-mark {
	display: block;
	flex: none;
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.pagecore-design-library__tabs {
	display: flex;
	align-self: stretch;
	gap: 4px;
}

.pagecore-design-library__tab {
	position: relative;
	padding: 0 22px;
	border: 0;
	background: none;
	color: #757575;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
}

.pagecore-design-library__tab.is-active {
	background: #f6f7f7;
	color: #1e1e1e;
}

.pagecore-design-library__tab.is-active::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 2px;
	background: #1e1e1e;
}

.pagecore-design-library__tab:hover {
	color: #1e1e1e;
}

.pagecore-design-library__bar-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
}

.pagecore-design-library__body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
}

.pagecore-design-library__split {
	position: relative;
	display: flex;
	width: 100%;
	min-height: 0;
}

.pagecore-design-library__sidebar {
	flex: 0 0 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border-right: 1px solid #e0e0e0;
	overflow: hidden;
}

/* The list scrolls, so the colour styles stay in sight below it. */
.pagecore-design-library__categories {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
}

.pagecore-design-library__category {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: #1e1e1e;
	cursor: pointer;
	font-size: 13px;
	text-align: left;
}

.pagecore-design-library__category:hover {
	background: #f0f0f1;
}

.pagecore-design-library__category.is-active {
	background: #eef1fd;
	font-weight: 500;
}

.pagecore-design-library__schemes {
	display: flex;
	flex: none;
	align-items: center;
	gap: 8px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

.pagecore-design-library__schemes-label {
	margin-right: auto;
	color: #1e1e1e;
	font-size: 13px;
	font-weight: 600;
}

.pagecore-design-library__scheme {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 50%;
	background: none;
	cursor: pointer;
}

.pagecore-design-library__scheme:hover {
	border-color: #ddd;
}

.pagecore-design-library__scheme.is-active {
	border-color: var(--wp-admin-theme-color, #3858e9);
}

.pagecore-design-library__scheme[aria-disabled="true"] {
	opacity: 0.4;
	cursor: not-allowed;
}

.pagecore-design-library__scheme[aria-disabled="true"]:hover {
	border-color: transparent;
}

.pagecore-design-library__scheme:focus-visible {
	outline: 2px solid var(--wp-admin-theme-color, #3858e9);
	outline-offset: 2px;
}

/* Defaults for when the palette has not arrived; the real colours are inline. */
.pagecore-design-library__scheme-swatch {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.pagecore-design-library__category-count {
	flex: none;
	color: #757575;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	font-weight: 400;
}

.pagecore-design-library__panel {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 20px 24px;
	overflow-y: auto;
}

.pagecore-design-library__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.pagecore-design-library__panel-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.pagecore-design-library__panel-filters {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pagecore-design-library__empty {
	margin: auto;
	max-width: 380px;
	padding: 40px 0;
	text-align: center;
}

.pagecore-design-library__empty h3 {
	margin: 0 0 8px;
	font-size: 15px;
}

.pagecore-design-library__empty p {
	margin: 0;
	color: #757575;
	font-size: 13px;
	line-height: 1.6;
}

.pagecore-design-library__loading {
	display: grid;
	place-items: center;
	padding: 60px 0;
}

/*
* Cards are whatever height their pattern makes them, so each column stacks at
* its own pace. Masonry.js deals the cards across the columns in reading order
* and decides how many columns there are; this only lays them out.
*/
.pagecore-design-library__masonry {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.pagecore-design-library__masonry-column {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

/* What the next rows are drawn on reaching. */
.pagecore-design-library__masonry-more {
	height: 1px;
}

.pagecore-design-library__card {
	position: relative;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* The card lifts toward the pointer, with the brand ring round it. */
.pagecore-design-library__card:hover, .pagecore-design-library__card:focus-within {
	border-color: #2145e6;
	box-shadow: 0 0 0 1px #2145e6, 0 16px 32px -16px rgba(15, 23, 42, 0.45);
	transform: translateY(-3px);
}

.pagecore-design-library__card-preview {
	position: relative;
	overflow: hidden;
	pointer-events: none;
}

/* A wash rising from the foot of the preview, so the dock always has depth
 * behind it, whatever colour the pattern ends on. */
.pagecore-design-library__card-preview::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0) 55%);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.pagecore-design-library__card-thumbnail {
	display: block;
	width: 100%;
	height: auto;
}

/* The dock: a frosted dark pill that floats up inside the card. */
.pagecore-design-library__card-actions {
	position: absolute;
	right: 12px;
	bottom: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 6px 6px 16px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.9);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pagecore-design-library__card:hover .pagecore-design-library__card-preview::after, .pagecore-design-library__card:focus-within .pagecore-design-library__card-preview::after {
	opacity: 1;
}

.pagecore-design-library__card:hover .pagecore-design-library__card-actions, .pagecore-design-library__card:focus-within .pagecore-design-library__card-actions {
	opacity: 1;
	transform: none;
}

.pagecore-design-library__card-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* The heart: quiet until it is used, then pink. */
.pagecore-design-library__card-actions .pagecore-design-library__heart.components-button {
	flex: none;
	justify-content: center;
	width: 36px;
	min-width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: rgba(255, 255, 255, 0.7);
}

.pagecore-design-library__card-actions .pagecore-design-library__heart.components-button:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.pagecore-design-library__card-actions .pagecore-design-library__heart.components-button.is-pressed, .pagecore-design-library__card-actions .pagecore-design-library__heart.components-button.is-pressed:hover:not(:disabled) {
	background: rgba(255, 107, 139, 0.16);
	color: #ff6b8b;
}

.pagecore-design-library__card-actions .pagecore-design-library__heart.components-button:focus-visible {
	box-shadow: 0 0 0 2px #fff;
	outline: none;
}

/* Insert: the one bright thing in the dock. */
.pagecore-design-library__card-actions .pagecore-design-library__insert.components-button {
	flex: none;
	gap: 2px;
	height: 36px;
	padding: 0 16px 0 10px;
	border-radius: 999px;
	background: #2145e6;
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
}

.pagecore-design-library__card-actions .pagecore-design-library__insert.components-button:hover:not(:disabled) {
	background: #3b5cff;
	color: #fff;
}

.pagecore-design-library__card-actions .pagecore-design-library__insert.components-button:focus-visible {
	box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 0 0 4px #fff;
	outline: none;
}

/* Pro, locked: gold, so it never reads as a plain Insert. */
.pagecore-design-library__card-actions .pagecore-design-library__insert.is-upgrade.components-button {
	background: linear-gradient(135deg, #f7c65c, #e99a2c);
	color: #1e1e1e;
}

.pagecore-design-library__card-actions .pagecore-design-library__insert.is-upgrade.components-button:hover {
	background: linear-gradient(135deg, #f9d27a, #eea64a);
	color: #1e1e1e;
}

/* No hover on touch screens: the dock is always there. */
@media (hover: none) {
	.pagecore-design-library__card-actions {
		opacity: 1;
		transform: none;
	}

	.pagecore-design-library__card-preview::after {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pagecore-design-library__card, .pagecore-design-library__card-actions, .pagecore-design-library__card-preview::after {
		transition: none;
	}

	.pagecore-design-library__card:hover, .pagecore-design-library__card:focus-within, .pagecore-design-library__card-actions {
		transform: none;
	}
}

.pagecore-design-library__theme-notice {
	flex: 0 0 auto;
	padding: 12px 16px 0;
}

.pagecore-design-library__theme-notice .components-notice {
	margin: 0;
}

/* Above the preview, and below the dock so it never covers it. Gold, like
 * the Upgrade button it goes with. */
.pagecore-design-library__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);
}

.pagecore-design-library__heart.components-button {
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.pagecore-design-library__kits {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

@media (max-width: 1440px) {
	.pagecore-design-library__kits {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

}
@media (max-width: 1100px) {
	.pagecore-design-library__kits {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

}
.pagecore-design-library__kit {
	position: relative;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
}

.pagecore-design-library__kit:hover, .pagecore-design-library__kit:focus-within {
	border-color: #2145e6;
}

.pagecore-design-library__kit-shot {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	aspect-ratio: 4 / 5;
	background-color: #f0f0f1;
	background-position: center top;
	background-repeat: no-repeat;
	background-size: 100% auto;
	cursor: pointer;
	transition: background-position 4s ease-in-out;
}

.pagecore-design-library__kit:hover .pagecore-design-library__kit-shot {
	background-position: center bottom;
}

@media (prefers-reduced-motion: reduce) {
	.pagecore-design-library__kit-shot {
		transition: none;
	}

	.pagecore-design-library__kit:hover .pagecore-design-library__kit-shot {
		background-position: center top;
	}

}
.pagecore-design-library__kit-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	border-top: 1px solid #e0e0e0;
}

.pagecore-design-library__kit-name {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
}

.pagecore-design-library__kit-count {
	margin: 2px 0 0;
	color: #757575;
	font-size: 12px;
}

.pagecore-design-library__detail {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
}

.pagecore-design-library__detail-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 24px;
	border-bottom: 1px solid #e0e0e0;
}

.pagecore-design-library__detail-body {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
}

.pagecore-design-library__detail-preview {
	display: flex;
	flex: 1 1 60%;
	min-width: 0;
	padding: 24px;
	background: #f6f7f7;
	overflow-y: auto;
}

.pagecore-design-library__detail-preview img {
	display: block;
	width: 100%;
	height: auto;
	align-self: flex-start;
	border: 1px solid #e0e0e0;
	background: #fff;
}

.pagecore-design-library__detail-side {
	display: flex;
	flex: 0 0 40%;
	flex-direction: column;
	min-height: 0;
	border-left: 1px solid #e0e0e0;
}

.pagecore-design-library__detail-side-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
}

.pagecore-design-library__detail-side-head h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
}

.pagecore-design-library__detail-pages {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	padding: 0 20px 20px;
	overflow-y: auto;
}

.pagecore-design-library__page {
	position: relative;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
}

.pagecore-design-library__page.is-active {
	border-color: #2145e6;
}

.pagecore-design-library__page:hover, .pagecore-design-library__page:focus-within {
	border-color: #2145e6;
}

.pagecore-design-library__page-open {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: left;
}

.pagecore-design-library__page-heart.components-button {
	position: absolute;
	top: 6px;
	right: 6px;
	opacity: 0;
}

.pagecore-design-library__page:hover .pagecore-design-library__page-heart.components-button, .pagecore-design-library__page:focus-within .pagecore-design-library__page-heart.components-button, .pagecore-design-library__page-heart.components-button[aria-pressed="true"] {
	opacity: 1;
}

.pagecore-design-library__page-shot {
	display: block;
	aspect-ratio: 4 / 3;
	background-color: #f0f0f1;
	background-position: center top;
	background-repeat: no-repeat;
	background-size: 100% auto;
}

.pagecore-design-library__page-name {
	display: block;
	padding: 8px 10px;
	border-top: 1px solid #e0e0e0;
	font-size: 13px;
}

.pagecore-design-library__detail-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: auto;
	padding: 16px 20px;
	border-top: 1px solid #e0e0e0;
}

.pagecore-design-library__section {
	margin-bottom: 32px;
}

.pagecore-design-library__section > h3 {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #757575;
}

/*
* Any Modal opened from inside the lightbox. WordPress puts its overlay at
* 100000, which is under the lightbox, so one opened from in here would render
* behind it and look like nothing happened.
*/
.pagecore-design-library__over.components-modal__screen-overlay {
	z-index: 100200;
}

.pagecore-design-library__busy {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.82);
}

.pagecore-design-library__busy-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 22px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.pagecore-design-library__busy-card p {
	margin: 0;
	font-size: 14px;
}

/* "Allow SVG icons?", asked in place of the busy card. */
.pagecore-design-library__svg-choice {
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	max-width: 460px;
	margin: 0 16px;
	padding: 20px 24px;
}

.pagecore-design-library__svg-choice h3 {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
}

.pagecore-design-library__svg-choice p {
	line-height: 1.5;
}

.pagecore-design-library__svg-choice-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.pagecore-design-library__lazy-placeholder {
	display: block;
	height: 220px;
	background: linear-gradient(180deg, #f6f7f7, #f0f0f1);
}

.pagecore-design-library__sync-errors {
	flex: 0 0 auto;
	padding: 12px 16px 0;
}

.pagecore-design-library__sync-errors .components-notice {
	margin: 0 0 8px;
}



.pagecore-design-library__button-mark {
	display: block;
	flex: none;
	width: 20px;
	height: 20px;
	object-fit: contain;
}
