.wcr-markdown-editor {
	box-sizing: border-box;
	width: 100%;
}

.wcr-markdown-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	box-sizing: border-box;
	width: 100%;
	padding: 6px;
	border: 1px solid currentColor;
	border-bottom: 0;
	background: rgba(127, 127, 127, 0.08);
}

.wcr-markdown-tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 34px;
	min-height: 32px;
	margin: 0;
	padding: 4px 8px;
	border: 1px solid #777;
	border-radius: 2px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 0.875rem;
	line-height: 1.2;
	cursor: pointer;
}

.wcr-markdown-tool:hover,
.wcr-markdown-tool:focus {
	background: #f0f0f0;
}

.wcr-markdown-tool:disabled {
	opacity: 0.55;
	cursor: default;
}

.wcr-markdown-preview-button {
	margin-left: auto;
}

.wcr-markdown-editor textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 170px;
	margin: 0;
	padding: 10px;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: 0.95rem;
	line-height: 1.7;
	resize: vertical;
}

.wcr-markdown-preview {
	box-sizing: border-box;
	min-height: 170px;
	padding: 10px;
	border: 1px solid currentColor;
}

.wcr-markdown-help,
.wcr-markdown-status {
	margin: 6px 0 0;
	font-size: 0.875rem;
	line-height: 1.5;
}

.wcr-markdown-status.is-error,
.wcr-self-review-warning {
	color: #b00020;
}

.wcr-self-review-warning {
	margin: 10px 0 0;
	font-weight: 600;
	line-height: 1.6;
}

.wcr-markdown-rendered {
	box-sizing: border-box;
	max-width: 100%;
	line-height: 1.8;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.wcr-markdown-rendered > :first-child {
	margin-top: 0;
}

.wcr-markdown-rendered > :last-child {
	margin-bottom: 0;
}

.wcr-markdown-rendered p,
.wcr-review-content .wcr-markdown-rendered p {
	margin: 0 0 1em;
	font-size: inherit;
	line-height: inherit;
	text-indent: 0;
}

.wcr-markdown-rendered h1,
.wcr-markdown-rendered h2,
.wcr-markdown-rendered h3,
.wcr-markdown-rendered h4,
.wcr-markdown-rendered h5,
.wcr-markdown-rendered h6 {
	margin: 1.25em 0 0.6em;
	line-height: 1.35;
}

.wcr-markdown-rendered ul,
.wcr-markdown-rendered ol {
	margin: 0 0 1em 1.5em;
	padding: 0;
}

.wcr-markdown-rendered li {
	margin: 0.35em 0;
}

.wcr-markdown-rendered blockquote {
	margin: 0 0 1em;
	padding: 0.15em 0 0.15em 1em;
	border-left: 4px solid currentColor;
	opacity: 0.85;
}

.wcr-markdown-rendered blockquote p {
	margin: 0;
}

.wcr-markdown-rendered pre {
	box-sizing: border-box;
	max-width: 100%;
	margin: 0 0 1em;
	padding: 10px;
	background: rgba(127, 127, 127, 0.12);
	overflow-x: auto;
}

.wcr-markdown-rendered code {
	padding: 0.1em 0.25em;
	background: rgba(127, 127, 127, 0.12);
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
}

.wcr-markdown-rendered pre code {
	padding: 0;
	background: transparent;
}

.wcr-markdown-rendered img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1em auto;
}

.wcr-markdown-rendered hr {
	margin: 1.5em 0;
	border: 0;
	border-top: 1px solid currentColor;
}

.wcr-markdown-preview[hidden],
.wcr-markdown-status[hidden] {
	display: none !important;
}

@media (max-width: 600px) {
	.wcr-markdown-preview-button {
		margin-left: 0;
	}
}


/* Review history: a small link at the bottom left, with native disclosure. */
.wcr-review-history {
    display: block;
    clear: both;
    margin-top: 0.75em;
    text-align: left;
    font-size: 0.875em;
}
.wcr-review-history > summary {
    display: list-item;
    width: fit-content;
    color: var(--wp--preset--color--link, #2271b1);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    list-style: none;
}
.wcr-review-history > summary::-webkit-details-marker { display: none; }
.wcr-review-history > summary::marker { content: ''; }
.wcr-review-history > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.wcr-review-history-versions { margin-top: 0.75em; max-height: 28rem; overflow: auto; }
.wcr-review-history-version { padding: 0.75em 0; border-top: 1px solid #ddd; overflow-wrap: anywhere; }
.wcr-review-history-date { margin: 0 0 0.5em; opacity: 0.75; font-size: 0.9em; }

.wcr-review-actions { flex-wrap: wrap; gap: 12px; }
.wcr-review-privacy { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 12px; font-size: 14px; cursor: pointer; }
.wcr-review-privacy input[type="checkbox"] { width: auto; margin: 0; }
