/*
 * Kustomiza2 — Guía de tallas.
 * Se encola solo en fichas de producto que tienen guía (ver inc/guia-tallas.php).
 * NO se declara font-family a propósito: se hereda del tema.
 */

/*
 * El envoltorio es de BLOQUE a proposito. «Pregúntenos» (.ask-question, que
 * pinta templatemela-core en la prioridad 32, justo detras de este boton) es
 * display:inline-flex, NO flota. Dos cajas de linea seguidas se colocan una
 * al lado de la otra: por eso se pegaban. Una caja de bloque rompe el flujo y
 * lo empuja a la linea siguiente. El clear:both es defensivo, por si algun dia
 * algo flota ahi; hoy no hace falta, porque no hay ningun float.
 */
.k2-guia-tallas-wrap {
	display: block;
	clear: both;
	margin: 1em 0;
}

.k2-guia-tallas-btn {
	display: inline-block;
	padding: .6em 1.2em;
	background: transparent;
	border: 2px solid #0B6873;
	border-radius: 4px;
	color: #1D1D1B;
	font-size: inherit;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.k2-guia-tallas-btn:hover,
.k2-guia-tallas-btn:focus-visible {
	background: #0B6873;
	color: #fff;
}

.k2-guia-tallas-modal[hidden] {
	display: none;
}

.k2-guia-tallas-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5vh 2.5vw;
	background: rgba(29, 29, 27, .7);
}

.k2-guia-tallas-caja {
	position: relative;
	max-width: 95vw;
	max-height: 90vh;
}

/* El título existe para aria-labelledby; no se muestra. */
.k2-guia-tallas-titulo {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.k2-guia-tallas-img {
	display: block;
	max-width: 95vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	background: #fff;
	border-radius: 4px;
}

.k2-guia-tallas-cerrar {
	position: absolute;
	top: -.5em;
	right: -.5em;
	width: 2em;
	height: 2em;
	padding: 0;
	background: #1D1D1B;
	border: 2px solid #fff;
	border-radius: 50%;
	color: #fff;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.k2-guia-tallas-cerrar:hover,
.k2-guia-tallas-cerrar:focus-visible {
	background: #0B6873;
}

/* Evita que el fondo haga scroll con el modal abierto. */
body.k2-guia-tallas-abierta {
	overflow: hidden;
}

@media (max-width: 480px) {
	.k2-guia-tallas-btn {
		display: block;
		width: 100%;
	}
}
