.gpeb__gutenberg__placeholder.components-placeholder {
	align-items: center;
}

.gpeb__gutenberg__placeholder.components-placeholder select {
	width: 300px;
}

/* https://github.com/WordPress/gutenberg/issues/27166 */
.gpeb_settings select[multiple] {
	height: auto !important;
	padding: 8px;
}

.gpeb_settings select[multiple] + .components-input-control__suffix {
	display: none;
}

/* Ordering Control */
.gpeb_ordering_control_select_container {
	display: flex;
}

.gpeb_ordering_control_select_container select {
	width: 100%;
}

/* Block Styling */
/* Hide blocks outside of edit and single view if viewing either edit and single view. */
.gpeb-is-view-or-edit .wp-block-gp-entry-blocks-entries-table,
.gpeb-is-view-or-edit .wp-block-gp-entry-blocks-entries-loop,
.gpeb-is-view-or-edit .wp-block-gp-entry-blocks-pagination,
.gpeb-is-view-or-edit .wp-block-gp-entry-blocks-filters {
	display: none;
}

/* Default to hiding edit and view blocks */
.wp-block-gp-entry-blocks-view-entry,
.wp-block-gp-entry-blocks-edit-entry {
	display: none;
}

/* Mode-dependent block visibility */
.gpeb-mode-view-single .wp-block-gp-entry-blocks-view-entry {
	display: inherit;
}

.gpeb-mode-view-single .wp-block-gp-entry-blocks-edit-entry,
.gpeb-mode-view-single .wp-block-gp-entry-blocks-entries-table,
.gpeb-mode-view-single .wp-block-gp-entry-blocks-entries-loop,
.gpeb-mode-view-single .wp-block-gp-entry-blocks-pagination,
.gpeb-mode-view-single .wp-block-gp-entry-blocks-filters {
	opacity: .5;
	display: none;
}

.gpeb-mode-edit-single .wp-block-gp-entry-blocks-edit-entry {
	display: inherit;
}

.gpeb-mode-edit-single .wp-block-gp-entry-blocks-view-entry,
.gpeb-mode-edit-single .wp-block-gp-entry-blocks-entries-table,
.gpeb-mode-edit-single .wp-block-gp-entry-blocks-entries-loop,
.gpeb-mode-edit-single .wp-block-gp-entry-blocks-pagination,
.gpeb-mode-edit-single .wp-block-gp-entry-blocks-filters {
	opacity: .5;
	display: none;
}

/* Always show blocks if they are selected or have an inner block selected. */
.wp-block-gp-entry-blocks-entries-loop.has-child-selected,
.wp-block-gp-entry-blocks-entries-loop.is-selected,
.wp-block-gp-entry-blocks-entries-table.has-child-selected,
.wp-block-gp-entry-blocks-entries-table.is-selected,
.wp-block-gp-entry-blocks-pagination.has-child-selected,
.wp-block-gp-entry-blocks-pagination.is-selected,
.wp-block-gp-entry-blocks-filters.has-child-selected,
.wp-block-gp-entry-blocks-filters.is-selected,
.wp-block-gp-entry-blocks-view-entry.has-child-selected,
.wp-block-gp-entry-blocks-view-entry.is-selected,
.wp-block-gp-entry-blocks-edit-entry.has-child-selected,
.wp-block-gp-entry-blocks-edit-entry.is-selected {
	display: revert !important;
}

/* Component Styling */
.gpeb-filter-group {
	background: #eee;
	border: 1px solid #ddd;
	text-align: center;
}

.gpeb-filter {
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	flex-wrap: wrap;
	border-bottom: 1px dashed #ccc;
	padding: 0.5rem 0.5rem 1.5rem;
}

.gpeb-filter-property-operator {
	display: flex;
	width: 100%;
	justify-content: stretch;
}

.gpeb-filter:last-of-type {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 0.5rem;
}

.gpeb-filter select {
	/* width: 100%; */
	height: 36px;
}

.gpeb-filter select.gpeb-filter-property {
	margin-right: .5rem;
	/* flex: 1; */
	flex-basis: 100%;
}

.gpeb-filter select.gpeb-filter-operator {
	flex-basis: 100px;
}

.gpeb-filter select.gpeb-filter-value {
	margin-top: .5rem;
	flex-basis: 100%;
}

.gpeb-filter select.gpeb-filter-value,
.gpeb-filter .gpeb-filter-value-custom {
	margin-top: .5rem;
	flex: 1;
	position: relative;
}

.gpeb-filter .gpeb-filter-value-custom div {
	margin: 0;
}

.gpeb-filter .gpeb-filter-value-custom input {
	height: 36px;
	padding-right: 50px;
}

.gpeb-filter .gpeb-filter-value-custom button {
	position: absolute;
	top: 0;
	right: 0;
}

.gpeb-filter-buttons {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0;
	margin-top: .5rem;
}

.gpeb-filter-buttons-add,
.gpeb-filter-buttons-remove {
	height: 20px;
	display: inline-block;
	vertical-align: middle;
	background: none;
	border: 0;
	cursor: pointer;
}

.gpeb-filter-and {
	margin: -1.2rem 0 0;
	height: 2rem;
	display: inline-block;
	padding: 0 10px;
	background: #eee;
	vertical-align: middle;
	line-height: 30px;
	color: #aaa;
}

.gpeb-filter-group-or {
	padding: 1rem;
	margin: 0;
	text-align: center;
	color: #aaa;
}

/* Placeholder for image blocks using merge tags */
.wp-block-image img[src^="{"] {
	color: transparent;
	position: relative;
	overflow: hidden;
}

.wp-block-image img[src^="{"]::before {
	display: flex;
	width: 100%;
	height: 100%;
	background: #ccc;
	position: absolute;
	content: attr(src);
	color: #444;
	font-family: "Courier", monospace;
	justify-content: center;
	align-items: center;
}

/* ASMSelectControl */
.gpeb-asm-select-control {
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
}

.gpeb-asm-select-control-item {
	background: #eee;
	border: 1px solid #ddd;
	padding: 0 0 0 10px;
	display: flex;
	align-items: center;
	margin: 0 0 5px;
	cursor: move;
}

.gpeb-asm-select-control-item-label {
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
}

.gpeb-asm-select-control-item.sortable-ghost {
	border-style: dashed;
	opacity: .65;
	background: #f3f3f3;
}

/* Badge Inside Button */
.gpeb-badge {
	background: var(--wp-admin-theme-color);
	color: #fff;
	display: inline-block;
	vertical-align: top;
	box-sizing: border-box;
	margin: 0 0 0 0.3rem;
	padding: 0 5px;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	font-size: 11px;
	line-height: 1.6;
	text-align: center;
}
