/* Car wash promo popup - location pages. Colours from css/src/variables.less */
.nw-carwash {
	--nw-blue: #236192;
	--nw-dark-blue: #20145f;
	--nw-orange: #f4b400;
	--nw-pale-yellow: #fbe9bb;
	--nw-duration: 9s;

	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9990;
	font-family: "Open Sans", sans-serif;
	pointer-events: none;
}

.nw-carwash__card,
.nw-carwash__tab {
	pointer-events: auto;
}

/* ---------- Card ---------- */
.nw-carwash__card {
	position: relative;
	width: 400px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 12px 32px rgba(32, 20, 95, 0.25), 0 2px 6px rgba(0, 0, 0, 0.12);
	transform-origin: bottom right;
	transform: translateY(24px) scale(0.96);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, visibility 0s linear 0.35s;
}

.nw-carwash[data-state="open"] .nw-carwash__card {
	transform: none;
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.nw-carwash__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 48px 16px 18px;
	background: var(--nw-blue);
	color: #fff;
}

.nw-carwash__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--nw-orange);
	color: var(--nw-blue);
}

.nw-carwash__icon svg {
	width: 28px;
	height: 28px;
}

.nw-carwash__eyebrow {
	margin: 0 0 2px;
	font-size: 14px;
	font-weight: 800 !important; /* styles.css sets h1-h3, p { font-weight: unset !important } */
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nw-orange);
	line-height: 1.3;
}

.nw-carwash__title {
	margin: 0;
	font-family: 'ff-real-headline-pro', arial, sans-serif;
	font-size: 22px;
	font-weight: 700 !important;
	line-height: 1.15;
	color: #fff;
}

.nw-carwash__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px 18px;
}

.nw-carwash__heading {
	flex: 1 1 auto;
	min-width: 0;
}

.nw-carwash__title-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.nw-carwash__value {
	flex: 0 0 auto;
	padding: 5px 8px;
	border-radius: 4px;
	background: var(--nw-pale-yellow);
	border: 1px solid var(--nw-orange);
	color: var(--nw-dark-blue);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.nw-carwash__text {
	margin: 0;
	font-size: 15px;
	font-weight: 700 !important;
	line-height: 1.35;
	color: var(--nw-dark-blue);
}

.nw-carwash__cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	border-radius: 4px;
	background: var(--nw-orange);
	color: var(--nw-dark-blue);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
}

.nw-carwash__cta:hover,
.nw-carwash__cta:focus-visible {
	background: var(--nw-blue);
	color: #fff;
	text-decoration: none;
}

.nw-carwash__cta:focus-visible {
	outline: 3px solid var(--nw-orange);
	outline-offset: 2px;
}

.nw-carwash__cta svg {
	width: 16px;
	height: 16px;
}

.nw-carwash__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease;
}

.nw-carwash__close:hover,
.nw-carwash__close:focus-visible {
	background: rgba(255, 255, 255, 0.3);
}

.nw-carwash__close:focus-visible,
.nw-carwash__tab:focus-visible {
	outline: 3px solid var(--nw-orange);
	outline-offset: 2px;
}

.nw-carwash__close svg {
	width: 18px;
	height: 18px;
}

/* Countdown bar until auto-minimize */
.nw-carwash__timer {
	height: 4px;
	background: var(--nw-light-blue, #eaedf2);
}

.nw-carwash__timer span {
	display: block;
	height: 100%;
	background: var(--nw-orange);
	transform-origin: left;
	transform: scaleX(1);
}

.nw-carwash[data-state="open"] .nw-carwash__timer span {
	animation: nw-carwash-countdown var(--nw-duration) linear forwards;
}

.nw-carwash[data-paused="true"] .nw-carwash__timer span {
	animation-play-state: paused;
}

@keyframes nw-carwash-countdown {
	to { transform: scaleX(0); }
}

/* ---------- Minimized tab ---------- */
.nw-carwash__tab {
	position: absolute;
	right: 0;
	bottom: 0;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 18px 6px 6px;
	border: 0;
	border-radius: 999px;
	background: var(--nw-blue);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(32, 20, 95, 0.3);
	transform: translateY(16px);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.3s ease, opacity 0.25s ease, visibility 0s linear 0.3s, background 0.2s ease;
}

.nw-carwash__tab:hover {
	background: var(--nw-dark-blue);
}

.nw-carwash[data-state="minimized"] .nw-carwash__tab {
	transform: none;
	opacity: 1;
	visibility: visible;
	transition-delay: 0.15s, 0.15s, 0s, 0s;
}

.nw-carwash__icon--sm {
	width: 34px;
	height: 34px;
}

.nw-carwash__icon--sm svg {
	width: 20px;
	height: 20px;
}

/* ---------- Mobile ---------- */
@media only screen and (max-width: 550px) {
	.nw-carwash {
		right: 16px;
		left: 16px;
		bottom: 16px;
	}

	.nw-carwash__card {
		width: auto;
		max-width: none;
	}

	.nw-carwash__head {
		gap: 12px;
		padding-left: 14px;
	}

	.nw-carwash__title {
		font-size: 19px;
	}

	.nw-carwash__body {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nw-carwash__card,
	.nw-carwash__tab {
		transition: opacity 0.2s ease, visibility 0s linear 0.2s;
		transform: none;
	}

	.nw-carwash__timer {
		display: none;
	}
}
