/**
 * Global Zone — Manufacturer datasheet block + modal PDF viewer
 */

.gz-mfr-datasheet {
	margin: 14px 0 18px;
	max-width: 100%;
}

.gz-mfr-datasheet__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
}

.gz-mfr-datasheet__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #f7f7f7;
	color: #555;
}

.gz-mfr-datasheet__text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.gz-mfr-datasheet__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #222;
}

.gz-mfr-datasheet__meta {
	display: block;
	font-size: 13px;
	line-height: 1.35;
	color: #777;
}

.gz-mfr-datasheet__cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	border: 0;
	border-radius: 7px;
	background: #000;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	font-family: inherit;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.gz-mfr-datasheet__cta:hover,
.gz-mfr-datasheet__cta:focus {
	background: #333;
	color: #fff !important;
	outline: none;
}

.gz-mfr-datasheet__cta:focus-visible {
	outline: 2px solid #222;
	outline-offset: 2px;
}

/* —— Modal —— */
.gz-mfr-ds-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.gz-mfr-ds-modal.is-open {
	display: flex;
}

.gz-mfr-ds-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.62);
	cursor: pointer;
}

.gz-mfr-ds-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(90vw, 1120px);
	height: min(90vh, 900px);
	max-width: 100%;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	overflow: hidden;
}

.gz-mfr-ds-modal__header {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px 14px;
	border-bottom: 1px solid #e8e8e8;
	background: #fff;
}

.gz-mfr-ds-modal__heading {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gz-mfr-ds-modal__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: #1a1a1a;
}

.gz-mfr-ds-modal__subtitle {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: #777;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gz-mfr-ds-modal__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: -4px -4px 0 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #444;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gz-mfr-ds-modal__close:hover,
.gz-mfr-ds-modal__close:focus {
	background: #f3f3f3;
	color: #111;
	outline: none;
}

.gz-mfr-ds-modal__close:focus-visible {
	outline: 2px solid #222;
	outline-offset: 2px;
}

.gz-mfr-ds-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	background: #f4f4f4;
	position: relative;
}

.gz-mfr-ds-modal__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
}

.gz-mfr-ds-modal__footer {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 12px 16px;
	border-top: 1px solid #e8e8e8;
	background: #fff;
}

.gz-mfr-ds-modal__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 14px;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gz-mfr-ds-modal__action--secondary {
	border: 1px solid #ddd;
	background: #fff;
	color: #222 !important;
}

.gz-mfr-ds-modal__action--secondary:hover,
.gz-mfr-ds-modal__action--secondary:focus {
	border-color: #bbb;
	background: #f7f7f7;
	color: #111 !important;
	outline: none;
}

.gz-mfr-ds-modal__action--primary {
	border: 1px solid #000;
	background: #000;
	color: #fff !important;
}

.gz-mfr-ds-modal__action--primary:hover,
.gz-mfr-ds-modal__action--primary:focus {
	background: #333;
	border-color: #333;
	color: #fff !important;
	outline: none;
}

body.gz-mfr-ds-modal-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.gz-mfr-datasheet__inner {
		flex-wrap: wrap;
		align-items: flex-start;
		padding: 14px;
		gap: 12px;
	}

	.gz-mfr-datasheet__icon {
		width: 32px;
		height: 32px;
	}

	.gz-mfr-datasheet__text {
		flex: 1 1 calc(100% - 44px);
	}

	.gz-mfr-datasheet__cta {
		width: 100%;
		margin-top: 2px;
	}

	.gz-mfr-ds-modal {
		padding: 0;
	}

	.gz-mfr-ds-modal__dialog {
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
		max-width: 100%;
	}

	.gz-mfr-ds-modal__header {
		padding: 14px 14px 12px;
	}

	.gz-mfr-ds-modal__subtitle {
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.gz-mfr-ds-modal__footer {
		justify-content: stretch;
		padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
	}

	.gz-mfr-ds-modal__action {
		flex: 1 1 auto;
		min-width: calc(50% - 6px);
	}
}
