/* NetRhyme Site launch: contact bar and cookie banner. Colours come from the theme's palette. */

:root {
	--wprk-launch-bar-height: 0px;
	--wprk-launch-ink: var(--wp--preset--color--dark, #1a1a1a);
	--wprk-launch-paper: var(--wp--preset--color--base, #ffffff);
	--wprk-launch-primary: var(--wp--preset--color--primary, #1f3a5f);
	--wprk-launch-line: var(--wp--preset--color--neutral, #d0d4da);
	--wprk-launch-radius: var(--wp--custom--radius--medium, 10px);
}

/* ----- Contact bar ----- */

.wprk-launch-contact {
	position: fixed;
	z-index: 9990;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	background: var(--wprk-launch-paper);
	border-top: 1px solid var(--wprk-launch-line);
	padding-bottom: env(safe-area-inset-bottom, 0);
	font-family: var(--wp--preset--font-family--body, inherit);
}

.wprk-launch-contact__link {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 56px;
	color: var(--wprk-launch-ink);
	text-decoration: none;
	font-size: 0.8125rem;
	font-weight: 600;
}

.wprk-launch-contact__link + .wprk-launch-contact__link {
	border-left: 1px solid var(--wprk-launch-line);
}

.wprk-launch-contact__link:focus-visible {
	outline: 2px solid var(--wprk-launch-primary);
	outline-offset: -4px;
}

.wprk-launch-contact__link--whatsapp .wprk-launch-icon {
	color: #128c4a;
}

@media (max-width: 781px) {
	body:has(.wprk-launch-contact) {
		--wprk-launch-bar-height: 57px;
		padding-bottom: calc(57px + env(safe-area-inset-bottom, 0));
	}
}

@media (min-width: 782px) {
	.wprk-launch-contact {
		display: none;
	}

	.wprk-launch-contact--desktop-whatsapp {
		display: block;
		left: auto;
		right: 24px;
		bottom: 24px;
		border: 0;
		background: none;
		padding: 0;
	}

	.wprk-launch-contact--desktop-whatsapp.wprk-launch-contact--left {
		left: 24px;
		right: auto;
	}

	.wprk-launch-contact--desktop-whatsapp .wprk-launch-contact__link {
		display: none;
	}

	.wprk-launch-contact--desktop-whatsapp .wprk-launch-contact__link--whatsapp {
		display: flex;
		width: 56px;
		height: 56px;
		min-height: 0;
		border-radius: 50%;
		background: #128c4a;
		color: #fff;
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	}

	.wprk-launch-contact--desktop-whatsapp .wprk-launch-contact__link--whatsapp .wprk-launch-icon {
		color: #fff;
		width: 28px;
		height: 28px;
	}

	.wprk-launch-contact--desktop-whatsapp .wprk-launch-contact__link--whatsapp span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

@media print {
	.wprk-launch-contact,
	.wprk-launch-consent {
		display: none !important;
	}
}

/* ----- Cookie banner ----- */

.wprk-launch-consent {
	position: fixed;
	z-index: 9995;
	left: 16px;
	right: 16px;
	bottom: calc(16px + var(--wprk-launch-bar-height));
	max-width: 560px;
	max-height: calc(100vh - 32px - var(--wprk-launch-bar-height));
	overflow: auto;
	box-sizing: border-box;
	padding: 20px;
	background: var(--wprk-launch-paper);
	color: var(--wprk-launch-ink);
	border: 1px solid var(--wprk-launch-line);
	border-radius: var(--wprk-launch-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.wprk-launch-consent__title {
	margin: 0 0 6px;
	font-size: 1.0625rem;
	line-height: 1.3;
}

.wprk-launch-consent__text {
	margin: 0 0 12px;
}

.wprk-launch-consent__text a {
	color: var(--wprk-launch-primary);
}

.wprk-launch-consent__choices {
	margin: 0 0 12px;
	padding: 0;
	border: 0;
}

.wprk-launch-consent__choices label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 6px 0;
}

.wprk-launch-consent__choices input {
	margin-top: 4px;
}

.wprk-launch-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Accept and Reject look the same on purpose: neither choice is pushed. */
.wprk-launch-consent__actions button {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid var(--wprk-launch-primary);
	border-radius: var(--wprk-launch-radius);
	background: var(--wprk-launch-primary);
	color: var(--wprk-launch-paper);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.wprk-launch-consent__actions button[data-action="choose"] {
	background: transparent;
	color: var(--wprk-launch-primary);
}

.wprk-launch-consent__actions button:focus-visible {
	outline: 2px solid var(--wprk-launch-ink);
	outline-offset: 2px;
}

/* The footer button reads as a link; the theme styles .wprk-launch-legal. */
.wprk-launch-settings-link {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}
