/* DT Presentación PPTX — front. Colores desde DT Identidad Visual (--dt-*) con valores por defecto. */
.dtpptx {
	--dtp-primary: var(--dt-primary, #7C3AED);
	--dtp-secondary: var(--dt-secondary, #A855F7);
	--dtp-hover: var(--dt-primary-hover, #6D28D9);
	--dtp-soft: var(--dt-primary-soft, #F3EEFF);
	--dtp-text: var(--dt-text, #0F172A);
	--dtp-muted: var(--dt-muted, #64748B);
	--dtp-border: var(--dt-border, #E2E8F0);
	--dtp-gradient: var(--dt-panel-gradient, linear-gradient(135deg, #07132F 0%, #7C3AED 100%));
	--dtp-surface: #FFFFFF;
	--dtp-stage: #F8FAFC;
	position: relative;
	max-width: 100%;
	margin: 0 0 1.5em;
	background: var(--dtp-surface);
	color: var(--dtp-text);
	border: 1px solid var(--dtp-border);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
	font-family: inherit;
	line-height: 1.4;
	outline-offset: 4px;
}
.dtpptx *, .dtpptx *::before, .dtpptx *::after { box-sizing: border-box; }

/* Cabecera con degradado DT */
.dtpptx-head {
	background: var(--dtp-gradient);
	color: #fff;
	padding: 16px 22px 18px;
}
.dtpptx-eyebrow {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .82;
	margin-bottom: 4px;
}
.dtpptx .dtpptx-title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-size: clamp(17px, 2.2vw, 21px);
	font-weight: 700;
	line-height: 1.25;
	border: 0;
}

/* Visor PPTX */
.dtpptx-doc {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	min-height: 300px;
	background: var(--dtp-stage);
}
.dtpptx-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: transparent;
}
.dtpptx-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: var(--dtp-muted);
	font-size: 14px;
	pointer-events: none;
	transition: opacity .3s ease;
}
.dtpptx.is-loaded .dtpptx-loading { opacity: 0; }
.dtpptx-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid var(--dtp-soft);
	border-top-color: var(--dtp-primary);
	animation: dtpptxSpin .9s linear infinite;
}
@keyframes dtpptxSpin { to { transform: rotate(360deg); } }

/* Carrusel */
.dtpptx-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 160px;
	background: var(--dtp-stage);
}
.dtpptx-images { width: 100%; position: relative; display: grid; place-items: center; }
.dtpptx .dtpptx-slide {
	display: none;
	width: 100%;
	height: auto;
	max-height: 75vh;
	object-fit: contain;
	margin: 0;
	border-radius: 0;
}
.dtpptx .dtpptx-slide.is-active { display: block; animation: dtpptxFade .25s ease-out; }
@keyframes dtpptxFade { from { opacity: .4; } to { opacity: 1; } }
.dtpptx button { font: inherit; cursor: pointer; }
.dtpptx .dtpptx-stage-arrow {
	position: absolute;
	z-index: 2;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	padding: 0;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: var(--dtp-primary);
	font-size: 16px;
	box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
	transition: background .15s, color .15s, transform .15s;
}
.dtpptx .dtpptx-stage-arrow:hover { background: var(--dtp-primary); color: #fff; }
.dtpptx-stage-arrow.dtpptx-prev { left: 14px; }
.dtpptx-stage-arrow.dtpptx-next { right: 14px; }

.dtpptx-progress { height: 4px; background: var(--dtp-soft); }
.dtpptx-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--dtp-primary), var(--dtp-secondary)); transition: width .25s ease; }

/* Barra de controles */
.dtpptx-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-top: 1px solid var(--dtp-border);
	background: var(--dtp-surface);
}
.dtpptx .dtpptx-btn {
	display: inline-grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--dtp-border);
	border-radius: 10px;
	background: var(--dtp-surface);
	color: var(--dtp-primary);
	font-size: 17px;
	line-height: 1;
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.dtpptx .dtpptx-btn:hover,
.dtpptx .dtpptx-btn:focus-visible,
.dtpptx .dtpptx-btn[aria-expanded="true"] { background: var(--dtp-primary); border-color: var(--dtp-primary); color: #fff; }
.dtpptx-count { font-size: 14px; font-weight: 700; min-width: 64px; text-align: center; color: var(--dtp-text); }
.dtpptx-spacer { flex: 1; }
.dtpptx-badge {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	padding: 4px 9px;
	border-radius: 999px;
	color: var(--dtp-primary);
	background: var(--dtp-soft);
}
.dtpptx-hint { font-size: 13px; color: var(--dtp-muted); }
.dtpptx-note {
	margin: 0;
	padding: 10px 16px;
	font-size: 13px;
	background: #FFF7ED;
	color: #9A3412;
	border-top: 1px solid #FED7AA;
}

/* Miniaturas */
.dtpptx-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 14px 16px; border-top: 1px solid var(--dtp-border); }
.dtpptx-thumbnails[hidden] { display: none; }
.dtpptx .dtpptx-thumbnails button {
	position: relative;
	flex: 0 0 112px;
	padding: 3px;
	border: 2px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: inherit;
}
.dtpptx .dtpptx-thumbnails button.is-active { border-color: var(--dtp-primary); }
.dtpptx-thumbnails img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; border-radius: 6px; background: var(--dtp-stage); }
.dtpptx-thumbnails span {
	position: absolute;
	left: 7px;
	bottom: 7px;
	min-width: 20px;
	padding: 1px 5px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: var(--dtp-primary);
}

/* Estilo oscuro */
.dtpptx--oscuro { --dtp-surface: #0B1736; --dtp-stage: #07102A; --dtp-text: #F1F5F9; --dtp-muted: #94A3B8; --dtp-border: rgba(148, 163, 184, .22); }
.dtpptx--oscuro .dtpptx-btn { color: #fff; }
.dtpptx--oscuro .dtpptx-badge { background: rgba(255, 255, 255, .1); color: #fff; }

/* Estilo minimal */
.dtpptx--minimal { border: 0; box-shadow: none; border-radius: 12px; }
.dtpptx--minimal .dtpptx-controls { border-top: 0; padding-left: 0; padding-right: 0; }

/* Pantalla completa */
.dtpptx:fullscreen { display: flex; flex-direction: column; border-radius: 0; border: 0; max-width: none; margin: 0; }
.dtpptx:fullscreen .dtpptx-stage, .dtpptx:fullscreen .dtpptx-doc { flex: 1; min-height: 0; aspect-ratio: auto; }
.dtpptx:fullscreen .dtpptx-images { height: 100%; }
.dtpptx:fullscreen .dtpptx-slide { max-height: calc(100vh - 120px); width: auto; max-width: 100%; margin: auto; }
.dtpptx.dtpptx-is-zoomed .dtpptx-stage { overflow: auto; justify-content: flex-start; }
.dtpptx.dtpptx-is-zoomed .dtpptx-slide.is-active { max-width: none; width: 160%; max-height: none; }
.dtpptx button:focus-visible, .dtpptx a:focus-visible { outline: 3px solid var(--dtp-secondary); outline-offset: 2px; }

.dtpptx-empty { padding: 12px 16px; border: 1px dashed #F59E0B; border-radius: 10px; background: #FFFBEB; color: #92400E; }

@media (max-width: 600px) {
	.dtpptx { border-radius: 12px; }
	.dtpptx-head { padding: 12px 16px 14px; }
	.dtpptx-doc { aspect-ratio: 4 / 3; min-height: 240px; }
	.dtpptx-hint { display: none; }
	.dtpptx .dtpptx-stage-arrow { width: 32px; height: 32px; font-size: 13px; }
	.dtpptx-stage-arrow.dtpptx-prev { left: 6px; }
	.dtpptx-stage-arrow.dtpptx-next { right: 6px; }
	.dtpptx-controls { gap: 6px; padding: 8px 10px; }
	.dtpptx .dtpptx-btn { min-width: 34px; height: 34px; padding: 0 8px; font-size: 15px; }
	.dtpptx-count { font-size: 12px; min-width: 48px; }
}
