/* OAT help: the ? button and the side panel that shows a screen's help page. */

.oat-help-host {
	position: relative;
}

.oat-help-panel [hidden],
.oat-help-panel[hidden] {
	display: none !important;
}

.oat-help-host button.oat-help-button,
.wrap button.oat-help-button {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 5;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #2271b1;
	border-radius: 50%;
	background: #fff;
	color: #2271b1;
	font: 600 15px/26px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: center;
	cursor: pointer;
}

.oat-help-host button.oat-help-button:hover,
.oat-help-host button.oat-help-button:focus,
.wrap button.oat-help-button:hover,
.wrap button.oat-help-button:focus {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
}

.wrap button.oat-help-button.oat-help-inline {
	position: static;
	margin-left: 10px;
	vertical-align: middle;
}

.oat-help-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	width: 440px;
	max-width: 100vw;
	box-sizing: border-box;
	background: #fff;
	box-shadow: -2px 0 14px rgba(0, 0, 0, 0.2);
	color: #1d2327;
	font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.admin-bar .oat-help-panel {
	top: 32px;
}

.oat-help-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	border-bottom: 1px solid #dcdcde;
}

.oat-help-title {
	flex: 1;
	margin: 0;
	font-size: 17px;
	line-height: 1.3;
}

.oat-help-panel .oat-help-head button.oat-help-back,
.oat-help-panel .oat-help-head button.oat-help-close {
	margin: 0;
	padding: 2px 8px;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #f6f7f7;
	color: #1d2327;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	text-transform: none;
	cursor: pointer;
}

.oat-help-panel .oat-help-head button.oat-help-back:hover,
.oat-help-panel .oat-help-head button.oat-help-back:focus,
.oat-help-panel .oat-help-head button.oat-help-close:hover,
.oat-help-panel .oat-help-head button.oat-help-close:focus {
	border-color: #8c8f94;
	background: #f0f0f1;
	color: #1d2327;
}

.oat-help-panel .oat-help-head button.oat-help-close {
	font-size: 18px;
	line-height: 1.2;
}

.oat-help-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	padding: 8px 16px;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
}

.oat-help-body {
	flex: 1;
	overflow-y: auto;
	padding: 12px 16px 28px;
	overflow-wrap: break-word;
}

.oat-help-body h2 {
	margin: 20px 0 6px;
	font-size: 15px;
}

.oat-help-body h3 {
	margin: 16px 0 4px;
	font-size: 14px;
}

.oat-help-body p,
.oat-help-body ul,
.oat-help-body ol {
	margin: 0 0 10px;
}

.oat-help-body ul,
.oat-help-body ol {
	padding-left: 20px;
}

.oat-help-body table {
	width: 100%;
	margin: 0 0 12px;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 13px;
}

.oat-help-body th,
.oat-help-body td {
	padding: 4px 6px;
	border: 1px solid #dcdcde;
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
}

.oat-help-body code {
	overflow-wrap: anywhere;
}

@media (max-width: 782px) {
	body.admin-bar .oat-help-panel {
		top: 46px;
	}

	.oat-help-panel {
		width: 100vw;
	}
}
