/**
 * Carrusel de testimonios para el sitio público (shortcode [bpc_testimonios]).
 * Mismo motor de scroll-snap que noticias-carrusel.css, con su propio look
 * de "tarjeta de cita" (comillas, estrellas, autor con avatar/iniciales).
 * Variables propias para que sea fácil re-tematizar sin tocar el panel.
 */

.bpc-testimonios-carrusel {
	--bpc-test-accent: #4F46E5;
	--bpc-test-accent-2: #06B6D4;
	--bpc-test-estrella: #E3A530;
	--bpc-test-texto: #1F2937;
	--bpc-test-texto-suave: #6B7280;
	--bpc-test-superficie: #FFFFFF;
	--bpc-test-borde: rgba(15, 23, 42, 0.06);
	--bpc-test-radius: 20px;
	--bpc-test-gap: 24px;
	--bpc-test-sombra: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
	--bpc-test-sombra-hover: 0 10px 26px rgba(15, 23, 42, 0.09);

	box-sizing: border-box;
	max-width: 100%;
	margin: 0 auto;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.bpc-testimonios-carrusel *,
.bpc-testimonios-carrusel *::before,
.bpc-testimonios-carrusel *::after {
	box-sizing: border-box;
}

/* Blindaje contra CSS genérico de botón del tema (mismo problema y misma
   solución que la cabecera flotante en v1.14.1: el tema/WooCommerce del
   sitio en vivo le pone borde a CUALQUIER <button>, sin importar de dónde
   venga — por eso las flechas del carrusel se veían con un borde rosado
   ajeno). Reset explícito con !important en las propiedades disputadas,
   más prioridad tardía en el enqueue (ver enqueue_testimonios_carrusel_assets()
   en class-bpc-cpt.php) para ganar el empate contra el CSS del tema. */
.bpc-testimonios-carrusel button {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background-image: none;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
}

.bpc-testimonios-carrusel button:focus-visible {
	outline: 2px solid var(--bpc-test-accent) !important;
	outline-offset: 2px;
}

/* Tamaño base de los íconos (bpc_icon()). Estas reglas normalmente viven
   en panel.css, pero panel.css solo se carga dentro del panel de
   administración — nunca en el sitio público (mismo patrón obligatorio
   documentado para cualquier CSS público nuevo que use bpc_icon(), ver
   bug histórico #4 en el doc de arquitectura). */
.bpc-icon { width: 20px; height: 20px; flex-shrink: 0; }
.bpc-icon--sm { width: 16px; height: 16px; }
.bpc-icon--lg { width: 26px; height: 26px; }

.bpc-testimonios-carrusel__vacio {
	color: var(--bpc-test-texto-suave, #6B7280);
	font-family: 'Poppins', sans-serif;
	text-align: center;
	padding: 24px;
}

.bpc-testimonios-carrusel__viewport {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}

.bpc-testimonios-carrusel__track {
	display: flex;
	gap: var(--bpc-test-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 6px 4px 18px;
	flex: 1 1 auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.bpc-testimonios-carrusel__track::-webkit-scrollbar {
	display: none;
}

.bpc-testimonios-carrusel__slide {
	scroll-snap-align: start;
	flex: 0 0 clamp(260px, 82vw, 340px);
	background: var(--bpc-test-superficie);
	border: 1px solid var(--bpc-test-borde);
	border-radius: var(--bpc-test-radius);
	padding: 30px 28px 26px;
	display: flex;
	flex-direction: column;
	box-shadow: var(--bpc-test-sombra);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.bpc-testimonios-carrusel__slide:hover,
.bpc-testimonios-carrusel__slide:focus-within {
	border-color: rgba(15, 23, 42, 0.1);
	box-shadow: var(--bpc-test-sombra-hover);
}

.bpc-testimonios-carrusel__comilla {
	display: inline-flex;
	color: var(--bpc-test-texto-suave);
	opacity: 0.45;
	margin-bottom: 6px;
}

.bpc-testimonios-carrusel__estrellas {
	display: flex;
	gap: 3px;
	margin-bottom: 14px;
	color: rgba(15, 23, 42, 0.12);
}

.bpc-testimonios-carrusel__estrella.is-activa {
	color: var(--bpc-test-estrella);
}

.bpc-testimonios-carrusel__estrella svg {
	fill: currentColor;
	stroke: currentColor;
}

.bpc-testimonios-carrusel__texto {
	margin: 0 0 22px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
	color: var(--bpc-test-texto);
	flex: 1 1 auto;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bpc-testimonios-carrusel__autor {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
}

.bpc-testimonios-carrusel__avatar {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	overflow: hidden;
	background: var(--bpc-test-texto);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.bpc-testimonios-carrusel__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bpc-testimonios-carrusel__autor-datos {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.bpc-testimonios-carrusel__nombre {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--bpc-test-texto);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bpc-testimonios-carrusel__cargo {
	font-size: 12.5px;
	color: var(--bpc-test-texto-suave);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bpc-testimonios-carrusel__nav {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: 999px;
	background: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--bpc-test-texto-suave);
	transition: color 0.2s ease, opacity 0.2s ease;
}

.bpc-testimonios-carrusel__nav:hover {
	color: var(--bpc-test-texto);
}

.bpc-testimonios-carrusel__nav:disabled {
	opacity: 0.3;
	cursor: default;
}

.bpc-testimonios-carrusel__nav .bpc-icon--flip {
	transform: rotate(180deg);
}

.bpc-testimonios-carrusel__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 6px;
}

.bpc-testimonios-carrusel__dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.14);
	cursor: pointer;
	padding: 0;
	transition: width 0.25s ease, background 0.25s ease;
}

.bpc-testimonios-carrusel__dot.is-active {
	width: 20px;
	background: var(--bpc-test-texto);
}

@media (max-width: 560px) {
	.bpc-testimonios-carrusel__nav {
		/* !important a propósito: sin esto, el mismo CSS agresivo de tema
		   que forzaba "display: inline-flex !important" en cualquier
		   <button> (ver el reset de arriba) le gana el empate a un
		   "display: none" normal y las flechas reaparecen en móvil. */
		display: none !important;
	}
}
