/*
 * Popup / modal amb iframe (Sidoo).
 * Component global: es fa servir des de qualsevol pàgina (cursos, categories,
 * contacte...) sempre que hi hagi un botó .js-open-popup. Es carrega a totes
 * les pàgines (veure functions.php) perquè el modal en si viu a footer.php.
 */

.tau-popup {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.tau-popup[hidden] {
	display: none;
}

.tau-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(13, 44, 80, 0.7);
}

.tau-popup__dialog {
	position: relative;
	background: #fff;
	border-radius: var(--tau-radius);
	width: 100%;
	max-width: 640px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tau-popup__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 18px;
	border-bottom: 1px solid #e2e6ec;
}

.tau-popup__title {
	margin: 0;
	font-size: 1rem;
	color: var(--tau-navy);
}

.tau-popup__close {
	background: none;
	border: none;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: var(--tau-navy);
}

.tau-popup__body {
	flex: 1;
	min-height: 420px;
}

.tau-popup__body iframe {
	width: 100%;
	height: 100%;
	min-height: 420px;
	border: none;
}

body.tau-popup-open {
	overflow: hidden;
}
