/* Biblioteca de tecnopinball: listado y fichas. Hereda tipografía y colores del tema. */
.tpb-listado,
.tpb-ficha,
.tpb-aportar,
.tpb-fabricantes,
.tpb-portada {
	--tpb-borde: #e2e2e2;
	--tpb-suave: #f6f6f6;
	--tpb-tenue: #777;
}
.tpb-migas {
	margin-bottom: .5em;
	font-size: .9em;
	color: var(--tpb-tenue);
}
.tpb-correo {
	vertical-align: middle;
}
.tpb-listado .tpb-logo {
	display: block;
	max-height: 120px;
	width: auto;
	margin-bottom: 1em;
}

/* Filtros */
.tpb-filtros {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 1.5em 0 1em;
}
.tpb-filtros input[type=search] {
	flex: 1 1 240px;
}
.tpb-filtros select {
	flex: 0 1 auto;
	max-width: 100%;
}
.tpb-contador {
	margin-left: auto;
	color: var(--tpb-tenue);
	font-size: .9em;
}

/* Tabla */
.tpb-tabla {
	width: 100%;
	border-collapse: collapse;
}
.tpb-tabla th,
.tpb-tabla td {
	padding: 6px 8px;
	border-bottom: 1px solid var(--tpb-borde);
	text-align: left;
	vertical-align: middle;
}
.tpb-tabla th {
	white-space: nowrap;
}
.tpb-tabla th button {
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-weight: bold;
	/* El tema pone los botones en mayúsculas y centrados */
	text-transform: none;
	letter-spacing: normal;
	text-align: left;
	cursor: pointer;
}
.tpb-tabla th[aria-sort=ascending] button::after {
	content: " ▲";
	font-size: .7em;
}
.tpb-tabla th[aria-sort=descending] button::after {
	content: " ▼";
	font-size: .7em;
}
.tpb-tabla tbody tr:hover {
	background: var(--tpb-suave);
}
.tpb-col-foto {
	width: 64px;
}
.tpb-foto-lista {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
}
.tpb-tabla .tpb-foto-tarjeta {
	display: none;
}
/* El tema pone sombra a las imágenes destacadas (.wp-post-image, en línea y detrás de esta hoja) */
img.tpb-foto-lista,
img.tpb-foto-tarjeta {
	box-shadow: none;
}
.tpb-col-nombre a {
	font-weight: bold;
}
.tpb-col-ano {
	white-space: nowrap;
}
.tpb-insignia {
	display: inline-block;
	margin: 1px 0;
	padding: 1px 6px;
	border-radius: 3px;
	background: #e8eef7;
	font-size: .8em;
	white-space: nowrap;
}
.tpb-insignia-rom {
	background: #eee8f7;
}
.tpb-insignia-plasticos,
.tpb-insignia-traslite {
	background: #f7eee8;
}
.tpb-nfotos {
	color: var(--tpb-tenue);
	font-size: .8em;
	white-space: nowrap;
}
.tpb-col-actualizado {
	white-space: nowrap;
	color: var(--tpb-tenue);
	font-size: .85em;
}
.tpb-vacio {
	padding: 1em 0;
	color: var(--tpb-tenue);
}
.tpb-otros-anos {
	display: flex;
	gap: 1.5em;
	margin: -.3em 0 .5em;
}

/* Cambio de vista: el desplegable de orden solo hace falta en la cuadrícula, que no tiene cabeceras */
.tpb-listado:not(.tpb-en-cuadricula) #tpb-orden {
	display: none;
}
.tpb-vistas {
	display: inline-flex;
	border: 1px solid var(--tpb-borde);
	border-radius: 4px;
	overflow: hidden;
}
.tpb-vistas[hidden] {
	display: none;
}
.tpb-vistas button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: var(--tpb-tenue);
	cursor: pointer;
}
.tpb-vistas button + button {
	border-left: 1px solid var(--tpb-borde);
}
.tpb-vistas button:hover,
.tpb-vistas button:focus {
	background: var(--tpb-suave);
	color: #333;
}
.tpb-vistas button[aria-pressed=true] {
	background: #c4161c;
	color: #fff;
}
.tpb-vistas svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Vista de cuadrícula: la misma tabla, con cada fila como una tarjeta */
.tpb-en-cuadricula .tpb-tabla {
	display: block;
}
.tpb-en-cuadricula .tpb-tabla thead,
.tpb-en-cuadricula .tpb-foto-lista,
.tpb-en-cuadricula .tpb-col-tecnologia,
.tpb-en-cuadricula .tpb-col-actualizado {
	display: none;
}
.tpb-en-cuadricula .tpb-tabla tbody {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
}
.tpb-en-cuadricula .tpb-tabla tr {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "foto foto" "nombre nombre" "fabricante ano" "docs docs";
	align-content: start;
	border: 1px solid var(--tpb-borde);
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .15s, border-color .15s;
}
.tpb-en-cuadricula .tpb-tabla tr[hidden] {
	display: none;
}
.tpb-en-cuadricula .tpb-tabla tbody tr:hover {
	background: none;
	border-color: #bbb;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}
.tpb-en-cuadricula .tpb-tabla td {
	padding: 0 12px;
	border: 0;
}
.tpb-en-cuadricula .tpb-col-foto {
	grid-area: foto;
	width: auto;
}
.tpb-en-cuadricula .tpb-tabla .tpb-col-foto {
	padding: 0;
}
.tpb-en-cuadricula .tpb-tabla .tpb-foto-tarjeta {
	display: block;
	border-radius: 0;
}
.tpb-en-cuadricula .tpb-tabla .tpb-sin-foto {
	display: flex;
}
.tpb-en-cuadricula .tpb-tabla .tpb-col-nombre {
	grid-area: nombre;
	padding-top: 10px;
	line-height: 1.3;
}
.tpb-en-cuadricula .tpb-tabla .tpb-col-fabricante,
.tpb-en-cuadricula .tpb-tabla .tpb-col-ano {
	padding-top: 2px;
	font-size: .9em;
}
.tpb-en-cuadricula .tpb-col-fabricante {
	grid-area: fabricante;
}
.tpb-en-cuadricula .tpb-col-ano {
	grid-area: ano;
}
.tax-tp_fabricante .tpb-en-cuadricula .tpb-col-ano {
	grid-column: 1 / -1;
}
.tpb-en-cuadricula .tpb-tabla .tpb-col-docs {
	grid-area: docs;
	padding-top: 8px;
	padding-bottom: 12px;
}
@media (max-width: 767px) {
	.tpb-col-tecnologia,
	.tpb-col-docs,
	.tpb-col-actualizado {
		display: none;
	}
	.tpb-filtros select {
		flex: 1 1 45%;
	}
	.tpb-contador {
		margin-left: 0;
	}
	.tpb-en-cuadricula .tpb-tabla tbody {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.tpb-en-cuadricula .tpb-tabla td {
		padding: 0 8px;
	}
}

/* Ficha: foto a la izquierda; título, datos y resumen a la derecha. En el móvil, el título va primero */
.tpb-cabecera {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	grid-template-rows: auto 1fr;
	grid-template-areas: "fotos titulo" "fotos resumen";
	gap: 0 40px;
	margin: .5em 0 2.5em;
}
.tpb-cabecera > h1 {
	grid-area: titulo;
	margin: 0 0 .6em;
}
.tpb-fotos {
	grid-area: fotos;
	align-self: start;
	min-width: 0;
}
.tpb-resumen {
	grid-area: resumen;
	min-width: 0;
}
.tpb-principal {
	margin: 0;
}
.tpb-principal a {
	display: block;
	overflow: hidden;
	border-radius: 6px;
	background: var(--tpb-suave);
}
.tpb-principal img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 640px;
	object-fit: contain;
}
.tpb-principal figcaption {
	min-height: 1.4em;
	margin-top: .4em;
	color: var(--tpb-tenue);
	font-size: .85em;
}
.tpb-miniaturas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: .5em 0 0;
	padding: 0;
	list-style: none;
}
.tpb-miniaturas a {
	display: block;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 4px;
	opacity: .7;
	transition: opacity .15s, border-color .15s;
}
.tpb-miniaturas a:hover,
.tpb-miniaturas a:focus-visible,
.tpb-miniaturas a[aria-current] {
	opacity: 1;
}
.tpb-miniaturas a[aria-current] {
	border-color: #c4161c;
}
.tpb-miniaturas img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
}
.tpb-sin-fotos {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: 1.5em;
	border: 2px dashed var(--tpb-borde);
	border-radius: 6px;
	color: var(--tpb-tenue);
	text-align: center;
}
.tpb-sin-fotos p {
	margin: 0 0 .4em;
}
.tpb-datos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	margin: 0 0 1.5em;
}
.tpb-datos > div {
	padding: 10px 14px;
	border-radius: 6px;
	background: var(--tpb-suave);
}
.tpb-datos dt,
.tpb-doc-grupo {
	color: var(--tpb-tenue);
	font-size: .75rem;
	font-weight: bold;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.tpb-datos dt {
	margin-bottom: 2px;
}
.tpb-datos dd {
	margin: 0;
	font-size: 1.05em;
	font-weight: 600;
}
.tpb-datos-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 32px;
	margin-bottom: 4px;
}
.tpb-aprox {
	color: var(--tpb-tenue);
	font-size: .8em;
	font-weight: normal;
}
.tpb-ficha .tpb-subtitulo {
	margin: 0 0 .3em;
	font-size: 1.3rem;
}
.tpb-resumen .tpb-contenido,
.tpb-resumen .tpb-historia,
.tpb-resumen .tpb-enlaces {
	margin-bottom: 1.8em;
}
.tpb-contenido {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}
.tpb-contenido .tpb-insignia {
	padding: 4px 10px;
	color: inherit;
	font-size: .9em;
	text-decoration: none;
}
.tpb-contenido .tpb-insignia:hover {
	text-decoration: underline;
}
.tpb-contenido .tpb-insignia b {
	margin-left: 3px;
}
.tpb-insignia-video {
	background: #fbe9e9;
}
.tpb-historia > .entry-content > :first-child,
.tpb-historia > h2 + * {
	margin-top: 0;
}
.tpb-historia > .entry-content > :last-child,
.tpb-historia > :last-child {
	margin-bottom: 0;
}
.tpb-seccion.tpb-historia {
	max-width: 46em;
}
.tpb-seccion > h2 + .tpb-doc-grupo {
	margin-top: .3em;
}
.tpb-resumen .tpb-invitacion {
	margin: 0;
}
@media (max-width: 767px) {
	.tpb-cabecera {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		grid-template-areas: "titulo" "fotos" "resumen";
	}
	.tpb-fotos {
		margin-bottom: 1.5em;
	}
}
.tpb-enlaces {
	margin: 0;
	padding: 0;
	list-style: none;
}
.tpb-enlaces li {
	margin-bottom: .4em;
}
.tpb-videos {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin-top: 1em;
}
.tpb-videos .tp-video {
	max-width: 320px;
}
.tpb-tipo {
	display: inline-block;
	min-width: 6em;
	color: var(--tpb-tenue);
	font-size: .9em;
}
.tpb-seccion {
	margin: 2em 0;
}
.tpb-seccion-cabecera {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0 1em;
}

/* Documentos (de una máquina o de un fabricante) */
.tpb-doc-grupo {
	margin: 1.4em 0 .6em;
}
.tpb-docs {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--tpb-borde);
	list-style: none;
}
.tpb-docs li {
	margin: 0;
	border-bottom: 1px solid var(--tpb-borde);
}
.tpb-doc {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 6px;
	color: inherit;
	text-decoration: none;
}
.tpb-doc:hover,
.tpb-doc:focus-visible {
	background: var(--tpb-suave);
	color: inherit;
}
.tpb-doc-formato {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 22px;
	border-radius: 3px;
	background: #6f6f6f;
	color: #fff;
	font-size: .7rem;
	font-weight: bold;
	letter-spacing: .03em;
}
.tpb-formato-pdf {
	background: #c4161c;
}
.tpb-formato-archivo {
	background: #6b5b95;
}
.tpb-formato-imagen {
	background: #2e7d5b;
}
.tpb-doc-texto {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 .8em;
	min-width: 0;
}
.tpb-doc-nombre {
	font-weight: 600;
	overflow-wrap: anywhere;
}
.tpb-doc:hover .tpb-doc-nombre {
	text-decoration: underline;
}
.tpb-doc-detalle {
	color: var(--tpb-tenue);
	font-size: .85em;
}
.tpb-doc-accion {
	flex: none;
	color: var(--tpb-tenue);
	font-size: 1.1em;
}
.tpb-doc:hover .tpb-doc-accion {
	color: #c4161c;
}

/* Tarjetas de máquina (otras máquinas del fabricante) y su foto, que también usa la cuadrícula del listado */
.tpb-tarjetas {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tpb-tarjetas a {
	display: block;
	color: inherit;
	text-decoration: none;
}
.tpb-tarjetas a:hover .tpb-tarjeta-nombre {
	text-decoration: underline;
}
.tpb-foto-tarjeta {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: top;
	border-radius: 6px;
	background: var(--tpb-suave);
}
.tpb-sin-foto {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tpb-tenue);
	font-size: .85em;
}
.tpb-tarjeta-nombre {
	display: block;
	margin-top: 6px;
	font-weight: 600;
	line-height: 1.3;
}
.tpb-tarjeta-detalle {
	display: block;
	color: var(--tpb-tenue);
	font-size: .85em;
}
@media (max-width: 600px) {
	.tpb-tarjetas {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
	}
}
/* Portada del sitio: máquinas al azar encima de las entradas, y el título de las entradas */
.tpb-portada {
	margin-top: 0;
}
.tpb-portada .tpb-seccion-cabecera h2,
.tpb-novedades {
	margin-top: 0;
}
/* Página de fabricantes */
.tpb-ver-fabricantes {
	margin-left: 1em;
}
.tpb-tabla-fabricantes td {
	height: 48px;
}
.tpb-col-anos,
.tpb-col-maquinas,
.tpb-col-documentacion {
	white-space: nowrap;
}
.tpb-col-logo img {
	display: block;
	width: auto;
	max-width: 120px;
	height: auto;
	max-height: 36px;
}
@media (max-width: 600px) {
	.tpb-tabla-fabricantes .tpb-col-logo,
	.tpb-tabla-fabricantes[data-ordenable] .tpb-col-documentacion {
		display: none;
	}
}

/* En la página de un fabricante la columna sobra */
.tax-tp_fabricante .tpb-col-fabricante {
	display: none;
}

/* Enlace al formulario de aportaciones */
.tpb-boton,
.tpb-form button.tpb-boton {
	display: inline-block;
	width: auto;
	text-transform: none;
	letter-spacing: normal;
	padding: .45em 1em;
	border: 0;
	border-radius: 3px;
	background: #c4161c;
	color: #fff;
	font: inherit;
	font-weight: bold;
	text-decoration: none;
	cursor: pointer;
}
/* El tema pinta de gris los enlaces visitados (a:visited gana a .tpb-boton) */
.tpb-boton:visited {
	color: #fff;
}
.tpb-boton:hover,
.tpb-boton:focus {
	background: #9d1116;
	color: #fff;
}
.tpb-boton[disabled] {
	opacity: .6;
	cursor: wait;
}
.tpb-invitacion {
	margin: 1.5em 0;
	padding: .8em 1em;
	background: var(--tpb-suave);
	border-left: 4px solid #c4161c;
}
.tpb-invitacion p {
	margin: 0 0 .5em;
}

/* Formulario de aportaciones */
.tpb-form {
	max-width: 760px;
}
.tpb-form fieldset {
	margin: 0 0 1.5em;
	padding: 0;
	border: 0;
}
.tpb-form legend {
	margin-bottom: .5em;
	font-size: 1.25em;
	font-weight: bold;
}
.tpb-form label {
	display: block;
	margin-bottom: .2em;
	font-size: inherit;
	font-weight: bold;
	/* El tema pone las etiquetas de los formularios en mayúsculas */
	text-transform: none;
	letter-spacing: normal;
}
.tpb-form label.tpb-boton,
.tpb-form button.tpb-boton {
	display: inline-block;
	width: auto;
	text-transform: none;
	letter-spacing: normal;
}
.tpb-form select {
	padding: .4em;
}
.tpb-form .tpb-acepto label {
	font-weight: normal;
}
.tpb-form input[type=text],
.tpb-form input[type=email],
.tpb-form input[type=number],
.tpb-form select,
.tpb-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.tpb-dos {
	display: flex;
	gap: 1em;
}
.tpb-dos > span:first-child {
	flex: 1;
}
.tpb-dos > span:last-child {
	flex: 0 0 8em;
}
.tpb-ayuda {
	display: block;
	margin-top: .2em;
	color: var(--tpb-tenue);
	font-size: .9em;
}
.tpb-oculto {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.tpb-lista-ficheros {
	margin: 0;
	padding: 0;
	list-style: none;
}
.tpb-fichero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--tpb-borde);
}
.tpb-fichero-nombre {
	flex: 1 1 100%;
	font-weight: bold;
	overflow-wrap: anywhere;
}
.tpb-fichero-tamano {
	color: var(--tpb-tenue);
	font-size: .9em;
}
.tpb-form .tpb-fichero-tipo {
	width: auto;
	flex: 0 1 14em;
}
.tpb-form .tpb-fichero-descripcion {
	width: auto;
	flex: 1 1 14em;
}
.tpb-fichero .tpb-quitar {
	padding: 0;
	border: 0;
	background: none;
	color: #c4161c;
	text-decoration: underline;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}
.tpb-form altcha-widget {
	display: block;
	margin: 1em 0;
}
.tpb-progreso progress {
	width: min(100%, 400px);
	vertical-align: middle;
}
.tpb-mensaje.tpb-error {
	color: #c4161c;
	font-weight: bold;
}
.tpb-gracias {
	padding: 1em 1.2em;
	background: #edf7ed;
	border-left: 4px solid #2e7d32;
}
.tpb-mensaje-ok {
	font-size: 1.15em;
	font-weight: bold;
}
@media (max-width: 600px) {
	.tpb-dos {
		flex-direction: column;
	}
	.tpb-dos > span:last-child {
		flex: none;
	}
}
