.o-dynamic {
	&:disabled {
		.o-dynamic-list-item {
			opacity: 0.5;

			&::after {
				content: "Pro";
				text-transform: uppercase;
				margin-left: 5px;
				background: #1E7DB3;
				color: #fff;
				padding: 4px 6px;
				border-radius: 2px;
				font-size: 8px;
				position: relative;
				top: -1px;
			}
		}
	}

	.o-dynamic-list-item {
		display: list-item;
		list-style-type: disc;
		list-style-position: inside;
	}
}

o-dynamic-link {
	color: #ED6F57;
	background: rgba(237, 111, 87, 0.1);
	padding: 2px 5px;
	border-radius: 8px;
	cursor: pointer;
}

.o-dynamic-button {
	opacity: 1;

	&.is-pressed {
		&::before {
			background: rgba(237, 111, 87, 0.1);
		}
	}

	.dashicon:before {
		color: #ED6F57;
	}

	svg {
		fill: #ED6F57;
	}
}

.wp-block.is-selected o-dynamic,
.wp-block:not(.is-selected) o-dynamic:not([data-preview]),
.wp-block:not(.is-selected) o-dynamic[data-preview=""] {
	color: #ED6F57;
	background: rgba(237, 111, 87, 0.1);
	padding: 2px 5px;
	border-radius: 8px;
	cursor: pointer;
}

.wp-block:not(.is-selected) {
	o-dynamic[data-preview]:not([data-preview=""]) {
		&:not(.hide-highlight) {
			text-decoration-line: underline;
			text-decoration-style: dashed;
			text-decoration-thickness: 7%;
			text-decoration-color: var(--wp-admin-theme-color);
		}
		span {
			display: none;
		}

		&:after {
			content: attr(data-preview);
		}
	}
}

o-dynamic-link {
	text-decoration: underline;
}

.o-dynamic-modal {
	.components-modal__content {
		padding: 0;
		margin: 0;
		overflow-y: hidden;
		overflow-y: scroll;
		max-width: 360px;

		&::before {
			min-height: 60px;
			margin-bottom: 0;
		}
	}

	.components-modal__header {
		background: #ffffff;
		padding: 0 24px;
		margin: 0;

		@media (min-width: 600px) {
			position: relative;
		}
	}

	&__preview {
		&__content {
			padding: 15px;
			background-color: #F3F3F3;
			border-radius: 4px;
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;

			&.is-loading {
				display: flex;
				justify-content: center;
			}

			.components-spinner {
				margin: 0;
			}
		}

		&__description {
			font-style: italic;
			font-size: 11px;
			margin-top: 5px;
		}
	}
}

.o-dynamic-popover {
	&.hidden {
		display: none;
	}

	.components-popover__content {
		width: 300px;
	}

	.components-panel__body-toggle {
		padding: 16px 48px 16px 16px;
	}

	.components-form-token-field__token-text {
		display: flex;
		align-items: center;
	}

	.o-dynamic-popover-toggle {
		width: 100%;
		justify-content: center;

		&:focus {
			box-shadow: none;
		}
	}

	.o-notice {
		margin: 10px 0 0 0;
	}
}

.media-modal.acf-expanded {
	.attachments-browser {
		max-width: 60%;
	}

	.media-sidebar {
		max-width: 40%;
	}
}

.o-media-wrapper {
	top: 0;
	border: 0;
	bottom: 0;

	.attachments-browser {
		max-width: 85%;

		.o-is-powered {
			justify-content: center;
		}
	}

	.media-sidebar {
		max-width: 15%;

		.o-media-pro-upsell {
			display: flex;
			flex-direction: column;
			align-items: center;
			padding: 6px 18px 18px;
			margin-top: 20px;
			gap: 12px;
			background: #FFFFFF;

			img {
				max-width: 80%;
			}
		}

		.o-media-pro-upsell-title {
			font-weight: 500;
			font-size: 13px;
			text-align: center;
		}

		.o-media-pro-upsell-description {
			text-align: center;
		}

		#o-feedback {
			position: absolute;
			bottom: 0;
			margin: 0 auto;
			left: 0;
			right: 0;
			width: max-content;
		}
	}

	.o-media-list {
		display: flex;
		flex-wrap: wrap;
		padding: 15px;
		margin: 0;
	}

	.o-media-item {
		display: flex;
		flex-basis: 150px;
		height: 150px;
		box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
		background: #f0f0f1;
		background-repeat: no-repeat;
		background-position-x: center;
		background-position-y: 40%;
		cursor: pointer;
		margin: 5px;
		cursor: pointer;
		list-style: none;
		position: relative;

		&:focus {
			box-shadow: inset 0 0 0 4px #4f94d4;
			outline: 2px solid transparent;
			outline-offset: -6px;
		}

		&.selected {
			box-shadow: inset 0 0 0 4px #2271b1;
		}

		&.is-disabled {
			cursor: default;
			opacity: 0.5
		}

		.check {
			display: block;
			height: 24px;
			width: 24px;
			padding: 0;
			border: 0;
			position: absolute;
			z-index: 10;
			top: 0;
			outline: none;
			background-color: #2271b1;
			box-shadow: 0 0 0 1px #fff, 0 0 0 2px #2271b1;
			cursor: pointer;
			right: 0;

			&:hover{
				.media-modal-icon {
					background-position: -61px 0;
				}
			}

			.media-modal-icon {
				display: block;
				background-position: -21px 0;
				height: 15px;
				width: 15px;
				margin: 5px;
				background-size: 134px 15px;
			}
		}
	}

	.o-media-item-title {
		font-weight: 700;
		text-transform: uppercase;
		align-self: flex-end;
		padding: 10px;
		width: 100%;
		text-align: center;
	}

	.o-media-item-label {
		background: #557BDF;
		padding: 2px 8px;
		height: 16px;
		position: absolute;
		top: 10px;
		right: 10px;
		border-radius: 3px;
		font-weight: 700;
		font-size: 10px;
		line-height: 160%;
		text-transform: uppercase;
		color: #FFFFFF;
	}
}

#o-dynamic-select {
	width: 100%;
}
