.editorskit-media-text-card-controls {

	.components-button {

		&.align-pull-top {
			transform: rotate(90deg);
		}

		&.align-pull-bottom {
			transform: rotate(90deg);
		}
	}
}

.wp-block-media-text {

	&.has-media-on-the-top {

		.editor-inner-blocks,
		.block-editor-inner-blocks {
			grid-column: 1;
			grid-row: 2;
		}
	}

	&.has-media-on-the-bottom {

		.editor-inner-blocks,
		.block-editor-inner-blocks {
			grid-column: 1;
			grid-row: 1;
		}

		.editor-media-container__resizer {
			grid-column: 1;
			grid-row: 2;
		}
	}
}

body.editorskit-selected--core-media-text .has-fixed-toolbar,
.editor-block-list__block[data-type="core/media-text"] {

	.editor-block-toolbar {

		&,
		.block-editor-block-toolbar__slot {

			> :nth-child(1) {
				order: 1;
			}

			> :nth-child(2) {
				order: 2;
			}

			> :nth-child(3) {
				order: 3;
			}

			> :nth-child(4) {
				order: 4;
			}

			> :nth-child(5) {
				order: 5;
			}

			> :nth-child(6) {
				order: 6;
			}

			> :nth-child(7) {
				order: 7;
			}

			> :nth-child(8) {
				order: 8;
			}

			> :nth-child(9) {
				order: 9;
			}

			> :nth-child(10) {
				order: 10;
			}

			> .editorskit-media-text-card-controls {
				order: 4;
				margin-left: -1px;
			}
		}

		> .editorskit-media-text-card-controls {
			order: 5;
		}
	}
}
