/**
 * v1.4.0 Widgets Pack - frontend + editor preview styles.
 * 极简卡片风：白底、浅灰边、#2271b1 强调色。
 */

/* === 公共卡片骨架 === */
.wpss-block {
	margin: 0 0 24px;
	padding: 20px 22px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
}

.wpss-block-title {
	margin: 0 0 16px;
	padding: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	border-bottom: 1px solid #f0f0f1;
}

/* === site-summary 数字网格 === */
.wpss-summary-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 12px;
}

.wpss-summary-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 14px 8px;
	background: #f6f7f7;
	border-radius: 6px;
	text-align: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.wpss-summary-item:hover {
	background: #eef2f7;
	transform: translateY(-1px);
}

.wpss-summary-value {
	display: block;
	font-size: 22px;
	font-weight: 600;
	color: #1d2327;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
	margin-bottom: 4px;
}

.wpss-summary-label {
	display: block;
	font-size: 11px;
	color: #646970;
	letter-spacing: 0.3px;
}

.wpss-summary-item.is-online .wpss-summary-value {
	color: #2271b1;
}

.wpss-summary-item.is-online .wpss-summary-value::before {
	content: '';
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 6px;
	border-radius: 50%;
	background: #00a32a;
	box-shadow: 0 0 0 2px rgba(0, 163, 42, 0.18);
	vertical-align: middle;
	animation: wpss-pulse 2s infinite ease-in-out;
}

@keyframes wpss-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
	.wpss-summary-item { transition: none; }
	.wpss-summary-item.is-online .wpss-summary-value::before { animation: none; }
}

/* === 占位锚点：剩余 4 个块的样式将填进来 === */
/* === 公共：排行/列表 === */
.wpss-block-empty {
	margin: 0;
	padding: 18px 0;
	text-align: center;
	color: #8c8f94;
	font-size: 13px;
}

.wpss-rank-list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.wpss-rank-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f6f7f7;
}

.wpss-rank-item:last-child {
	border-bottom: none;
}

.wpss-rank-badge {
	flex: 0 0 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #f0f0f1;
	color: #646970;
	font-size: 12px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.wpss-rank-badge.is-top {
	background: #2271b1;
	color: #ffffff;
}

.wpss-rank-link {
	flex: 1 1 auto;
	min-width: 0;
	color: #1d2327;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.wpss-rank-link:hover {
	color: #2271b1;
	text-decoration: underline;
}

.wpss-rank-meta {
	flex: 0 0 auto;
	color: #646970;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.wpss-rank-link { transition: none; }
}

/* === top-posts === */
/* === recent-visits === */
.wpss-visit-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpss-visit-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #f6f7f7;
}

.wpss-visit-item:last-child { border-bottom: none; }

.wpss-visit-avatar {
	flex: 0 0 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: linear-gradient(135deg, #72aee6, #2271b1);
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
}

.wpss-visit-body {
	flex: 1 1 auto;
	min-width: 0;
}

.wpss-visit-line1 {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}

.wpss-visit-ip {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	color: #1d2327;
	font-variant-numeric: tabular-nums;
}

.wpss-visit-time {
	font-size: 11px;
	color: #8c8f94;
	white-space: nowrap;
}

.wpss-visit-line2 {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wpss-visit-tag {
	display: inline-block;
	padding: 1px 8px;
	background: #f0f0f1;
	border-radius: 10px;
	font-size: 11px;
	color: #646970;
	line-height: 1.6;
}

.wpss-visit-tag.is-ref {
	background: #eef4fb;
	color: #2271b1;
}
/* === top-keywords （标签云） === */
.wpss-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.wpss-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 16px;
	background: #f6f7f7;
	color: #1d2327;
	line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease;
}

.wpss-tag:hover {
	background: #eef4fb;
	color: #2271b1;
}

.wpss-tag-tier-1 { font-size: 12px; opacity: 0.7; }
.wpss-tag-tier-2 { font-size: 13px; opacity: 0.8; }
.wpss-tag-tier-3 { font-size: 14px; }
.wpss-tag-tier-4 { font-size: 16px; font-weight: 500; background: #e9f0f8; color: #2271b1; }
.wpss-tag-tier-5 { font-size: 18px; font-weight: 600; background: #2271b1; color: #ffffff; }
.wpss-tag-tier-5:hover { background: #135e96; color: #ffffff; }

.wpss-tag-count {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.06);
	font-size: 10px;
	font-variant-numeric: tabular-nums;
	line-height: 1.4;
}

.wpss-tag-tier-5 .wpss-tag-count {
	background: rgba(255, 255, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
	.wpss-tag { transition: none; }
}
/* === top-referrers （水平条形） === */
.wpss-bar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpss-bar-item {
	padding: 10px 0;
	border-bottom: 1px solid #f6f7f7;
}

.wpss-bar-item:last-child { border-bottom: none; }

.wpss-bar-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	font-size: 13px;
}

.wpss-bar-favicon {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	border-radius: 3px;
	background: #f0f0f1;
}

.wpss-bar-label {
	flex: 1 1 auto;
	min-width: 0;
	color: #1d2327;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
}

.wpss-bar-count {
	flex: 0 0 auto;
	color: #646970;
	font-variant-numeric: tabular-nums;
	font-size: 12px;
	font-weight: 600;
}

.wpss-bar-track {
	height: 6px;
	background: #f0f0f1;
	border-radius: 3px;
	overflow: hidden;
}

.wpss-bar-fill {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #2271b1, #72aee6);
	border-radius: 3px;
	transition: width 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
	.wpss-bar-fill { transition: none; }
}
