/* ==========================================================================
   WP Push Notify — Bell Button Styles v1.0.2
   ========================================================================== */

/* ── Wrapper ── */
#wpn-bell-wrap {
	position: fixed;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 8px;

	/* default: bottom-right */
	bottom: 28px;
	right:  28px;
	align-items: flex-end;

	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: opacity .35s ease, transform .35s ease;
}
#wpn-bell-wrap.wpn-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* ── Position variants ── */
#wpn-bell-wrap[data-pos="bottom-left"] {
	right: auto;
	left: 28px;
	align-items: flex-start;
}
#wpn-bell-wrap[data-pos="top-right"] {
	bottom: auto;
	top: 88px; /* clears WP admin bar */
	align-items: flex-end;
}
#wpn-bell-wrap[data-pos="top-left"] {
	bottom: auto;
	right: auto;
	top: 88px;
	left: 28px;
	align-items: flex-start;
}

/* ── Tooltip ── */
#wpn-bell-tip {
	background: rgba(20, 20, 30, 0.85);
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 12px;
	font-weight: 500;
	padding: 5px 12px;
	border-radius: 20px;
	white-space: nowrap;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .2s ease, transform .2s ease;
}
#wpn-bell-wrap:hover #wpn-bell-tip { opacity: 1; transform: translateY(0); }

/* Hide tooltip when subscribed (button text is enough) */
#wpn-bell-wrap.wpn-is-subscribed #wpn-bell-tip { display: none; }

/* Top positions: tooltip below button */
#wpn-bell-wrap[data-pos^="top"] {
	flex-direction: column-reverse;
}
#wpn-bell-wrap[data-pos^="top"] #wpn-bell-tip {
	transform: translateY(-4px);
}
#wpn-bell-wrap[data-pos^="top"]:hover #wpn-bell-tip {
	transform: translateY(0);
}

/* ── Bell Button ── */
#wpn-bell-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 12px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(37, 99, 235, .45);
	white-space: nowrap;
	overflow: hidden;

	/* Animated properties */
	max-width: 220px;
	transition:
		max-width     .4s cubic-bezier(.4, 0, .2, 1),
		padding       .4s cubic-bezier(.4, 0, .2, 1),
		gap           .4s cubic-bezier(.4, 0, .2, 1),
		border-radius .4s ease,
		transform     .2s cubic-bezier(.34, 1.56, .64, 1),
		box-shadow    .2s ease,
		background    .25s ease;
}

#wpn-bell-btn:hover {
	transform: scale(1.07) translateY(-2px);
	box-shadow: 0 8px 26px rgba(37, 99, 235, .55);
}
#wpn-bell-btn:active  { transform: scale(.96); }
#wpn-bell-btn:disabled { opacity: .65; cursor: wait; }

/* ── SUBSCRIBED — collapse to compact circle ── */
#wpn-bell-btn.wpn-subscribed {
	background:  linear-gradient(135deg, #059669 0%, #047857 100%);
	box-shadow:  0 4px 16px rgba(5, 150, 105, .4);
	max-width:   48px;
	padding:     13px;
	gap:         0;
	border-radius: 50%;
}

/* Expand on hover when subscribed */
#wpn-bell-btn.wpn-subscribed:hover {
	max-width:    220px;
	padding:      12px 20px;
	gap:          8px;
	border-radius: 50px;
	box-shadow:   0 8px 24px rgba(5, 150, 105, .55);
	transform:    translateY(-2px);
}

/* ── Bell label — fade out when collapsed ── */
#wpn-bell-label {
	display: inline-block;
	overflow: hidden;
	max-width: 150px;
	opacity: 1;
	transition: opacity .25s ease, max-width .4s cubic-bezier(.4, 0, .2, 1);
}
#wpn-bell-btn.wpn-subscribed #wpn-bell-label {
	opacity:   0;
	max-width: 0;
}
#wpn-bell-btn.wpn-subscribed:hover #wpn-bell-label {
	opacity:   1;
	max-width: 150px;
}

/* ── Bell icon ring animation ── */
#wpn-bell-icon { flex-shrink: 0; transition: transform .2s ease; }
#wpn-bell-btn:hover:not(.wpn-subscribed) #wpn-bell-icon {
	animation: wpn-ring .5s ease-in-out;
}
@keyframes wpn-ring {
	0%   { transform: rotate(0deg); }
	15%  { transform: rotate(12deg); }
	30%  { transform: rotate(-10deg); }
	45%  { transform: rotate(8deg); }
	60%  { transform: rotate(-5deg); }
	100% { transform: rotate(0deg); }
}

/* ── Mobile ── */
@media (max-width: 480px) {
	#wpn-bell-wrap { bottom: 16px !important; right: 16px !important; left: auto !important; }
	#wpn-bell-wrap[data-pos="bottom-left"],
	#wpn-bell-wrap[data-pos="top-left"] { right: auto !important; left: 16px !important; }
}
