/**
 * Продолжение текста / text spoiler (front + editor)
 */
.wp-block-reboot-text-spoiler.reboot-text-spoiler {
	--reboot-ts-accent: var(--theme-color-accent, #2271b1);
	--reboot-ts-border: rgba(0, 0, 0, 0.08);
	--reboot-ts-muted: rgba(0, 0, 0, 0.55);
	margin-top: 1.25em;
	margin-bottom: 1.25em;
}

.reboot-text-spoiler__content {
	margin: 0;
	padding: 0;
}

.reboot-text-spoiler__content[hidden] {
	display: none !important;
}

.reboot-text-spoiler.is-expanded .reboot-text-spoiler__content {
	display: block !important;
}

.reboot-text-spoiler__content > *:first-child {
	margin-top: 0;
}

.reboot-text-spoiler__content > *:last-child {
	margin-bottom: 0;
}

.reboot-text-spoiler__toolbar {
	margin-top: 0.5em;
	display: flex;
	line-height: inherit;
}

.reboot-text-spoiler__toolbar--left {
	justify-content: flex-start;
}

.reboot-text-spoiler__toolbar--center {
	justify-content: center;
}

.reboot-text-spoiler__toolbar--right {
	justify-content: flex-end;
}

/* Текстовая ссылка «продолжить / свернуть» (+ старые посты с <button>) */
a.reboot-text-spoiler__toggle,
button.reboot-text-spoiler__toggle {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: var(--reboot-ts-accent);
	background: none;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	box-shadow: none;
	transition: color 0.15s ease, opacity 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
	text-align: inherit;
}

a.reboot-text-spoiler__toggle:hover,
button.reboot-text-spoiler__toggle:hover {
	color: var(--reboot-ts-accent);
	opacity: 0.85;
	text-decoration-thickness: 2px;
}

a.reboot-text-spoiler__toggle:focus-visible,
button.reboot-text-spoiler__toggle:focus-visible {
	outline: 2px solid var(--reboot-ts-accent);
	outline-offset: 2px;
}

/* Редактор: контент всегда виден */
.block-editor-block-list__block .reboot-text-spoiler.is-editor .reboot-text-spoiler__content {
	display: block !important;
}

.block-editor-block-list__block .reboot-text-spoiler.is-editor {
	border: 1px dashed var(--reboot-ts-border, rgba(0, 0, 0, 0.12));
	border-radius: 8px;
	padding: 12px 14px 14px;
	background: rgba(0, 0, 0, 0.02);
}

.block-editor-block-list__block .reboot-text-spoiler.is-editor .reboot-text-spoiler__hint {
	margin: 0 0 10px;
	font-size: 12px;
	line-height: 1.45;
	color: var(--reboot-ts-muted, rgba(0, 0, 0, 0.55));
}

.block-editor-block-list__block .reboot-text-spoiler.is-editor .reboot-text-spoiler__toolbar {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed var(--reboot-ts-border, rgba(0, 0, 0, 0.1));
}

.block-editor-block-list__block .reboot-text-spoiler.is-editor .reboot-text-spoiler__toggle--preview {
	cursor: default;
	opacity: 0.75;
	pointer-events: none;
	text-decoration: underline;
	text-decoration-style: dashed;
}
