/*
 * Laser rebrand notice (see src/_includes/partials/laser-notice.njk).
 * Desktop: a modal. Mobile: a banner below the header. Colours, fonts and
 * buttons match lasernewplymouth.co.nz.
 *
 * Fonts are self-hosted (latin subset from Google Fonts, SIL OFL) because the
 * CSP only allows same-origin styles and fonts.
 */
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(fonts/poppins-400.woff2) format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/poppins-700.woff2) format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/inter-700.woff2) format("woff2");
}

#lnp-modal,
#lnp-banner {
	font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	color: #002341;
	box-sizing: border-box;
}

#lnp-modal *,
#lnp-banner * {
	box-sizing: border-box;
}

#lnp-modal[hidden],
#lnp-banner[hidden] {
	display: none !important;
}

/* Buttons */
.lnp-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.lnp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 12px 16px;
	border-radius: 3px;
	font-family: Poppins, sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
	transition: background-color 0.15s;
}

.lnp-btn--blue {
	background: #00acef;
	color: #fff !important;
}

.lnp-btn--blue:hover,
.lnp-btn--blue:focus {
	background: #0096d1;
	color: #fff !important;
}

.lnp-btn--yellow {
	background: #ffe600;
	color: #002341 !important;
}

.lnp-btn--yellow:hover,
.lnp-btn--yellow:focus {
	background: #f2d900;
	color: #002341 !important;
}

.lnp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 35, 65, 0.75);
	color: #fff;
	font-size: 22px;
	line-height: 38px;
	text-align: center;
	cursor: pointer;
	padding: 0;
}

.lnp-close:hover,
.lnp-close:focus {
	background: #002341;
}

/* Desktop modal */
#lnp-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 35, 65, 0.6);
	opacity: 0;
	transition: opacity 0.25s;
}

#lnp-modal.lnp-show {
	opacity: 1;
}

.lnp-card {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
	transform: translateY(12px);
	transition: transform 0.25s;
}

#lnp-modal.lnp-show .lnp-card {
	transform: none;
}

.lnp-photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 1;
	object-fit: cover;
	background: #002341;
}

.lnp-body {
	padding: 28px 36px 36px;
}

.lnp-logo {
	display: block;
	width: 240px;
	max-width: 60%;
	height: auto;
	margin: 0 0 20px;
}

.lnp-title {
	margin: 0 0 10px;
	font-family: Inter, sans-serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	color: #002341;
}

.lnp-text {
	margin: 0 0 24px;
	font-size: 16px;
	font-weight: 400;
	color: #002341;
}

/* Mobile banner, directly below the site header */
#lnp-banner {
	position: relative;
	background: #fff;
	padding: 16px 16px 18px;
	border-bottom: 4px solid #ffe600;
}

.lnp-banner-top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 36px 14px 0;
}

.lnp-banner-logo {
	flex: 0 0 auto;
	width: 96px;
	height: auto;
}

.lnp-banner-text {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: #002341;
}

#lnp-banner .lnp-btn {
	min-height: 46px;
	font-size: 14px;
	padding: 10px 8px;
}

#lnp-banner .lnp-close {
	top: 10px;
	right: 8px;
	width: 34px;
	height: 34px;
	line-height: 34px;
	font-size: 22px;
	background: transparent;
	color: #002341;
}

#lnp-banner .lnp-close:hover,
#lnp-banner .lnp-close:focus {
	background: #eef3f7;
}

@media (prefers-reduced-motion: reduce) {
	#lnp-modal,
	.lnp-card {
		transition: none;
	}
}
