/* Ultimate Push Notifications — opt-in surfaces. Kept minimal and theme-neutral. */

.upn-prompt {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	z-index: 99998;
	max-width: 520px;
	width: calc(100% - 32px);
	box-sizing: border-box;
	background: #fff;
	color: #1d2327;
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	padding: 16px 18px;
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	display: flex;
	gap: 14px;
	align-items: flex-start;
	animation: upn-prompt-in 0.25s ease-out;
}
.upn-prompt--bottom { bottom: 20px; }
.upn-prompt--top    { top: 20px; }
.upn-prompt__icon {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f0f0f1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}
.upn-prompt__body { flex: 1 1 auto; min-width: 0; }
.upn-prompt__title { font-weight: 600; margin: 0 0 4px; font-size: 16px; }
.upn-prompt__text { margin: 0 0 12px; color: #50575e; }
.upn-prompt__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upn-prompt__btn {
	appearance: none;
	border: 0;
	border-radius: 6px;
	padding: 8px 16px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.upn-prompt__btn--allow { background: #2271b1; color: #fff; }
.upn-prompt__btn--allow:hover { background: #135e96; }
.upn-prompt__btn--later { background: transparent; color: #50575e; }
.upn-prompt__btn--later:hover { color: #1d2327; text-decoration: underline; }

@keyframes upn-prompt-in {
	from { opacity: 0; transform: translate(-50%, 12px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.upn-bell {
	position: fixed;
	z-index: 99997;
	bottom: 20px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}
.upn-bell:hover { transform: scale(1.06); }
.upn-bell--bottom-right { right: 20px; }
.upn-bell--bottom-left  { left: 20px; }
.upn-bell svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.upn-bell--on::after {
	content: "";
	position: absolute;
	top: 10px;
	right: 10px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #00a32a;
	border: 2px solid #fff;
}

.upn-subscribe-button[data-upn-state="on"] { opacity: 0.85; }

/* ---- Prompt styles: modal and full-screen sit on a backdrop; card slides in at a corner. ---- */

.upn-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, 0.45);
	animation: upn-fade-in 0.2s ease-out;
}
.upn-overlay .upn-prompt {
	position: relative;
	left: auto; top: auto; bottom: auto;
	transform: none;
	animation: upn-pop-in 0.22s ease-out;
}
.upn-prompt--style-modal {
	flex-direction: column;
	align-items: center;
	text-align: center;
	max-width: 420px;
	padding: 28px 24px 22px;
}
.upn-prompt--style-modal .upn-prompt__icon,
.upn-prompt--style-fullscreen .upn-prompt__icon { width: 56px; height: 56px; font-size: 28px; }
.upn-prompt--style-modal .upn-prompt__actions,
.upn-prompt--style-fullscreen .upn-prompt__actions { justify-content: center; }

.upn-overlay--fullscreen { background: rgba(15, 23, 42, 0.92); }
.upn-prompt--style-fullscreen {
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: transparent;
	color: #fff;
	box-shadow: none;
	max-width: 560px;
}
.upn-prompt--style-fullscreen .upn-prompt__title { font-size: 26px; }
.upn-prompt--style-fullscreen .upn-prompt__text { color: #e2e8f0; font-size: 17px; }
.upn-prompt--style-fullscreen .upn-prompt__btn { padding: 12px 26px; font-size: 16px; }
.upn-prompt--style-fullscreen .upn-prompt__btn--later { color: #cbd5e1; }

.upn-prompt--style-card {
	left: auto;
	right: 20px;
	transform: none;
	max-width: 340px;
	animation: upn-card-in 0.25s ease-out;
}
.upn-prompt--style-card.upn-prompt--top { top: 20px; }

/* "Why did you turn them off?" */
.upn-why { flex-direction: column; }
.upn-why .upn-prompt__btn { background: #f0f0f1; color: #1d2327; font-weight: 500; }
.upn-why .upn-prompt__btn:hover { background: #dcdcde; }
.upn-why .upn-prompt__btn--later { background: transparent; }

/* ---- Inbox: the bell's "what you missed" panel, and [upn_inbox] ---- */

.upn-bell__count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	box-sizing: border-box;
	border-radius: 10px;
	background: #d63638;
	color: #fff;
	font: 600 11px/20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: center;
	border: 2px solid #fff;
}
.upn-inbox--panel {
	position: fixed;
	bottom: 84px;
	z-index: 99998;
	width: 340px;
	max-width: calc(100% - 32px);
	max-height: min(70vh, 520px);
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #1d2327;
	border-radius: 12px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
	font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	animation: upn-pop-in 0.18s ease-out;
	overflow: hidden;
}
.upn-inbox--bottom-right { right: 20px; }
.upn-inbox--bottom-left  { left: 20px; }
.upn-inbox__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f0f0f1; }
.upn-inbox__close { appearance: none; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: #646970; }
.upn-inbox__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 auto; }
.upn-inbox__item a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid #f6f7f7; }
.upn-inbox__item a:hover { background: #f6f7f7; }
.upn-inbox__item.is-new a { background: #f0f6fc; }
.upn-inbox__img { grid-column: 1 / -1; width: 100%; max-height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.upn-inbox__title { font-weight: 600; }
.upn-inbox__time { grid-row: 1; grid-column: 2; font-size: 12px; color: #646970; white-space: nowrap; }
.upn-inbox__img ~ .upn-inbox__time { grid-row: 2; }
.upn-inbox__body { grid-column: 1 / -1; color: #50575e; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upn-inbox__empty { padding: 18px 14px; color: #646970; }
.upn-inbox__foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid #f0f0f1; }
.upn-inbox__link { appearance: none; border: 0; background: transparent; color: #2271b1; cursor: pointer; padding: 0; font: inherit; font-size: 13px; }
.upn-inbox__link:hover { text-decoration: underline; }
.upn-inbox--inline .upn-inbox__list { border: 1px solid #dcdcde; border-radius: 8px; }
.upn-inbox__item--pinned a { background: #fcf9e8; }
.upn-inbox__cat { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 9px; background: #f0f0f1; color: #50575e; font-size: 11px; font-weight: 500; line-height: 18px; vertical-align: 1px; }
.upn-inbox__tabs { display: flex; gap: 4px; padding: 8px 14px 0; overflow-x: auto; border-bottom: 1px solid #f0f0f1; }
.upn-inbox__tab { appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 4px 6px 6px; font: inherit; font-size: 13px; color: #50575e; cursor: pointer; white-space: nowrap; }
.upn-inbox__tab.is-active { color: #1d2327; border-bottom-color: #2271b1; font-weight: 600; }

.upn-reply-optin { display: block; margin: 0.5em 0; }
.upn-reply-hint { display: block; font-size: 0.9em; opacity: 0.8; }

@keyframes upn-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes upn-pop-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes upn-card-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 480px) {
	.upn-prompt--style-card { right: 16px; left: 16px; max-width: none; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.upn-prompt, .upn-overlay, .upn-overlay .upn-prompt, .upn-prompt--style-card { animation: none; }
	.upn-bell { transition: none; }
}
