/* Tabla de Talles — estilos frontend (namespaced .tdt-) */

.tdt-wrap {
	margin: 16px 0;
}

/* Botón disparador (común a popup y acordeón) */
.tdt-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	font-size: 0.95em;
	line-height: 1.2;
	cursor: pointer;
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	border-radius: 4px;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.tdt-trigger:hover,
.tdt-trigger:focus {
	opacity: 0.8;
}

.tdt-trigger:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.tdt-icon {
	font-size: 1.1em;
	line-height: 1;
}

.tdt-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

/* ---------- Modo popup (modal) ---------- */
.tdt-modal[hidden] {
	display: none;
}

.tdt-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.tdt-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
}

.tdt-modal-content {
	position: relative;
	z-index: 1;
	background: #fff;
	color: #222;
	border-radius: 6px;
	max-width: 720px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: tdt-fade-in 0.18s ease;
}

@keyframes tdt-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.tdt-modal-title {
	margin: 0 36px 16px 0;
	font-size: 1.25em;
}

.tdt-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	background: transparent;
	border: none;
	color: #555;
	border-radius: 4px;
}

.tdt-modal-close:hover,
.tdt-modal-close:focus {
	background: rgba(0, 0, 0, 0.08);
	color: #000;
}

/* Bloquea el scroll del body cuando el modal está abierto */
body.tdt-modal-open {
	overflow: hidden;
}

/* ---------- Modo acordeón ---------- */
.tdt-trigger-accordion {
	width: 100%;
	justify-content: flex-start;
}

.tdt-chevron {
	margin-left: auto;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid currentColor;
	transition: transform 0.2s ease;
}

.tdt-trigger-accordion[aria-expanded="true"] .tdt-chevron {
	transform: rotate(180deg);
}

.tdt-panel[hidden] {
	display: none;
}

/* Animación de despliegue (slide). max-height lo controla el JS. */
.tdt-panel {
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.3s ease;
}

.tdt-panel-inner {
	padding: 16px 0;
}
