/* Sticky Post Bar */

.cpc-sticky-post-bar {
	--cpc-sticky-top: 16px;
	--cpc-sticky-width: 100%;
	--cpc-sticky-bg-start: #8b2cf5;
	--cpc-sticky-bg-end: #4469d9;
	--cpc-sticky-collapsed-start: #8b2cf5;
	--cpc-sticky-collapsed-end: #4469d9;
	position: fixed;
	left: 0;
	right: 0;
	top: var(--cpc-sticky-top);
	width: var(--cpc-sticky-width);
	z-index: 90;
	max-width: none;
	transform: none;
	margin: 0;
	font-family: inherit;
}

.cpc-sticky-post-bar__expanded {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	background: linear-gradient(90deg, var(--cpc-sticky-bg-start) 0%, var(--cpc-sticky-bg-end) 100%);
	color: #fff;
	box-shadow: 0 8px 20px rgba(34, 23, 73, 0.28);
	text-align: center;
}

.cpc-sticky-post-bar__content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-width: 0;
	flex: 0 1 auto;
	max-width: min(70vw, 980px);
}

.cpc-sticky-post-bar__badge {
	display: inline-flex;
	align-items: center;
	background: rgba(255, 148, 48, 0.95);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	border-radius: 999px;
	padding: 0.4rem 0.7rem;
	white-space: nowrap;
}

.cpc-sticky-post-bar__title {
	color: #fff;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cpc-sticky-post-bar__title:hover {
	text-decoration: underline;
}

.cpc-sticky-post-bar__actions {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.cpc-sticky-post-bar__read-more {
	color: rgba(255, 255, 255, 0.95);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
}

.cpc-sticky-post-bar__read-more:hover {
	color: #fff;
	text-decoration: underline;
}

.cpc-sticky-post-bar__toggle,
.cpc-sticky-post-bar__collapsed-trigger {
	border: 0;
	cursor: pointer;
}

.cpc-sticky-post-bar__toggle {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.cpc-sticky-post-bar__toggle:hover {
	background: rgba(255, 255, 255, 0.24);
}

.cpc-sticky-post-bar__collapsed-trigger {
	display: none;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.65rem;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--cpc-sticky-collapsed-start) 0%, var(--cpc-sticky-collapsed-end) 100%);
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	box-shadow: 0 4px 10px rgba(34, 23, 73, 0.2);
}

.cpc-sticky-post-bar__collapsed-label {
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.1;
}

.cpc-sticky-post-bar__collapsed-icon {
	font-size: 0.85rem;
	line-height: 1;
}

.cpc-sticky-post-bar.is-collapsed {
	left: 50%;
	right: auto;
	top: var(--cpc-sticky-top);
	width: auto;
	max-width: none;
	transform: translateX(-50%);
}

.cpc-sticky-post-bar.is-collapsed .cpc-sticky-post-bar__expanded {
	display: none;
}

.cpc-sticky-post-bar.is-collapsed .cpc-sticky-post-bar__collapsed-trigger {
	display: inline-flex;
}

/* In Elementor editor, show preview where widget is dropped (not fixed). */
.cpc-sticky-post-bar.cpc-sticky-post-bar--editor-preview {
	position: relative;
	left: auto;
	right: auto;
	top: auto;
	max-width: 100%;
	margin: 0;
}

@media (max-width: 767px) {
	.cpc-sticky-post-bar {
		top: auto;
		bottom: 10px;
		left: 8px;
		right: 8px;
		width: auto;
	}

	.cpc-sticky-post-bar.is-collapsed {
		top: auto;
		bottom: 10px;
		left: 50%;
		right: auto;
	}

	.cpc-sticky-post-bar__expanded {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 0.6rem;
		padding: 0.45rem 0.6rem;
		border-radius: 8px;
	}

	.cpc-sticky-post-bar__content {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 0.45rem;
		max-width: min(62vw, 520px);
	}

	.cpc-sticky-post-bar__badge {
		font-size: 0.65rem;
		padding: 0.28rem 0.5rem;
	}

	.cpc-sticky-post-bar__title {
		font-size: 0.82rem;
		white-space: nowrap;
		text-align: center;
		max-width: 100%;
	}

	.cpc-sticky-post-bar__actions {
		justify-content: center;
		width: auto;
		gap: 0.35rem;
	}

	.cpc-sticky-post-bar__read-more {
		font-size: 0.78rem;
	}

	.cpc-sticky-post-bar__toggle {
		width: 24px;
		height: 24px;
	}
}
