/* ============================================================
   DLC Department Testimonials - v1.2.1
   Rotating quotes over a department background photo.
   Desktop height / text top padding come from the settings
   (defaults 310px / 105px, matching the legacy .testimonial).
   Tokens: --font-accent, --font-primary, --font-size-16/18/25,
   --text-body, --text-halo-light, --brand-purple, --focus-ring
   ============================================================ */

/* -- Section wrapper ----------------------------------------- */
.dlc-dept-test {
	/* Crisp light halo: 1px outline on all sides plus a soft 2px glow.
	   Counts as the text background, so dark text passes AA over any
	   part of the photo. */
	--dt-halo-color: var(--text-halo-light);
	--dt-halo:
		-1px -1px 0 var(--dt-halo-color),
		 1px -1px 0 var(--dt-halo-color),
		-1px  1px 0 var(--dt-halo-color),
		 1px  1px 0 var(--dt-halo-color),
		 0   -1px 0 var(--dt-halo-color),
		 0    1px 0 var(--dt-halo-color),
		-1px  0   0 var(--dt-halo-color),
		 1px  0   0 var(--dt-halo-color),
		 0    0   2px var(--dt-halo-color);

	position: relative;
	margin-bottom: 1.5em;
	background-color: var(--color-white);
	background-position: top center;
	background-repeat: no-repeat;
	background-size: cover;
	min-height: var(--dt-height);
	padding-top: var(--dt-pad-top);
	padding-bottom: 48px;
	box-sizing: border-box;
	overflow: hidden;
}

.dlc-dept-test:focus-visible {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* -- Track: every quote shares one grid cell, so the section
      grows to fit the longest quote instead of clipping it ----- */
.dlc-dept-test__track {
	display: grid;
	width: 100%;
}

.dlc-dept-test__item {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	padding: 0 2em;
	box-sizing: border-box;
	text-align: left;
}

.dlc-dept-test__item--active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 1;
}

.dlc-dept-test__item--hidden {
	display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
	.dlc-dept-test__item {
		transition: opacity 0.6s ease, visibility 0.6s ease;
	}
}

/* -- Quote --------------------------------------------------- */
.dlc-dept-test__quote {
	font-family: var(--font-accent);
	font-style: italic;
	font-weight: 400;
	font-size: var(--font-size-25);
	line-height: 1.45;
	color: var(--text-body);
	text-shadow: var(--dt-halo);
	margin: 0 0 0.6em;
	padding: 0;
	border: none;
	width: 100%;
	max-width: none;
	display: block;
	text-align: left !important;
}

.dlc-dept-test__quote::before { content: '"'; }
.dlc-dept-test__quote::after  { content: '"'; }

/* -- Attribution --------------------------------------------- */
.dlc-dept-test__attribution {
	font-family: var(--font-primary);
	font-size: var(--font-size-16);
	font-weight: 600;
	color: var(--text-body);
	text-shadow: var(--dt-halo);
	margin: 0;
	text-align: left !important;
}

/* -- Controls ------------------------------------------------ */
.dlc-dept-test__controls {
	position: absolute;
	bottom: 6px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.dlc-dept-test__arrow,
.dlc-dept-test__pause {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	min-width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	background: none;
	border: none;
	border-radius: 3px;
	color: var(--text-body);
	font-size: var(--font-size-18);
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	text-shadow: var(--dt-halo);
}

.dlc-dept-test__pause[hidden] {
	display: none;
}

.dlc-dept-test__pause svg {
	filter: drop-shadow(0 0 1px var(--text-halo-light));
}

.dlc-dept-test__pause .dlc-dept-test__icon-play,
.dlc-dept-test__pause.is-paused .dlc-dept-test__icon-pause {
	display: none;
}

.dlc-dept-test__pause.is-paused .dlc-dept-test__icon-play {
	display: block;
}

.dlc-dept-test__arrow:hover,
.dlc-dept-test__pause:hover {
	color: var(--brand-purple);
}

.dlc-dept-test__arrow:focus-visible,
.dlc-dept-test__pause:focus-visible,
.dlc-dept-test__dot:focus-visible {
	outline: var(--focus-ring);
	outline-offset: 0;
}

.dlc-dept-test__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
}

/* 24px button, 7px dot drawn inside (11px when active) */
.dlc-dept-test__dot {
	position: relative;
	width: 24px;
	height: 24px;
	padding: 0;
	margin: 0;
	background: none;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	flex-shrink: 0;
}

.dlc-dept-test__dot::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--text-body);
	opacity: 0.45;
	transform: translate(-50%, -50%);
	box-shadow: 0 0 0 1px var(--text-halo-light);
}

.dlc-dept-test__dot--active::before {
	width: 11px;
	height: 11px;
	opacity: 1;
}

.dlc-dept-test__dot:hover::before {
	opacity: 0.8;
}

@media (prefers-reduced-motion: no-preference) {
	.dlc-dept-test__arrow,
	.dlc-dept-test__pause {
		transition: color 0.2s ease;
	}
}

/* -- 480px to 767px ------------------------------------------ */
@media (min-width: 480px) and (max-width: 767px) {
	.dlc-dept-test {
		padding-top: 12%;
		min-height: 200px;
	}
	.dlc-dept-test__item { padding: 0 1.25em; }
	.dlc-dept-test__quote { font-size: var(--font-size-18); }
	.dlc-dept-test__attribution { margin-top: 0.5em; }
}

/* -- Below 480px --------------------------------------------- */
@media (max-width: 479px) {
	.dlc-dept-test {
		padding-top: 10%;
		min-height: 200px;
	}
	.dlc-dept-test__item { padding: 0 1.25em; }
	.dlc-dept-test__quote { font-size: var(--font-size-18); }
	.dlc-dept-test__attribution { margin-top: 0.5em; }
}

/* -- Phones: 44px arrow / pause targets ---------------------- */
@media (max-width: 767px) {
	.dlc-dept-test { padding-bottom: 56px; }
	.dlc-dept-test__arrow,
	.dlc-dept-test__pause {
		min-width: 44px;
		height: 44px;
	}
}
