/* Aumaujaya Push Notifications — front end */
.aupn-root {
	--aupn-accent: #b4461b;
	--aupn-ink: #1f1a17;
	--aupn-muted: #5f5650;
	--aupn-paper: #ffffff;
	--aupn-line: rgba(31, 26, 23, .10);
	--aupn-shadow: 0 1px 2px rgba(31, 26, 23, .08), 0 8px 24px rgba(31, 26, 23, .14), 0 24px 60px rgba(31, 26, 23, .12);
	--aupn-gap: 16px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--aupn-ink);
}
.aupn-root *,
.aupn-root *::before,
.aupn-root *::after { box-sizing: border-box; }

/* ---------- Buttons (reset theme styles) ---------- */
.aupn-root .aupn-btn,
.aupn-root .aupn-bell,
.aupn-root .aupn-x {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	border: 0;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	min-height: 0;
	width: auto;
	line-height: 1.2;
	text-decoration: none;
}
.aupn-root .aupn-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 9px 18px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	transition: background-color .15s ease, color .15s ease, transform .15s ease, opacity .15s ease;
	white-space: nowrap;
}
.aupn-root .aupn-btn-main {
	background: var(--aupn-accent);
	color: #fff;
}
.aupn-root .aupn-btn-main:hover { filter: brightness(1.08); transform: translateY(-1px); }
.aupn-root .aupn-btn-quiet {
	background: transparent;
	color: var(--aupn-muted);
}
.aupn-root .aupn-btn-quiet:hover { background: rgba(31, 26, 23, .06); color: var(--aupn-ink); }
.aupn-root .aupn-btn:focus-visible,
.aupn-root .aupn-bell:focus-visible,
.aupn-root .aupn-x:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--aupn-accent) 45%, transparent);
	outline-offset: 2px;
}
.aupn-root .aupn-btn[disabled] { opacity: .6; cursor: progress; }
.aupn-root .aupn-busy { position: relative; color: transparent !important; }
.aupn-root .aupn-busy::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .5);
	border-top-color: #fff;
	animation: aupn-spin .7s linear infinite;
}
@keyframes aupn-spin { to { transform: rotate(360deg); } }

/* ---------- Prompt card ---------- */
.aupn-card {
	position: fixed;
	z-index: 2147483000;
	width: 380px;
	max-width: calc(100vw - 32px);
	display: grid;
	grid-template-columns: 52px 1fr;
	gap: 14px;
	padding: 18px 18px 14px;
	background: var(--aupn-paper);
	border: 1px solid var(--aupn-line);
	border-radius: 18px;
	box-shadow: var(--aupn-shadow);
	opacity: 0;
	transition: opacity .25s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.aupn-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	border-radius: 18px 18px 0 0;
	background: linear-gradient(90deg, var(--aupn-accent), color-mix(in srgb, var(--aupn-accent) 55%, #f2b24a));
}
.aupn-pos-bottom-left { left: 20px; bottom: 20px; transform: translateY(16px); }
.aupn-pos-bottom-right { right: 20px; bottom: 20px; transform: translateY(16px); }
.aupn-pos-top-center { top: 20px; left: 50%; transform: translate(-50%, -16px); }
.aupn-card.aupn-show { opacity: 1; transform: translateY(0); }
.aupn-pos-top-center.aupn-show { transform: translate(-50%, 0); }

.aupn-media { width: 52px; height: 52px; }
.aupn-media-img {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	object-fit: cover;
	background: #faf6f2;
	box-shadow: 0 0 0 1px var(--aupn-line);
}
.aupn-media-icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	color: var(--aupn-accent);
	background: color-mix(in srgb, var(--aupn-accent) 12%, #fff);
}
.aupn-copy { min-width: 0; }
.aupn-root .aupn-title {
	margin: 0 0 4px;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--aupn-ink);
}
.aupn-root .aupn-text {
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--aupn-muted);
	overflow-wrap: anywhere;
}
.aupn-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 14px;
}

/* ---------- Bell ---------- */
.aupn-root .aupn-bell {
	position: fixed;
	z-index: 2147482999;
	bottom: 20px;
	width: 52px;
	height: 52px;
	padding: 0;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: #fff;
	background: var(--aupn-accent);
	box-shadow: 0 6px 18px rgba(31, 26, 23, .22);
	transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease;
}
.aupn-root .aupn-bell:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgba(31, 26, 23, .26); }
.aupn-root .aupn-bell[hidden] { display: none; }
.aupn-bell-bottom-left { left: 20px; }
.aupn-bell-bottom-right { right: 20px; }
.aupn-dot {
	position: absolute;
	top: 9px;
	right: 10px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 2px solid var(--aupn-accent);
	background: #f4c542;
	transition: background-color .2s ease;
}
.aupn-bell[data-state="on"] .aupn-dot { background: #3ccf6e; }
.aupn-bell[data-state="on"] { opacity: .88; }
.aupn-bell[data-state="blocked"] { background: #6b625c; }
.aupn-bell[data-state="blocked"] .aupn-dot { background: #e5484d; border-color: #6b625c; }

/* ---------- Panel ---------- */
.aupn-panel {
	position: fixed;
	z-index: 2147483000;
	bottom: 84px;
	width: 320px;
	max-width: calc(100vw - 32px);
	padding: 18px 18px 16px;
	background: var(--aupn-paper);
	border: 1px solid var(--aupn-line);
	border-radius: 16px;
	box-shadow: var(--aupn-shadow);
	animation: aupn-pop .2s cubic-bezier(.2, .8, .2, 1);
}
.aupn-panel[hidden] { display: none; }
.aupn-panel-bottom-left { left: 20px; }
.aupn-panel-bottom-right { right: 20px; }
.aupn-panel .aupn-title { padding-right: 28px; }
.aupn-panel .aupn-actions { justify-content: flex-start; margin-top: 12px; }
.aupn-root .aupn-x {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	padding: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--aupn-muted);
	font-size: 22px;
	line-height: 30px;
	text-align: center;
}
.aupn-root .aupn-x:hover { background: rgba(31, 26, 23, .06); color: var(--aupn-ink); }
@keyframes aupn-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Toast ---------- */
.aupn-toast {
	position: fixed;
	z-index: 2147483001;
	left: 50%;
	bottom: 24px;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border-radius: 12px;
	background: #1f1a17;
	color: #fff;
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 12px);
	transition: opacity .2s ease, transform .2s ease;
}
.aupn-toast.aupn-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
	.aupn-card,
	.aupn-pos-bottom-left,
	.aupn-pos-bottom-right {
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-width: none;
		grid-template-columns: 44px 1fr;
		gap: 12px;
		padding: 16px 16px 12px;
	}
	.aupn-pos-top-center {
		top: calc(12px + env(safe-area-inset-top, 0px));
		bottom: auto;
		transform: translateY(-16px);
	}
	.aupn-pos-top-center.aupn-show { transform: translateY(0); }
	.aupn-media,
	.aupn-media-img,
	.aupn-media-icon { width: 44px; height: 44px; border-radius: 12px; }
	.aupn-actions { justify-content: stretch; }
	.aupn-actions .aupn-btn { flex: 1 1 0; }
	.aupn-root .aupn-bell { width: 46px; height: 46px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
	.aupn-bell-bottom-left { left: 16px; }
	.aupn-bell-bottom-right { right: 16px; }
	.aupn-dot { top: 7px; right: 8px; }
	.aupn-panel {
		left: 12px;
		right: 12px;
		width: auto;
		max-width: none;
		bottom: calc(74px + env(safe-area-inset-bottom, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.aupn-card,
	.aupn-toast,
	.aupn-root .aupn-bell,
	.aupn-panel { transition: none; animation: none; }
}

@media print {
	.aupn-root { display: none !important; }
}
