/********************************************************/
/*
/*      History CSS
/*
/********************************************************/
.wp-block-cke-history,
:is(.edit-post-visual-editor, .editor-styles-wrapper) .is-root-container > .wp-block-cke-history {
	width: 100% !important;
	max-width: var(--wp--style--global--wide-size) !important;
}

.wp-block-cke-history {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: max-content;
	column-gap: var(--wp--preset--spacing--2-5);
	row-gap: var(--wp--preset--spacing--1-5);
	padding-block: var(--wp--preset--spacing--6-5);
}

/* Inner blocks */
.wp-block-cke-history > .acf-innerblocks-container {
	grid-column: 1 / span 2;
	grid-row: 1;
	max-width: 75%;
	margin-block-end: var(--wp--preset--spacing--4);
}

/* Entries images */
.wp-block-cke-history > .entries-images {
	grid-column: 1;
	grid-row: 2 / span 3;
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: 100%;
}

.wp-block-cke-history > .entries-images > figure {
	grid-column: 1;
	grid-row: 1;
	width: 100%;
	height: 100%;
	opacity: 0;
	pointer-events: none;
	user-select: none;
	transition: opacity .6s;
}

.wp-block-cke-history > .entries-images > figure.active {
	opacity: 1;
	transition: opacity .6s .1s;
}

.wp-block-cke-history > .entries-images > figure > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Entries content */
.wp-block-cke-history > .entries-content {
	grid-column: 2;
	grid-row: 2;
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: max-content;
	margin-block-start: var(--wp--preset--spacing--2-5);
}

.wp-block-cke-history > .entries-content > .entry-content {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100%;
	opacity: 0;
	pointer-events: none;
	user-select: none;
	transition: opacity .6s;
}

.wp-block-cke-history > .entries-content > .entry-content.active {
	opacity: 1;
	pointer-events: all;
	transition: opacity .6s .45s;
}

.wp-block-cke-history > .entries-content > .entry-content > * {
	max-width: 75%;
	text-align: center;
}

/* Active year */
.wp-block-cke-history > .active-year {
	--height: 125px;
	
	grid-column: 2;
	grid-row: 3;
	justify-self: center;
	width: max-content;
	height: var(--height);
	max-height: 80svh;
	display: flex;
	margin-block-start: var(--wp--preset--spacing--2-5);
	overflow: hidden;
	pointer-events: none;
	user-select: none;
}

.wp-block-cke-history > .active-year > h2 {
	--digit: 0;
	--max-width: 100%;
	--gap: var(--wp--preset--spacing--1);
	
	display: flex;
	flex-direction: column;
	gap: var(--gap);
	max-width: var(--max-width);
	height: 100%;
	margin-block: unset;
	translate: 0 calc((var(--height) * (var(--digit) * -1)) - (var(--gap) * var(--digit)));
	transition: translate .6s cubic-bezier(0.770, 0.000, 0.175, 1.000), max-width .3s .25s;
}

.wp-block-cke-history > .active-year.resizing > h2 {
	transition: unset !important;
}

.wp-block-cke-history > .active-year > h2 > span {
	position: relative;
	width: max-content;
	font-size: var(--wp--preset--font-size--omega, 9rem);
	line-height: var(--height);
	height: var(--height);
	text-align: center;
	user-select: none;
}

/* Indicator years */
.wp-block-cke-history > .indicator-years {
	grid-column: 2;
	grid-row: 4;
	justify-self: center;
	display: flex;
	flex-wrap: wrap;
	column-gap: var(--wp--preset--spacing--0-75);
	row-gap: var(--wp--preset--spacing--0-25);
}

.wp-block-cke-history > .indicator-years > span {
	width: max-content;
	max-width: 100%;
	line-height: normal;
	color: var(--wp--custom--color--default--text);
	cursor: pointer;
	transition: color .3s;
	user-select: none;
}

.wp-block-cke-history > .indicator-years > span:is(:hover, :focus, :active) {
	color: var(--wp--custom--color--default--focus);
}

.wp-block-cke-history > .indicator-years > span.active {
	color: var(--wp--custom--color--default--accent);
}

/* Margins */
.wp-block-cke-history :is(.acf-innerblocks-container, .entry-content, .indicator-years, .active-year) > * {
	margin-block: unset;
}

.wp-block-cke-history :is(.acf-innerblocks-container, .entry-content) > * + * {
	margin-block-start: 1em;
}

/* Background support */
.wp-block-cke-history.has-background {
	position: relative;
}

.wp-block-cke-history.has-background::before {
	content: '';
	position: absolute;
	top: 0;
	left: calc((var(--wp--custom--viewport-width) - 100%) / 2 * -1);
	width: var(--wp--custom--viewport-width);
	height: 100%;
	background-color: inherit;
	z-index: -1;
}

/******************************/
/* Backend style
/******************************/
:is(.edit-post-visual-editor, .editor-styles-wrapper) .wp-block-cke-history {
	opacity: 1;
}

:is(.edit-post-visual-editor, .editor-styles-wrapper) .wp-block-cke-history > .indicator-years > span {
	pointer-events: none;
}

/******************************/
/* Responsive
/******************************/