/* The Zyff widget block in the editor. Uses the admin theme colour so it sits
   naturally in any colour scheme; nothing here reaches the front end. */

.zyff-block__picker .components-placeholder__fieldset {
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}

.zyff-block__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	/* The placeholder stretches its fieldset; without this the rows share
	   the spare height and the choices float apart. */
	align-content: start;
	gap: 8px;
}

.zyff-block__list li {
	margin: 0;
	min-width: 0;
}

.components-button.zyff-block__choice {
	width: 100%;
	height: auto;
	min-height: 56px;
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	text-align: left;
	white-space: normal;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.components-button.zyff-block__choice:hover,
.components-button.zyff-block__choice.is-pressed {
	border-color: var(--wp-admin-theme-color, #3858e9);
}

.zyff-block__choice-name {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.zyff-block__choice-type,
.zyff-block__type,
.zyff-block__note {
	color: #50575e;
	font-size: 12px;
}

.zyff-block__tag {
	display: inline-block;
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 2px;
	background: #f0f0f1;
	color: #1e1e1e;
	font-size: 11px;
	line-height: 18px;
}

.zyff-block__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.zyff-block__card {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	background: #fff;
	color: #1e1e1e;
}

.zyff-block__icon {
	flex: none;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: var(--wp-admin-theme-color, #3858e9);
	color: #fff;
}

.zyff-block__meta {
	min-width: 0;
	flex: 1;
}

.zyff-block__meta p {
	margin: 0 0 4px;
}

/* The card sits in the theme's canvas; keep the theme's link typography out. */
.zyff-block__meta .components-external-link {
	font-size: 13px;
	line-height: 1.4;
}

.zyff-block__name {
	font-weight: 600;
	font-size: 14px;
	overflow-wrap: anywhere;
}
