/**
 * Dinkum Query Carousel — Frontend styles.
 *
 * Resets WordPress list/grid layout on the post-template, and styles the
 * Owl Carousel navigation arrows.
 */

/* ---- Wrapper ---- */
.dinkum-query-carousel {
	position: relative;
}

/*
 * Owl's core CSS sets `.owl-carousel { display:none }` and only removes it
 * once the JS adds `.owl-loaded` to the initialised element.  Our wrapper div
 * carries the `owl-carousel` class for selector scoping but is NOT the element
 * `.owlCarousel()` is called on (the inner ul is), so `owl-loaded` never lands
 * on the div.  Override here to keep the wrapper visible at all times.
 */
.dinkum-query-carousel.owl-carousel {
	display: block;
}

/* ---- Reset WP post-template list layout so Owl Carousel takes over ---- */
.dinkum-query-carousel .wp-block-post-template {
	position: relative;
	display: block !important;
	grid-template-columns: none !important;
	padding: 0;
	margin: 0;
	list-style: none;
}

/* Each post card becomes an Owl item; reset WP margins */
.dinkum-query-carousel .wp-block-post-template .wp-block-post {
	margin: 0;
}

/* ---- Owl Carousel nav container ---- */
.dinkum-query-carousel .owl-nav {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY( -50% );
	pointer-events: none;
	display: flex;
	justify-content: space-between;
}

.dinkum-query-carousel .owl-nav.disabled {
	display: none;
}

/* ---- Arrow buttons ---- */
.dinkum-query-carousel .dinkum-qc-arrow {
	pointer-events: all;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.12 );
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
	color: #333;
	padding: 0;
}

.dinkum-query-carousel .dinkum-qc-arrow:hover {
	background: #f26522;
	color: #fff;
	border-color: transparent;
	box-shadow: 0 4px 10px rgba( 242, 101, 34, 0.35 );
	transform: scale( 1.08 );
}

.dinkum-query-carousel .dinkum-qc-arrow--prev {
	margin-left: -20px;
}

.dinkum-query-carousel .dinkum-qc-arrow--next {
	margin-right: -20px;
}

/* ---- Overflow clip so arrows don't cause scrollbar ---- */
.dinkum-query-carousel .owl-stage-outer {
	overflow: hidden;
	transition: height 0.4s ease;
}

/* ---- Responsive: smaller arrows, side-by-side at bottom-right ---- */
@media ( max-width: 767px ) {
	.dinkum-query-carousel.owl-carousel {
		margin-bottom: 3rem;
	}

	.dinkum-query-carousel .owl-nav {
		position: relative;
		top: auto;
		left: auto;
		right: auto;
		transform: none;
		justify-content: flex-end;
		gap: 8px;
		margin-top: 12px;
		pointer-events: all;
	}

	.dinkum-query-carousel .dinkum-qc-arrow {
		width: 32px;
		height: 32px;
	}

	.dinkum-query-carousel .dinkum-qc-arrow--prev {
		margin-left: 0;
	}

	.dinkum-query-carousel .dinkum-qc-arrow--next {
		margin-right: 0;
	}
}
