/**
 * Blocks CSS for Query Features
 * 
 * Contains general block styles. Is enqueued in the front- & backend.
 * This file does not get processed and is loaded *after* editor styles so it
 * will take precedence over editor-specific styles using the same selectors.
 */


/*    Post template
__________________________________
*/
ul.wp-block-post-template {
	list-style: none;
	width: 100%;
}
ul.wp-block-post-template li {
	margin: 0px !important;
}


/*    Post overview
__________________________________
*/
.greyd-posts-slider .results_wrapper {
	width: calc(100% + (2 * var(--wp--style--block-gap)));
	margin: 0 calc( -1 * var(--wp--style--block-gap));
	overflow: hidden;
}
.greyd-posts-slider .results_wrapper:has( > div:first-child:last-child ) {
	overflow: visible;
}
.greyd-posts-slider .search_result {
	margin: 0 !important;
	padding: 0 var(--wp--style--block-gap) var(--wp--style--block-gap);
}
/* .greyd-posts-slider .search_result:last-child {
	padding-bottom: 0;
} */
.greyd-posts-slider .wp-block-button.is-style-link-prim:focus > .wp-block-button__link,
.greyd-posts-slider .wp-block-button.is-style-link-prim:hover > .wp-block-button__link,
.greyd-posts-slider .wp-block-button.is-style-link-prim > .wp-block-button__link {
	text-decoration: none;
}

/**
 * Cover flow animation
 * @since 1.2.4
 */
.greyd-posts-slider[data-animation=cover] {
	--transition: transform 300ms;
	/* outline: 2px solid red;
	overflow: visible; */
}
.greyd-posts-slider[data-animation=cover] .result_wrapper:first-child {
	position: relative;
}
.greyd-posts-slider[data-animation=cover] .result_wrapper {
	-webkit-transition: var(--transition);
	   -moz-transition: var(--transition);
		-ms-transition: var(--transition);
		 -o-transition: var(--transition);
			transition: var(--transition);

	position: absolute;
	left: 0;
	top: 50%;
	z-index: 9;
	padding: 0 14%;
	/* before */
	transform: translate(-89%, -50%) scale(0.6)
}
.greyd-posts-slider[data-animation=cover] .result_wrapper.is-prev {
	/* prev */
	transform: translate(-38%, -50%) scale(0.6)
}
.greyd-posts-slider[data-animation=cover] .result_wrapper.is-current {
	/* current */
	transform: translate(0%, -50%) scale(0.9)
}
.greyd-posts-slider[data-animation=cover] .result_wrapper.is-current + .result_wrapper {
	/* next */
	transform: translate(38%, -50%) scale(0.6)
}
.greyd-posts-slider[data-animation=cover] .result_wrapper.is-current + .result_wrapper ~ .result_wrapper {
	/* after */
	transform: translate(80%, -50%) scale(0.6)
}
.greyd-posts-slider[data-animation=cover] .result_wrapper:not(.is-current) {
	pointer-events: none;
}
.greyd-posts-slider[data-animation=cover] .result_wrapper .search_result:first-child:last-child {
	-webkit-transform-style: preserve-3d;
	   -moz-transform-style: preserve-3d;
		-ms-transform-style: preserve-3d;
			transform-style: preserve-3d;
   
	-webkit-transition: var(--transition);
	   -moz-transition: var(--transition);
		-ms-transition: var(--transition);
		 -o-transition: var(--transition);
			transition: var(--transition);

	transform: perspective(1000px) rotateY(70deg)
}
.greyd-posts-slider[data-animation=cover] .result_wrapper.is-current .search_result:first-child:last-child {
	transform: perspective(1000px)
}
.greyd-posts-slider[data-animation=cover] .result_wrapper.is-current ~ .result_wrapper .search_result:first-child:last-child {
	transform: perspective(1000px) rotateY(-70deg)
}


/*    Pagination
__________________________________
*/
.greyd-posts-slider.greyd-posts-slider {
	position: relative;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
}
.greyd-posts-slider .results_wrapper {
	position: relative;
	flex: 2 2 50px;
}
.greyd-posts-slider .pgn img {
	max-width: none;
	width: 1em;
}

/* sorting */
.greyd-posts-slider .pgn.sorting {
	width: 100%;
	display: flex;
	align-self: start;
}
.greyd-posts-slider .no_result {
	width: 100%;
}

/* arrows */
.greyd-posts-slider .pgn.arrows {
	position: relative;
	display: flex;
	flex: 0 0 0;
	align-items: center;
}
.greyd-posts-slider .pgn.arrows a {
	padding: 0.5rem;
	font-size: 1.4em;
	text-decoration: none;
}
.greyd-posts-slider .pgn.arrows.overlap {
	position: absolute;
	z-index: 10;
	top: 0;
	bottom: 0;
}
.greyd-posts-slider .pgn.arrows.overlap.left {
	left: 0;
}
.greyd-posts-slider .pgn.arrows.overlap.right {
	right: 0;
}

/* numbers */
.greyd-posts-slider .pgn.numbers {
	width: 100%;
	padding: 1rem;
}
.greyd-posts-slider .pgn.numbers,
.greyd-posts-slider .pgn.numbers .pgn_numbers {
	display: flex;
	justify-content: center;
	gap: var(--pgn-numbers-gutter, 8px);
}
.greyd-posts-slider .pgn.numbers .pgn_numbers {
	flex-wrap: wrap;
}
/* for block editor preview */
.greyd-posts-slider .pgn.numbers > span {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--pgn-numbers-gutter, 8px);
}
.greyd-posts-slider .pgn.numbers a {
	line-height: 1;
	margin: 0;
	text-decoration: none;
	word-break: normal;
}
.greyd-posts-slider .pgn.numbers.overlap {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 10;
}
.greyd-posts-slider .pgn.numbers.overlap.top {
	top: 0;
}
.greyd-posts-slider .pgn.numbers.overlap.bottom {
	bottom: var(--wp--style--block-gap);
}
