/* ============================================================
   WR List Slider — Swiper-based hero/banner slider
   Astra theme compatible, uses CSS custom properties
   ============================================================ */

/* Outer wrapper — positioning context for nav arrows */
.wr-loop-slider-outer {
	position: relative;
}

/* Swiper container */
.wr-loop-slider {
	position: relative;
	overflow: hidden;
	min-height: 1px; /* prevent FOUC */
}

.wr-loop-slider .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

/* ===========================================================
   Slide outer — full-width bg-image container
   =========================================================== */

.wr-slide {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 725px;
	box-sizing: border-box;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	/* justify-content / align-items / padding controlled by style controls */
}

/* Dark overlay */
.wr-slide-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

/* ===========================================================
   Inner container — fixed-width content box
   =========================================================== */

.wr-slide-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	/* max-width / padding / gap controlled by style controls */
}

/* ===========================================================
   Content elements
   =========================================================== */

/* Logo */
.wr-slide-logo {
	display: flex;
	justify-content: flex-start;
	margin-bottom: 20px;
}

.wr-slide-logo img {
	display: block;
	width: 160px;
	height: auto;
	max-width: 100%;
	object-fit: contain;
}

/* Tag / Label (h6-style uppercase label) */
.wr-slide-tag {
	display: inline-block;
	font-size: 0.94rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.4;
	color: #ffffff;
}

/* Primary heading */
.wr-slide-heading {
	margin: 0;
	line-height: 1.1;
	color: #ffffff;
}

/* Secondary heading */
.wr-slide-subheading {
	margin: 0;
	line-height: 1.25;
	color: #ffffff;
}

/* Description */
.wr-slide-description {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.65;
	color: rgba( 255, 255, 255, 0.85 );
}

/* ===========================================================
   Button row
   =========================================================== */

.wr-slide-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	/* justify-content controlled by text-align selector on .wr-slide-inner */
}

/* Individual button */
.wr-slide-btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
}

.wr-slide-btn:hover,
.wr-slide-btn:focus {
	text-decoration: none;
	outline: none;
}

/* Button 1 defaults */
.wr-slide-btn--1 {
	background-color: var( --ast-global-color-0, #333 );
	color: #ffffff;
}

/* Button 2 defaults */
.wr-slide-btn--2 {
	background-color: transparent;
	color: #ffffff;
	border-color: #ffffff;
}

/* ===========================================================
   Background video
   =========================================================== */

/* Video fills the entire slide behind content */
.wr-slide-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	z-index: 0;
	pointer-events: none;
}

/* Ensure overlay and content sit above video */
.wr-slide--video .wr-slide-overlay { z-index: 1; }
.wr-slide--video .wr-slide-inner   { z-index: 2; }

/* ===========================================================
   Video controls overlay
   =========================================================== */

.wr-video-controls {
	position: absolute;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 8px;
	/* position set by data-pos — default bottom-right */
	bottom: 20px;
	right: 20px;
}

.wr-video-controls[data-pos="bottom-left"]  { bottom: 20px; right: auto; left: 20px; }
.wr-video-controls[data-pos="top-right"]    { bottom: auto; top: 20px;   right: 20px; }
.wr-video-controls[data-pos="top-left"]     { bottom: auto; top: 20px;   right: auto; left: 20px; }

.wr-video-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	padding: 0;
	background-color: rgba( 0, 0, 0, 0.45 );
	color: #ffffff;
	transition: background-color 0.2s ease, transform 0.15s ease;
	flex-shrink: 0;
}

.wr-video-btn:hover {
	background-color: rgba( 0, 0, 0, 0.75 );
	transform: scale( 1.1 );
}

.wr-video-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.wr-video-btn i   { font-size: 14px; display: block; line-height: 1; pointer-events: none; }
.wr-video-btn svg { width: 14px; height: 14px; display: block; pointer-events: none; }

/* ===========================================================
   Extra / Shortcode area
   =========================================================== */

.wr-slide-extra {
	line-height: 1;
}

/* ===========================================================
   Text alignment helpers (driven by style control selector)
   =========================================================== */

.wr-slide-inner[style*="text-align: center"] .wr-slide-buttons,
.wr-slide-inner[style*="text-align:center"] .wr-slide-buttons {
	justify-content: center;
}

.wr-slide-inner[style*="text-align: right"] .wr-slide-buttons,
.wr-slide-inner[style*="text-align:right"] .wr-slide-buttons {
	justify-content: flex-end;
}

/* ===========================================================
   Navigation arrows
   =========================================================== */

.wr-slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	background-color: rgba( 0, 0, 0, 0.4 );
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
	line-height: 1;
}

.wr-slider-prev { left: 16px; }
.wr-slider-next { right: 16px; }

.wr-slider-btn:hover {
	background-color: rgba( 0, 0, 0, 0.7 );
	transform: translateY( -50% ) scale( 1.08 );
}

.wr-slider-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.wr-slider-btn.swiper-button-disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

.wr-slider-btn i   { font-size: 18px; display: block; color: #ffffff; }
.wr-slider-btn svg { width: 18px; height: 18px; display: block; fill: #ffffff; }

/* ===========================================================
   Pagination
   =========================================================== */

.wr-pagination-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 20px;
}

/*
 * Swiper's own bundle CSS sets `.swiper-pagination { position: absolute }`.
 * Our pagination element lives OUTSIDE the swiper container inside
 * .wr-pagination-wrap, so we must override to static to prevent it
 * from flying up and overlapping the slide.
 */
.wr-slider-pagination {
	position: static !important;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	width: 100%;
}

/* Bullets */
.wr-slider-pagination .swiper-pagination-bullet {
	display: inline-block;
	width: 10px;
	height: 10px;
	background-color: rgba( 0, 0, 0, 0.25 );
	opacity: 1;
	margin: 0 4px;
	border-radius: 50%;
	transition: background-color 0.2s, transform 0.2s;
	cursor: pointer;
	flex-shrink: 0;
}

.wr-slider-pagination .swiper-pagination-bullet:hover {
	transform: scale( 1.3 );
}

.wr-slider-pagination .swiper-pagination-bullet-active {
	background-color: var( --ast-global-color-0, #333 );
	transform: scale( 1.3 );
}

/* Fraction */
.wr-slider-pagination.swiper-pagination-fraction {
	font-size: 14px;
	color: var( --ast-global-color-2, #333 );
}

/* Progress bar */
.wr-slider-pagination.swiper-pagination-progressbar {
	display: block;
	position: static !important;
	height: 3px;
	background: rgba( 0, 0, 0, 0.12 );
	border-radius: 2px;
	overflow: hidden;
}

.wr-slider-pagination.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
	position: absolute;
	background: var( --ast-global-color-0, #333 );
}

/* ===========================================================
   Editor empty-state
   =========================================================== */

.wr-loop-slider-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 48px 20px;
	background: #f0f2f5;
	border: 2px dashed #c4c7cb;
	border-radius: 6px;
	color: #787c82;
	text-align: center;
}

.wr-loop-slider-empty i   { font-size: 40px; opacity: 0.45; }
.wr-loop-slider-empty p   { margin: 0; font-size: 13px; }

/* ===========================================================
   Responsive
   =========================================================== */

@media ( max-width: 767px ) {
	.wr-slider-btn      { width: 40px; height: 40px; }
	.wr-slider-prev     { left: 8px; }
	.wr-slider-next     { right: 8px; }
	.wr-slider-btn i    { font-size: 14px; }
	.wr-slider-btn svg  { width: 14px; height: 14px; }
	.wr-slide-buttons   { gap: 8px; }
}
