/* Polenovo Notices — styled after Apple Human Interface Guidelines
   (SF system font, iOS type scale, 44pt touch targets, alert/sheet
   materials, semantic colours with light & dark appearance). */

.pn-notice {
	--pn-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--pn-blue: #007AFF;
	--pn-blue-pressed: #0062CC;
	--pn-label: rgba(0, 0, 0, 0.88);
	--pn-label-secondary: rgba(60, 60, 67, 0.72);
	--pn-separator: rgba(60, 60, 67, 0.29);
	--pn-material: rgba(249, 249, 249, 0.94);
	--pn-material-solid: #F9F9F9;
	--pn-press: rgba(0, 0, 0, 0.06);
	--pn-scrim: rgba(0, 0, 0, 0.4);
	--pn-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
	--pn-radius: 14px;

	position: fixed;
	z-index: 99999;
	box-sizing: border-box;
	font-family: var(--pn-font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color: var(--pn-label);
	text-align: left;
	line-height: 1.35;
}

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

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

.pn-card {
	background: var(--pn-material);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-radius: var(--pn-radius);
	box-shadow: var(--pn-shadow);
	overflow: hidden;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.pn-card { background: var(--pn-material-solid); }
}

.pn-title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.4px;
	line-height: 22px;
	color: var(--pn-label);
}

.pn-text {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: -0.2px;
	line-height: 20px;
	color: var(--pn-label-secondary);
}

.pn-text a {
	color: var(--pn-blue);
	text-decoration: none;
	font-weight: 500;
}
.pn-text a:hover, .pn-text a:focus-visible { text-decoration: underline; }

/* Buttons */
.pn-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 11px 16px;
	border: 0;
	border-radius: 12px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.4px;
	line-height: 22px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.pn-button:focus { outline: none; }
.pn-button:focus-visible { box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.35); }

.pn-button-filled {
	background: var(--pn-blue);
	color: #fff;
}
.pn-button-filled:hover { background: #1A85FF; }
.pn-button-filled:active { background: var(--pn-blue-pressed); transform: scale(0.98); }

.pn-button-plain {
	background: transparent;
	color: var(--pn-blue);
	border-radius: 0;
	font-weight: 600;
}
.pn-button-plain:hover { background: var(--pn-press); }
.pn-button-plain:focus-visible { box-shadow: inset 0 0 0 2px rgba(0, 122, 255, 0.5); }
.pn-button-plain:active { background: var(--pn-press); opacity: 0.6; }

/* ---------- Cookie notice: sheet / banner ---------- */

.pn-banner {
	left: 16px;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	display: flex;
	justify-content: center;
	pointer-events: none;
}
.pn-banner .pn-card {
	pointer-events: auto;
	width: 100%;
	max-width: 480px;
	padding: 20px;
}
.pn-banner .pn-actions { margin-top: 16px; }

/* On small screens the banner becomes an edge-to-edge bottom sheet. */
@media (max-width: 480px) {
	.pn-banner {
		left: 0;
		right: 0;
		bottom: 0;
	}
	.pn-banner .pn-card {
		max-width: none;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
		max-height: 80vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* ---------- Info notice: modal alert ---------- */

.pn-alert {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.pn-scrim {
	position: absolute;
	inset: 0;
	background: var(--pn-scrim);
}
.pn-alert .pn-card {
	position: relative;
	width: 100%;
	max-width: 320px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	display: flex;
	flex-direction: column;
	text-align: center;
	border-radius: var(--pn-radius);
}
.pn-alert-body {
	padding: 19px 16px 20px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.pn-alert .pn-title {
	margin-bottom: 4px;
	line-height: 22px;
}
.pn-alert .pn-text {
	font-size: 13px;
	letter-spacing: -0.08px;
	line-height: 18px;
	color: var(--pn-label);
}
.pn-alert-actions {
	flex-shrink: 0;
	border-top: 0.5px solid var(--pn-separator);
}
.pn-alert-actions .pn-button { min-height: 44px; }

/* ---------- Motion ---------- */

.pn-notice.pn-enter .pn-card { animation: pn-rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pn-alert.pn-enter .pn-card  { animation: pn-pop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pn-alert.pn-enter .pn-scrim { animation: pn-fade 0.3s ease; }
.pn-notice.pn-leave { animation: pn-fade 0.2s ease reverse forwards; }

@keyframes pn-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pn-pop  { from { transform: scale(1.08); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pn-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.pn-notice .pn-card, .pn-notice .pn-scrim, .pn-notice.pn-leave { animation: none !important; }
	.pn-button { transition: none; }
}

/* ---------- Dark appearance ---------- */

@media (prefers-color-scheme: dark) {
	.pn-notice {
		--pn-blue: #0A84FF;
		--pn-blue-pressed: #0066CC;
		--pn-label: rgba(255, 255, 255, 0.92);
		--pn-label-secondary: rgba(235, 235, 245, 0.66);
		--pn-separator: rgba(84, 84, 88, 0.65);
		--pn-material: rgba(37, 37, 37, 0.92);
		--pn-material-solid: #2C2C2E;
		--pn-press: rgba(255, 255, 255, 0.08);
		--pn-scrim: rgba(0, 0, 0, 0.55);
		--pn-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
	}
}
