/* ===========================================================================
   Reproductor de demos de producto (assets/js/demo-player.js)
   =========================================================================== */

.dp {
	--dp-ink: var(--ink, #002048);
	--dp-blue: var(--blue, #4a6cff);
	--dp-line: var(--line, #dde5ee);
	--dp-muted: var(--muted, #5a6b80);
	position: relative;
}

.dp-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #f4f7fa;
	cursor: pointer;
	isolation: isolate;
}

.dp-stage {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	transform-origin: 0 0;
	will-change: transform;
}

.dp-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0;
	user-select: none;
	-webkit-user-drag: none;
}

.dp-img.is-front {
	opacity: 1;
}

/* Escritura: la captura "después" se descubre de izquierda a derecha. */
.dp-type {
	position: absolute;
	display: none;
	background-repeat: no-repeat;
	z-index: 2;
}

.dp-type.is-on,
.dp-type-bg.is-on {
	display: block;
}

.dp-type-bg {
	position: absolute;
	display: none;
	z-index: 1;
	border-radius: 4px;
}

/* Clic: anillo que se expande. Vive en el escenario y sigue al zoom. */
.dp-ripple {
	position: absolute;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border-radius: 50%;
	border: 3px solid rgba(74, 108, 255, 0.75);
	background: rgba(74, 108, 255, 0.18);
	opacity: 0;
	pointer-events: none;
	z-index: 3;
}

.dp-ripple.is-on {
	animation: dp-ripple 650ms ease-out;
}

.dp-cursor {
	position: absolute;
	z-index: 5;
	left: 0;
	top: 0;
	width: 28px;
	height: 28px;
	margin: -4px 0 0 -6px;
	pointer-events: none;
	filter: drop-shadow(0 3px 5px rgba(0, 20, 50, 0.35));
	opacity: 1;
}

.dp-cursor.is-off {
	opacity: 0;
}

.dp-cursor svg {
	width: 100%;
	height: 100%;
	display: block;
	transform-origin: 20% 10%;
	transition: transform 140ms ease;
}

.dp-cursor.is-down svg {
	transform: scale(0.82);
}

/* Pausa: botón grande en el centro para que se entienda que se puede reproducir. */
.dp-overlay {
	position: absolute;
	inset: 0;
	z-index: 7;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	border: 0;
	padding: 0;
	background: rgba(0, 32, 72, 0.28);
	color: #fff;
	cursor: pointer;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.dp.is-playing .dp-overlay {
	opacity: 0;
	pointer-events: none;
}

.dp-overlay-btn {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--dp-ink);
	box-shadow: 0 18px 40px -14px rgba(0, 20, 50, 0.7);
	transition: transform 0.2s ease;
}

.dp-overlay-btn svg {
	width: 30px;
	height: 30px;
	margin-left: 3px;
}

.dp-overlay:hover .dp-overlay-btn {
	transform: scale(1.06);
}

.dp-overlay-label {
	padding: 6px 12px;
	border-radius: 8px;
	background: rgba(0, 32, 72, 0.85);
	font-size: 14px;
	font-weight: 600;
}

.dp-overlay:focus-visible {
	outline: 3px solid var(--dp-blue);
	outline-offset: -3px;
}

.dp .no-anim {
	transition: none !important;
}

/* --- Tour --------------------------------------------------------------- */

/* Ancho limitado para que pestañas, ventana y subtítulo quepan juntos en una
   pantalla, contando la cabecera y la barra de secciones fijas (~330 px). */
.dp--tour {
	max-width: min(1080px, max(560px, (100vh - 330px) * 1.6));
	margin: 0 auto;
	scroll-margin-top: 140px;
}

.dp-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.dp-tab {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border: 1px solid var(--dp-line);
	border-radius: 999px;
	background: #fff;
	color: var(--dp-ink);
	font-size: 14.5px;
	font-weight: 500;
	cursor: pointer;
	transition:
		background 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}

.dp-tab:hover {
	border-color: var(--dp-blue);
}

.dp-tab[aria-selected='true'] {
	background: var(--dp-ink);
	border-color: var(--dp-ink);
	color: #fff;
}

/* Avance del capítulo activo, dentro de su pestaña. */
.dp-tab-fill {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 0;
	background: var(--cyan, #2aeaff);
	transition: width 0.6s ease;
}

.dp-tab-n {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.1em;
	opacity: 0.65;
}

.dp-window {
	border: 1px solid var(--dp-line);
	border-radius: 18px 18px 0 0;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 40px 80px -50px rgba(0, 32, 72, 0.45);
}

.dp-chrome {
	display: flex;
	gap: 7px;
	padding: 13px 18px;
	border-bottom: 1px solid var(--dp-line);
	background: var(--paper-2, #f4f7fa);
}

.dp-chrome i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #d8e1ec;
}

.dp-bar {
	position: relative;
	border: 1px solid var(--dp-line);
	border-top: 0;
	border-radius: 0 0 18px 18px;
	background: #fff;
	padding: 18px 22px 18px 26px;
}

.dp-progress {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 3px;
	background: var(--dp-line);
}

.dp-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--dp-blue), var(--cyan, #2aeaff));
	transition: width 0.6s ease;
}

.dp-bar-row {
	display: flex;
	align-items: center;
	gap: 20px;
}

.dp-caption {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: baseline;
	gap: 16px;
	min-height: 52px;
	align-items: center;
}

.dp-counter {
	flex: 0 0 auto;
	white-space: nowrap;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 12px;
	letter-spacing: 0.08em;
	color: var(--dp-blue);
}

.dp-text {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	color: var(--dp-ink);
	font-weight: 500;
}

/* Cursor de texto mientras el subtítulo se escribe. */
.dp-caret {
	display: inline-block;
	width: 2px;
	height: 1.05em;
	margin-left: 2px;
	vertical-align: -0.15em;
	background: var(--dp-blue);
	opacity: 0;
}

.dp-text.is-typing .dp-caret {
	opacity: 1;
	animation: dp-blink 0.9s steps(1) infinite;
}

.dp-controls {
	flex: 0 0 auto;
	display: flex;
	gap: 6px;
}

.dp-btn {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--dp-line);
	border-radius: 50%;
	background: #fff;
	color: var(--dp-ink);
	cursor: pointer;
	transition:
		background 0.2s ease,
		border-color 0.2s ease;
}

.dp-btn svg {
	width: 18px;
	height: 18px;
}

.dp-btn:hover:not(:disabled) {
	border-color: var(--dp-blue);
}

.dp-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.dp-btn--main {
	background: var(--dp-ink);
	border-color: var(--dp-ink);
	color: #fff;
}

.dp-btn--main:hover:not(:disabled) {
	background: var(--ink-2, #0a2e5c);
}

.dp-btn:focus-visible,
.dp-tab:focus-visible {
	outline: 2px solid var(--dp-blue);
	outline-offset: 2px;
}

/* --- Highlights de la cabecera (slides) ----------------------------------- */

.dp--slides {
	position: absolute;
	inset: 0;
}

.dp--slides .dp-viewport {
	position: absolute;
	inset: 0;
	cursor: default;
	background: #fff;
}

.dp-slide {
	opacity: 0;
	transition: opacity 900ms ease;
}

.dp-slide.is-front {
	opacity: 1;
}

.dp-slide-img {
	display: block;
	width: 100%;
	height: 100%;
	user-select: none;
	-webkit-user-drag: none;
}

.dp-chip {
	position: absolute;
	left: 16px;
	bottom: 16px;
	max-width: calc(100% - 150px);
	z-index: 6;
	padding: 9px 15px;
	border-radius: 10px;
	background: rgba(0, 32, 72, 0.9);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	box-shadow: 0 12px 30px -12px rgba(0, 20, 50, 0.6);
	opacity: 0;
	backdrop-filter: blur(6px);
}

.dp-chip.is-on {
	animation: dp-rise 500ms ease both;
}

.dp-slide-ui {
	position: absolute;
	right: 12px;
	bottom: 14px;
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 4px 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 8px 20px -12px rgba(0, 20, 50, 0.5);
}

.dp-dots {
	display: flex;
	gap: 6px;
}

.dp-dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #c4d0de;
	cursor: pointer;
	transition:
		width 0.3s ease,
		background 0.3s ease;
}

.dp-dot[aria-current='true'] {
	width: 20px;
	background: var(--dp-ink);
}

.dp-dot:focus-visible {
	outline: 2px solid var(--dp-blue);
	outline-offset: 2px;
}

.dp-btn--float {
	width: 30px;
	height: 30px;
	border: 0;
	background: transparent;
}

.dp-btn--float svg {
	width: 15px;
	height: 15px;
}

.dp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 640px) {
	.dp-bar {
		padding: 16px;
	}
	.dp-bar-row {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.dp-caption {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
	.dp-text {
		font-size: 15.5px;
	}
	.dp-controls {
		justify-content: center;
	}
	.dp-cursor {
		width: 20px;
		height: 20px;
	}
	.dp-chip {
		font-size: 12.5px;
		left: 10px;
		max-width: calc(100% - 20px);
		bottom: 52px;
	}
	.dp-overlay-btn {
		width: 56px;
		height: 56px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dp-stage,
	.dp-cursor,
	.dp-img,
	.dp-slide {
		transition: none !important;
	}
	.dp-text.is-typing .dp-caret {
		animation: none;
	}
	.dp-ripple.is-on {
		animation: none;
	}
	.dp-chip.is-on {
		animation: none;
		opacity: 1;
	}
}

@keyframes dp-ripple {
	0% {
		opacity: 1;
		transform: scale(0.35);
	}
	100% {
		opacity: 0;
		transform: scale(1.5);
	}
}

@keyframes dp-blink {
	50% {
		opacity: 0;
	}
}

@keyframes dp-rise {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
