/*
 * db-hero-slider.css v1.3.2
 *
 * The .banner.large-slider / .banner.small-slider visibility switching at 767px
 * comes from the global styles.css. This file adds the control bar under the
 * banner (previous, dots, next, pause/play) on --surface-dark.
 * Controls are white on #1a1a1a (17.4:1); the current dot is filled, the others
 * outlined, so the current slide is not shown by color alone.
 */

/* -- Ensure component clears floats from preceding elements -- */
.db-hero-slider {
	clear: both;
}

/* -- Control bar --
 * Three columns: empty | previous, dots, next | pause/play. The middle group is
 * always exactly centered; pause/play sits just to its right. */
.db-hero-slider .db-hero-slider__controls {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	column-gap: 6px;
	width: 100%;
	margin: 0;
	padding: 4px 8px;
	box-sizing: border-box;
	background-color: var(--surface-dark, #1a1a1a);
}

.db-hero-slider .db-hero-slider__controls[hidden] {
	display: none;
}

.db-hero-slider .db-hero-slider__nav {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.db-hero-slider .db-hero-slider__side {
	display: flex;
	align-items: center;
	justify-self: start;
}

.db-hero-slider .db-hero-slider__dots {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

/* Shared button reset */
.db-hero-slider .db-hero-slider__btn,
.db-hero-slider .db-hero-slider__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--color-white, #ffffff);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

/* Arrows and pause/play: 36px targets */
.db-hero-slider .db-hero-slider__btn {
	width: 36px;
	height: 36px;
}

.db-hero-slider .db-hero-slider__btn:hover {
	background-color: rgba(255, 255, 255, 0.15);
}

.db-hero-slider .db-hero-slider__toggle {
	margin-left: 4px;
}

/* Dots: 24px target with a 12px circle inside */
.db-hero-slider .db-hero-slider__dot {
	width: 24px;
	height: 24px;
}

.db-hero-slider .db-hero-slider__dot::before {
	content: '';
	display: block;
	width: 12px;
	height: 12px;
	box-sizing: border-box;
	border: 2px solid var(--color-white, #ffffff);
	border-radius: 50%;
	background-color: transparent;
}

.db-hero-slider .db-hero-slider__dot:hover::before {
	background-color: rgba(255, 255, 255, 0.4);
}

.db-hero-slider .db-hero-slider__dot[aria-current="true"]::before {
	background-color: var(--color-white, #ffffff);
}

/* Focus: white ring on the dark bar */
.db-hero-slider .db-hero-slider__btn:focus,
.db-hero-slider .db-hero-slider__dot:focus {
	outline: none;
}

.db-hero-slider .db-hero-slider__btn:focus-visible,
.db-hero-slider .db-hero-slider__dot:focus-visible {
	outline: 2px solid var(--color-white, #ffffff);
	outline-offset: 1px;
}

/* Slide link focus (current slide only is reachable) */
.db-hero-slider .db-hero-slider__track a:focus-visible {
	outline: 3px solid var(--color-white, #ffffff);
	outline-offset: -3px;
	box-shadow: inset 0 0 0 6px var(--color-black, #000000);
}

/* 7-8 slides on a small phone: the centered layout would be wider than the
 * screen, so fall back to one centered row (pause/play still last). Up to 6
 * slides stay centered on any phone. */
@media (max-width: 420px) {
	.db-hero-slider .db-hero-slider__controls--many {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
		gap: 4px;
	}
	.db-hero-slider .db-hero-slider__controls--many .db-hero-slider__spacer {
		display: none;
	}
}
