/* Web push — permission UI */
.wp-push-root {
	--wp-theme: #012e48;
	--wp-theme-rgb: 1, 46, 72;
}

.wp-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999990;
	background: rgba(15, 23, 42, 0.28);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity .3s ease;
}

.wp-backdrop.is-visible {
	opacity: 1;
}

.wp-perm {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 999999;
	width: 340px;
	max-width: calc(100vw - 24px);
	opacity: 0;
	transform: translateY(-10px);
	pointer-events: none;
	transition: opacity .32s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
	font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wp-perm.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.wp-perm__shell {
	background: #fff;
	border-radius: 14px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.6) inset,
		0 16px 40px rgba(15, 23, 42, 0.14),
		0 3px 10px rgba(15, 23, 42, 0.05);
	overflow: hidden;
}

.wp-perm__shell::before {
	content: '';
	display: block;
	height: 3px;
	background: linear-gradient(90deg, var(--wp-theme), var(--wp-theme));
}

.wp-perm__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 14px 0;
}

.wp-perm__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.wp-perm__logo {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	object-fit: contain;
	border: 1px solid #eef2f6;
	background: #fff;
	flex-shrink: 0;
}

.wp-perm__brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.wp-perm__site {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wp-perm__host {
	font-size: 11px;
	color: #64748b;
}

.wp-perm__close {
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 8px;
	background: #f8fafc;
	color: #64748b;
	font-size: 16px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all .15s ease;
}

.wp-perm__close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.wp-perm__content {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 14px 16px 4px;
}

.wp-perm__icon {
	width: 40px;
	height: 40px;
	border-radius: 11px;
	background: linear-gradient(135deg, rgba(var(--wp-theme-rgb), 0.1), rgba(var(--wp-theme-rgb), 0.04));
	color: var(--wp-theme);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
	border: 1px solid rgba(var(--wp-theme-rgb), 0.12);
}

.wp-perm__copy {
	min-width: 0;
}

.wp-perm__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.3;
}

.wp-perm__desc {
	margin: 0;
	font-size: 12px;
	line-height: 1.55;
	color: #64748b;
}

.wp-perm__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 10px 14px 14px;
	border-top: 1px solid #f1f5f9;
	background: #fafbfc;
}

.wp-perm__btn {
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	transition: all .18s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.wp-perm__btn--primary {
	flex: 1 1 auto;
	min-width: 118px;
	height: 36px;
	padding: 0 14px;
	background: var(--wp-theme);
	color: #fff !important;
	box-shadow: 0 3px 12px rgba(var(--wp-theme-rgb), 0.26);
}

.wp-perm__btn--primary:hover {
	color: #fff !important;
}

.wp-perm__btn--primary:hover {
	filter: brightness(1.07);
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(var(--wp-theme-rgb), 0.34);
}

.wp-perm__btn--ghost {
	height: 36px;
	padding: 0 12px;
	background: #fff;
	color: #334155;
	border: 1px solid #e2e8f0;
}

.wp-perm__btn--ghost:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
}

.wp-perm__btn--text {
	height: 30px;
	padding: 0 8px;
	background: transparent;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	margin-left: auto;
}

.wp-perm__btn--text:hover {
	color: #64748b;
}

.wp-fab {
	position: fixed;
	left: 20px;
	bottom: 90px;
	z-index: 999998;
	width: auto;
	height: auto;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0;
}

.wp-fab__ring {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 48px;
	height: 48px;
	margin: -24px 0 0 -24px;
	border-radius: 50%;
	border: 2px solid rgba(var(--wp-theme-rgb), 0.35);
	animation: wpFabPulse 2.2s ease-out infinite;
	pointer-events: none;
}

.wp-fab__btn {
	position: relative;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	color: var(--wp-theme);
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease;
}

.wp-fab:hover .wp-fab__btn {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}

.wp-fab__label {
	position: absolute;
	left: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
	background: #0f172a;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 7px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}

.wp-fab__label::before {
	content: '';
	position: absolute;
	right: 100%;
	top: 50%;
	margin-top: -5px;
	border: 5px solid transparent;
	border-right-color: #0f172a;
}

.wp-fab:hover .wp-fab__label {
	opacity: 1;
	transform: translateY(-50%) translateX(4px);
}

.wp-fab.is-active .wp-fab__ring {
	border-color: rgba(22, 163, 74, 0.4);
	animation: none;
}

.wp-fab.is-active .wp-fab__btn {
	background: var(--wp-theme);
	color: #fff;
	border-color: var(--wp-theme);
	box-shadow: 0 6px 22px rgba(var(--wp-theme-rgb), 0.28);
}

.wp-push-root.is-blocked .wp-fab {
	display: none;
}

.wp-perm__content--news {
	padding-bottom: 8px;
}

.wp-perm__icon.has-thumb {
	padding: 0;
	overflow: hidden;
	background: #f1f5f9;
	border-color: #e2e8f0;
}

.wp-perm__icon.has-thumb .wp-perm__bell {
	display: none;
}

.wp-perm__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@keyframes wpFabPulse {
	0% { transform: scale(1); opacity: 0.7; }
	70% { transform: scale(1.35); opacity: 0; }
	100% { transform: scale(1.35); opacity: 0; }
}

body.wp-push-open {
	overflow: hidden;
}

body.has-footer-sticky-ad .wp-fab {
	bottom: 72px;
}

@media (max-width: 480px) {
	.wp-perm {
		top: 10px;
		left: 10px;
		width: calc(100vw - 20px);
	}

	.wp-perm__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.wp-perm__btn--primary,
	.wp-perm__btn--ghost {
		width: 100%;
	}

	.wp-perm__btn--text {
		margin-left: 0;
		justify-content: center;
	}

	.wp-fab {
		left: 16px;
		bottom: 80px;
	}

	.wp-fab__label {
		display: none;
	}

	body.has-footer-sticky-ad .wp-fab {
		bottom: 68px;
	}
}
