/**
 * Frontend Styles for WP Web Push Notifications Widget & Dialogs.
 */

:root {
	--wp-push-accent: #0073aa;
	--wp-push-accent-hover: #005177;
	--wp-push-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Container */
#wp-push-widget-container {
	position: fixed;
	z-index: 999990;
	font-family: var(--wp-push-font);
}

.wp-push-pos-bottom-right {
	bottom: 24px;
	right: 24px;
}

.wp-push-pos-bottom-left {
	bottom: 24px;
	left: 24px;
}

/* Floating Bell Button */
.wp-push-bell {
	position: relative;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--wp-push-accent);
	color: #ffffff;
	border: none;
	outline: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-push-bell:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.wp-push-bell:active {
	transform: scale(0.96);
}

.wp-push-bell-icon {
	width: 26px;
	height: 26px;
	transition: transform 0.3s ease;
}

/* Subtle ring animation for unsubscribed bell */
.wp-push-bell:not(.is-subscribed):hover .wp-push-bell-icon {
	animation: wp-push-ring 0.6s ease-in-out infinite alternate;
}

@keyframes wp-push-ring {
	0% { transform: rotate(-12deg); }
	100% { transform: rotate(12deg); }
}

/* Bell Badge */
.wp-push-bell-badge {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #ff5252;
	border: 2px solid #ffffff;
	display: none;
}

.wp-push-bell-badge.is-active {
	display: block;
	background: #00e676; /* Green dot when active */
}

.wp-push-bell.is-subscribed {
	background: #2e7d32;
}

.wp-push-bell.is-blocked {
	background: #757575;
	opacity: 0.8;
}

/* Soft-Ask Banner Dialog */
.wp-push-soft-ask {
	position: absolute;
	bottom: 70px;
	width: 320px;
	max-width: calc(100vw - 48px);
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	color: #1e1e1e;
	overflow: hidden;
	animation: wp-push-fade-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-push-pos-bottom-right .wp-push-soft-ask,
.wp-push-pos-bottom-right .wp-push-status-popover {
	right: 0;
}

.wp-push-pos-bottom-left .wp-push-soft-ask,
.wp-push-pos-bottom-left .wp-push-status-popover {
	left: 0;
}

@keyframes wp-push-fade-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wp-push-card {
	padding: 18px 20px;
}

.wp-push-card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.wp-push-card-icon {
	width: 36px;
	height: 36px;
	background: rgba(0, 115, 170, 0.12);
	color: var(--wp-push-accent);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wp-push-card-title-group {
	flex-grow: 1;
}

.wp-push-card-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	color: #1e1e1e;
}

.wp-push-card-subtitle {
	margin: 2px 0 0 0;
	font-size: 12px;
	color: #666666;
}

.wp-push-close-btn {
	background: none;
	border: none;
	font-size: 20px;
	color: #999999;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.wp-push-close-btn:hover {
	color: #333333;
}

.wp-push-card-body p {
	margin: 0 0 16px 0;
	font-size: 13px;
	line-height: 1.45;
	color: #4b4b4b;
}

.wp-push-card-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* Buttons */
.wp-push-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
}

.wp-push-btn:active {
	transform: scale(0.98);
}

.wp-push-btn-primary {
	background: var(--wp-push-accent);
	color: #ffffff;
}

.wp-push-btn-primary:hover {
	background: var(--wp-push-accent-hover);
}

.wp-push-btn-secondary {
	background: #f0f0f1;
	color: #3c434a;
}

.wp-push-btn-secondary:hover {
	background: #e2e4e7;
}

.wp-push-btn-danger {
	background: #d63638;
	color: #ffffff;
	width: 100%;
	padding: 8px 12px;
	font-size: 12px;
}

.wp-push-btn-danger:hover {
	background: #b32d2e;
}

/* Status Popover */
.wp-push-status-popover {
	position: absolute;
	bottom: 70px;
	width: 250px;
	background: #ffffff;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	padding: 16px;
	color: #1e1e1e;
	animation: wp-push-fade-up 0.2s ease-out;
}

.wp-push-status-text {
	margin: 0 0 12px 0;
	font-size: 13px;
	line-height: 1.4;
	color: #2c3338;
}

.wp-push-status-text strong {
	color: #00a32a;
}

.wp-push-status-text span {
	font-size: 12px;
	color: #646970;
}

/* Shortcode Button Styling */
.wp-push-shortcode-wrapper {
	display: inline-block;
	margin: 10px 0;
}

.wp-push-shortcode-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 6px;
	background: var(--wp-push-accent, #0073aa);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.wp-push-shortcode-btn:hover {
	opacity: 0.95;
	transform: translateY(-1px);
}

.wp-push-shortcode-btn.is-subscribed {
	background: #2e7d32;
}

/* Mobile responsiveness */
@media screen and (max-width: 480px) {
	.wp-push-pos-bottom-right {
		bottom: 16px;
		right: 16px;
	}
	.wp-push-pos-bottom-left {
		bottom: 16px;
		left: 16px;
	}
	.wp-push-bell {
		width: 48px;
		height: 48px;
	}
	.wp-push-soft-ask {
		bottom: 64px;
		width: calc(100vw - 32px);
	}
}
