.customizer-modal {
	/* Some themes give their own sticky/fixed elements (e.g. a mobile bottom nav bar) a very
	   high z-index, which can end up stacked above a standard Bootstrap modal (z-index 1050)
	   and make controls near the bottom of it unreachable. Go well above anything reasonable. */
	z-index: 100000;
}
.customizer-help-modal {
	/* Opened from a button inside the design modal, on top of it, without closing/hiding the
	   design modal underneath - so it needs a higher z-index than .customizer-modal itself. */
	z-index: 100001;
}
.customizer-help-modal .modal-dialog {
	width: 95%;
	max-width: 700px;
}
.customizer-modal .modal-dialog {
	width: 95%;
	max-width: 1100px;
}
.customizer-canvas-wrap {
	width: 100%;
	text-align: center;
}
#customizer-canvas {
	border: 1px solid #ddd;
	max-width: 100%;
	touch-action: none;
}
.customizer-figure-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0;
}
.customizer-figure-thumb {
	width: 56px;
	height: 56px;
	object-fit: contain;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 2px;
	cursor: pointer;
	background: #fff;
}
.customizer-background-thumb.selected {
	border-color: #5cb85c;
	border-width: 2px;
	padding: 1px;
}
.customizer-figure-thumb:hover {
	border-color: #337ab7;
}
.customizer-upload,
.customizer-text,
.customizer-figures {
	margin-bottom: 14px;
}
.customizer-text input[type="text"],
.customizer-text select {
	margin-bottom: 6px;
}
.customizer-text input[type="color"] {
	width: 44px;
	height: 34px;
	vertical-align: middle;
	margin-right: 6px;
}
.customizer-actions {
	margin-top: 10px;
}
.customizer-actions .btn {
	margin-right: 6px;
	margin-bottom: 6px;
}
.customizer-status {
	margin-top: 8px;
	color: #777;
}
#customizer-preview-thumb {
	max-width: 160px;
	border: 1px solid #ddd;
	margin-top: 10px;
	cursor: pointer;
	transition: opacity 0.15s;
}
#customizer-preview-thumb:hover {
	opacity: 0.85;
}

/* Mobile: make the design modal use the full screen and allow normal scrolling
   so the canvas, figure list and Save button are all reachable. */
@media (max-width: 767px) {
	.customizer-modal.modal.in,
	.customizer-modal.modal.show {
		display: block !important;
	}
	.customizer-modal .modal-dialog {
		width: 100%;
		max-width: 100%;
		margin: 0;
		height: 100%;
	}
	.customizer-modal .modal-content {
		min-height: 100%;
		border: 0;
		border-radius: 0;
		display: flex;
		flex-direction: column;
	}
	.customizer-modal .modal-header {
		flex: 0 0 auto;
	}
	.customizer-modal .modal-body {
		flex: 1 1 auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		max-height: none;
		/* Extra breathing room below the Save button so it clears any sticky bottom bar
		   the theme itself adds to the page, and iOS's home-indicator safe area. */
		padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
	}
	.customizer-layout.row > div {
		width: 100%;
	}
	.customizer-figure-thumb {
		width: 64px;
		height: 64px;
	}
}
