/**
 * Incognito Window Detect – notice styles.
 *
 * Colours and size come from CSS custom properties set inline on the
 * container, so they can be overridden from a theme if needed.
 */

.iwd-notice {
	--iwd-background: #3a3a3a;
	--iwd-color: #ffffff;
	--iwd-font-size: 14px;

	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	background: var(--iwd-background);
	color: var(--iwd-color);
	font-size: var(--iwd-font-size);
	line-height: 1.5;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
	animation: iwd-slide-up 0.3s ease-out;
}

.iwd-notice[hidden] {
	display: none !important;
}

.iwd-notice *,
.iwd-notice *::before,
.iwd-notice *::after {
	box-sizing: inherit;
}

.iwd-notice__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 16px;
	padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.iwd-notice--dismissible .iwd-notice__inner {
	padding-right: 56px;
}

.iwd-notice__message {
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
	text-align: center;
	letter-spacing: 0.2px;
}

.iwd-notice__message a {
	color: inherit;
	text-decoration: underline;
}

.iwd-notice__close {
	position: absolute;
	top: 50%;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25em;
	height: 2.25em;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
	transform: translateY(-50%);
	-webkit-appearance: none;
	appearance: none;
}

.iwd-notice__close:hover,
.iwd-notice__close:focus-visible {
	opacity: 1;
	background: rgba(255, 255, 255, 0.12);
}

.iwd-notice__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Full-screen overlay mode */

.iwd-notice--overlay {
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-shadow: none;
	animation: iwd-fade-in 0.3s ease-out;
}

.iwd-notice--overlay .iwd-notice__inner,
.iwd-notice--overlay.iwd-notice--dismissible .iwd-notice__inner {
	flex-direction: column;
	max-width: 640px;
	padding: 0;
}

.iwd-notice--overlay .iwd-notice__message {
	font-size: 1.25em;
}

.iwd-notice--overlay .iwd-notice__close {
	position: fixed;
	top: 16px;
	right: 16px;
	transform: none;
}

.iwd-overlay-open {
	overflow: hidden;
}

@keyframes iwd-slide-up {
	from {
		transform: translateY(100%);
	}

	to {
		transform: translateY(0);
	}
}

@keyframes iwd-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iwd-notice,
	.iwd-notice--overlay {
		animation: none;
	}
}
