/* =========================================================================
   Mamoki — Blog Sidebar (trang Tin tức + chi tiết bài viết)
   Target: .post-sidebar #secondary
   ========================================================================== */

.mamoki-blog-cards {
	--mbs-primary: var(--fs-color-primary, var(--primary-color, #0098ff));
	--mbs-border: #ece8e4;
	--mbs-bg: #fafafa;
	--mbs-radius: 14px;
}

/* ---------- Widget card ---------- */
.post-sidebar #secondary.widget-area,
.post-sidebar .widget-area {
	padding-top: 4px;
}

.post-sidebar .widget {
	background: #fff !important;
	border: 1px solid var(--mbs-border) !important;
	border-radius: var(--mbs-radius) !important;
	padding: 20px 18px 18px !important;
	margin-bottom: 20px !important;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.post-sidebar .widget:last-child {
	margin-bottom: 0 !important;
}

.post-sidebar .widget-title,
.post-sidebar .widget .widget-title {
	display: block !important;
	font-size: 0.78rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	color: #111 !important;
	margin: 0 0 16px !important;
	padding: 0 !important;
	line-height: 1.3 !important;
}

.post-sidebar .widget-title span,
.post-sidebar .widget .widget-title span {
	display: block;
}

.post-sidebar .widget .is-divider,
.post-sidebar .widget .is-divider.small {
	display: none !important;
}

/* Tìm kiếm → inc/search-widget/assets/search-widget.css */

/* ---------- Danh mục ---------- */
.post-sidebar .widget_categories ul,
.post-sidebar .widget_archive ul,
.post-sidebar .widget_nav_menu ul,
.post-sidebar .widget_pages ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--mbs-bg);
	border-radius: 10px;
	padding: 8px !important;
}

.post-sidebar .widget_categories li,
.post-sidebar .widget_archive li,
.post-sidebar .widget_nav_menu li,
.post-sidebar .widget_pages li {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	list-style: none !important;
}

.post-sidebar .widget_categories li + li,
.post-sidebar .widget_archive li + li {
	margin-top: 2px !important;
}

.post-sidebar .widget_categories li a,
.post-sidebar .widget_archive li a,
.post-sidebar .widget_nav_menu li a,
.post-sidebar .widget_pages li a {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px !important;
	border-radius: 8px !important;
	color: #475569 !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	text-decoration: none !important;
	transition: background 0.2s ease, color 0.2s ease;
}

.post-sidebar .widget_categories li a:hover,
.post-sidebar .widget_archive li a:hover,
.post-sidebar .widget_nav_menu li a:hover,
.post-sidebar .widget_pages li a:hover {
	background: #fff !important;
	color: var(--mbs-primary) !important;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.post-sidebar .widget_categories .count,
.post-sidebar .widget_archive .count {
	font-size: 0.75rem;
	font-weight: 700;
	color: #94a3b8;
	background: #fff;
	padding: 2px 8px;
	border-radius: 999px;
}

.post-sidebar .widget_categories .current-cat > a,
.post-sidebar .widget_categories li.current-cat-parent > a {
	background: #fff !important;
	color: var(--mbs-primary) !important;
	font-weight: 700 !important;
	box-shadow: inset 3px 0 0 var(--mbs-primary);
}

/* ---------- Bài viết mới ---------- */
.post-sidebar .widget_recent_entries ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.post-sidebar .widget_recent_entries li {
	margin: 0 !important;
	padding: 14px 0 !important;
	border-bottom: 1px solid #f0ece8 !important;
	list-style: none !important;
}

.post-sidebar .widget_recent_entries li:first-child {
	padding-top: 0 !important;
}

.post-sidebar .widget_recent_entries li:last-child {
	border-bottom: none !important;
	padding-bottom: 0 !important;
}

.post-sidebar .widget_recent_entries li a {
	display: -webkit-box !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.88rem !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	color: #1e293b !important;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

.post-sidebar .widget_recent_entries li a:hover {
	color: var(--mbs-primary) !important;
}

.post-sidebar .widget_recent_entries .post-date {
	display: block;
	margin-top: 6px;
	font-size: 0.75rem !important;
	color: #94a3b8 !important;
	font-weight: 500;
}

/* ---------- Tag cloud ---------- */
.post-sidebar .tagcloud a {
	display: inline-block;
	margin: 0 6px 8px 0 !important;
	padding: 6px 12px !important;
	border-radius: 999px !important;
	background: var(--mbs-bg) !important;
	border: 1px solid var(--mbs-border) !important;
	color: #475569 !important;
	font-size: 0.78rem !important;
	text-decoration: none !important;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.post-sidebar .tagcloud a:hover {
	background: var(--mbs-primary) !important;
	border-color: var(--mbs-primary) !important;
	color: #fff !important;
}

/* ---------- Sticky sidebar spacing ---------- */
.post-sidebar .is-sticky-column {
	padding-bottom: 24px;
}

/* ---------- Mobile: sidebar dưới nội dung ---------- */
@media only screen and (max-width: 849px) {
	.post-sidebar {
		margin-top: 32px;
		padding-top: 8px;
		border-top: 1px solid var(--mbs-border);
	}

	.post-sidebar .widget {
		padding: 16px 14px !important;
	}
}
