/**
 * Shared PDF viewer. Loaded only on pages where a block asked for the
 * catalog-modal partial. Ported from the .catalog-modal rules in
 * videorizada/assets/marcas.css.
 */

dialog.catalog-modal {
	border: none;
	border-radius: 20px;
	padding: 0;
	width: min(920px, 92vw);
	max-width: 92vw;
	max-height: 88vh;
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
	box-shadow: 0 30px 70px rgba(35, 41, 48, 0.35);
}

dialog.catalog-modal::backdrop {
	background: rgba(20, 24, 28, 0.55);
	backdrop-filter: blur(2px);
}

.catalog-modal-inner {
	display: flex;
	flex-direction: column;
	height: 88vh;
	max-height: 88vh;
}

.catalog-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 22px;
	border-bottom: 2px solid var(--wp--preset--color--honey-soft);
}

.catalog-modal-head h3 {
	margin: 0;
	font-size: 1.1rem;
}

.catalog-modal-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.catalog-download {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--wp--preset--color--navy);
	border-bottom: 2px solid currentColor;
	padding-bottom: 1px;
	white-space: nowrap;
}

.catalog-close {
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 2px solid var(--wp--preset--color--ink);
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.catalog-close:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--cream);
}

.catalog-modal-body {
	flex: 1;
	min-height: 0;
}

.catalog-modal-body iframe {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
	background: var(--wp--preset--color--cream);
}

@media (max-width: 640px) {
	dialog.catalog-modal {
		width: 96vw;
		max-width: 96vw;
	}

	.catalog-modal-inner {
		height: 82vh;
		max-height: 82vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.catalog-close {
		transition: none;
	}
}
