/**
 * WPMLS Push Notifications - Public Styles
 *
 * Styles for subscription widget, shortcode, and permission modal.
 */

/* Subscribe Button */
.wpmlspn-subscribe-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s ease;
}

.wpmlspn-subscribe-btn:hover {
	background: #005a87;
}

.wpmlspn-subscribe-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.wpmlspn-subscribe-btn.subscribed {
	background: #46b450;
}

.wpmlspn-subscribe-btn.subscribed:hover {
	background: #3a9a42;
}

/* Bell Icon */
.wpmlspn-bell-icon {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Widget Container */
.wpmlspn-widget {
	padding: 15px;
}

.wpmlspn-widget-title {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
}

.wpmlspn-widget-description {
	margin: 0 0 15px;
	font-size: 14px;
	color: #666;
}

.wpmlspn-widget .wpmlspn-subscribe-btn {
	width: 100%;
	justify-content: center;
}

/* Shortcode Container */
.wpmlspn-shortcode {
	display: inline-block;
}

.wpmlspn-shortcode.align-center {
	display: block;
	text-align: center;
}

.wpmlspn-shortcode.align-left {
	display: block;
	text-align: left;
}

.wpmlspn-shortcode.align-right {
	display: block;
	text-align: right;
}

/* Permission Modal Overlay */
.wpmlspn-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wpmlspn-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Modal Content */
.wpmlspn-modal {
	background: #fff;
	border-radius: 8px;
	padding: 30px;
	max-width: 420px;
	width: 90%;
	text-align: center;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.wpmlspn-modal-overlay.active .wpmlspn-modal {
	transform: translateY(0);
}

.wpmlspn-modal-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	background: #f0f6fc;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wpmlspn-modal-icon svg {
	width: 32px;
	height: 32px;
	fill: #0073aa;
}

.wpmlspn-modal-title {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 600;
	color: #1d2327;
}

.wpmlspn-modal-text {
	margin: 0 0 25px;
	font-size: 15px;
	color: #50575e;
	line-height: 1.5;
}

.wpmlspn-modal-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.wpmlspn-modal-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s ease;
}

.wpmlspn-modal-btn-primary {
	background: #0073aa;
	color: #fff;
}

.wpmlspn-modal-btn-primary:hover {
	background: #005a87;
}

.wpmlspn-modal-btn-secondary {
	background: #f0f0f1;
	color: #50575e;
}

.wpmlspn-modal-btn-secondary:hover {
	background: #dcdcde;
}

/* Status Messages */
.wpmlspn-status {
	margin-top: 10px;
	padding: 10px 15px;
	border-radius: 4px;
	font-size: 14px;
	display: none;
}

.wpmlspn-status.show {
	display: block;
}

.wpmlspn-status.success {
	background: #d4edda;
	color: #155724;
}

.wpmlspn-status.error {
	background: #f8d7da;
	color: #721c24;
}

.wpmlspn-status.info {
	background: #cce5ff;
	color: #004085;
}

/* Unsubscribe Link */
.wpmlspn-unsubscribe-link {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	color: #666;
	text-decoration: none;
}

.wpmlspn-unsubscribe-link:hover {
	color: #d63638;
	text-decoration: underline;
}

/* Loading Spinner */
.wpmlspn-loading {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wpmlspn-spin 0.8s linear infinite;
}

@keyframes wpmlspn-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Browser Not Supported */
.wpmlspn-not-supported {
	padding: 15px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
	font-size: 14px;
}

/* Blocked State */
.wpmlspn-blocked {
	padding: 15px;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	color: #721c24;
	font-size: 14px;
}

/* Floating Button (Optional Style) */
.wpmlspn-floating-btn {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #0073aa;
	color: #fff;
	border: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wpmlspn-floating-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.wpmlspn-floating-btn svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.wpmlspn-floating-btn.subscribed {
	background: #46b450;
}

/* Toast Notification */
.wpmlspn-toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(100px);
	background: #1d2327;
	color: #fff;
	padding: 12px 24px;
	border-radius: 4px;
	font-size: 14px;
	z-index: 999999;
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.wpmlspn-toast.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.wpmlspn-toast.success {
	background: #46b450;
}

.wpmlspn-toast.error {
	background: #d63638;
}

/* Responsive */
@media (max-width: 480px) {
	.wpmlspn-modal {
		padding: 20px;
		margin: 15px;
	}

	.wpmlspn-modal-title {
		font-size: 20px;
	}

	.wpmlspn-modal-actions {
		flex-direction: column;
	}

	.wpmlspn-modal-btn {
		width: 100%;
	}
}
