/* SHOW DEPRECATION WARNING FOR OLD BLOCKS */
.wp-block[data-type*="cgb/"],
.wp-block[data-type="acf/highlighted-content"],
.wp-block[data-type="acf/remote-wordpress-content"],
.wp-block[data-type="acf/menu-auto-subpages"] {
	outline: 2px solid rgb(189, 0, 0) !important;
	margin-bottom: 40px;
	position: relative;

	&::after {
		content: attr(data-title)
			" - this block is outdated and no longer supported. Please transform to the new version of the block. To transform: select the block, click the block icon on the left of the popup toolbar, and transform to the new version of the block. More info available at webhosting.cals.wisc.edu" !important;
		position: absolute;
		font-family:
			system-ui,
			-apple-system,
			BlinkMacSystemFont,
			"Segoe UI",
			Roboto,
			Oxygen,
			Ubuntu,
			Cantarell,
			"Open Sans",
			"Helvetica Neue",
			sans-serif;
		font-weight: normal;
		top: 100% !important;
		left: 0 !important;
		right: unset;
		padding: 2px 8px;
		line-height: 15px;
		font-size: 11px;
		background: rgb(189, 0, 0);
		color: #fff;
		display: inline-block;
		border-radius: 0;
		height: 32px;
	}

	&[data-type="acf/highlighted-content"]::after {
		content: attr(data-title)
			" - This block is no longer supported. Please use the new posts block instead. More info available at webhosting.cals.wisc.edu" !important;
	}

	&[data-type="cgb/card-layout"]::after {
		content: attr(data-title)
			" - This block is no longer supported. Please transform to the new posts block by selecting the block, clicking the block icon in the top left, and selecting GROUP. More info available at webhosting.cals.wisc.edu" !important;
	}
}

.has-stretched-link:has(a, .wp-block-button) {
	outline: 1px dashed var(--cals-color-secondary-300) !important;
	outline-offset: -1px;
	position: relative;

	&:not(.is-selected):hover::after {
		content: "\1F517  Entire card is linked";
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		color: white;
		font-size: 0.875rem;
		padding: 0.25rem;
		z-index: 10;
		background-color: var(--cals-color-secondary-300);
	}

	a {
		text-decoration: underline dashed 2px;
		color: var(--cals-color-secondary-300);
	}
}

/* Makes the "Add XXX" button appear more prominent */
.wp-block-cals-block-accordion-group > div,
.wp-block-cals-block-tab-group,
.wp-block-cals-block-carousel > div {
	> .block-editor-inner-blocks
		> .block-editor-block-list__layout
		> .block-list-appender {
		position: initial;

		> .block-list-appender__toggle {
			width: unset;
			padding: 1rem 0.5rem 1rem 0.25rem !important;

			&::after {
				content: attr(aria-label);
				font-family: var(--cals-font-text);
			}
		}
	}
}
