/* Booking message editor (#2500). */
.fair-events-booking-message__label {
	display: block;
	margin-bottom: 8px;
}

/* Keep the classic editor, its mode tabs and toolbar inside the card. */
.fair-events-booking-message__editor .wp-editor-wrap,
.fair-events-booking-message__editor textarea {
	box-sizing: border-box;
	max-width: 100%;
}

/* Chosen size. `!important` wins over the inline heights TinyMCE and the
   Visual/Code switch write, so the size holds across mode switches; without
   the class the editor keeps WordPress's original heights. */
.fair-events-booking-message__editor.is-resized textarea,
.fair-events-booking-message__editor.is-resized .mce-edit-area iframe {
	height: var(--fair-events-message-height) !important;
}

/* While dragging, the Visual iframe would swallow pointer events crossing
   it; the handle keeps them through pointer capture. */
.fair-events-booking-message__editor.is-resizing iframe {
	pointer-events: none;
}

.fair-events-booking-message__editor.is-resizing,
.fair-events-booking-message__editor.is-resizing * {
	cursor: ns-resize;
	user-select: none;
}

/* Full-width bar below the editor, tall enough for a finger. `touch-action`
   stops the browser scrolling the page during a touch drag. */
.fair-events-booking-message__resize-handle {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 24px;
	margin-top: 4px;
	border: 1px solid #dcdcde;
	border-radius: 2px;
	background: #f6f7f7;
	cursor: ns-resize;
	touch-action: none;
}

.fair-events-booking-message__resize-handle:hover {
	background: #f0f0f1;
}

.fair-events-booking-message__resize-handle:focus-visible {
	outline: 2px solid var(--wp-admin-theme-color, #3858e9);
	outline-offset: 1px;
}

/* Two short lines, the common grip for a vertical resize. */
.fair-events-booking-message__resize-grip {
	width: 32px;
	height: 6px;
	border-top: 2px solid #8c8f94;
	border-bottom: 2px solid #8c8f94;
	box-sizing: border-box;
}
