/**
 * 说说前台样式：时间线 + 九宫格 + 点赞。
 *
 * 默认样式，主题可覆盖同名 class。
 */

.firefly-shuo-timeline {
	position: relative;
	max-width: 700px;
	margin: 0 auto;
	padding-left: 8px;
}

.firefly-shuo-empty {
	text-align: center;
	opacity: 0.6;
	padding: 40px 0;
}

/* 单条 */
.firefly-shuo-item {
	display: flex;
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}
.firefly-shuo-item:last-child {
	border-bottom: none;
}

/* 头像 */
.firefly-shuo-avatar {
	flex: 0 0 auto;
}
/* 叠层结构：文字层垫底，图片层盖上；图片加载失败 (onerror 隐藏) 时露出文字层 */
.firefly-shuo-avatar-wrap {
	position: relative;
	display: block;
	width: 44px;
	height: 44px;
}
.firefly-shuo-avatar-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #6a82fb, #fc5c7d);
}
.firefly-shuo-avatar-img {
	position: absolute;
	inset: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

/* 主体 */
.firefly-shuo-main {
	flex: 1 1 auto;
	min-width: 0;
}

.firefly-shuo-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 6px;
}
.firefly-shuo-author {
	font-weight: 600;
	font-size: 0.95rem;
}
.firefly-shuo-time {
	font-size: 0.8rem;
	opacity: 0.55;
}
.firefly-shuo-mood {
	font-size: 0.78rem;
	padding: 2px 8px;
	border-radius: 10px;
	background: rgba(128, 128, 128, 0.12);
}

/* 正文 */
.firefly-shuo-content {
	font-size: 0.95rem;
	line-height: 1.7;
	word-wrap: break-word;
}
.firefly-shuo-content p:last-child {
	margin-bottom: 0;
}

/* 九宫格 */
.firefly-shuo-gallery {
	display: grid;
	gap: 6px;
	margin-top: 10px;
}
.firefly-shuo-gallery--1 {
	grid-template-columns: minmax(0, 60%);
}
.firefly-shuo-gallery--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.firefly-shuo-gallery--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.firefly-shuo-photo {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
}
.firefly-shuo-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}
.firefly-shuo-photo:hover img {
	transform: scale(1.05);
}
/* 单图不裁剪成正方形 */
.firefly-shuo-gallery--1 .firefly-shuo-photo {
	aspect-ratio: auto;
	max-width: 100%;
}
.firefly-shuo-gallery--1 .firefly-shuo-photo img {
	height: auto;
}

/* 操作栏 */
.firefly-shuo-actions {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-top: 12px;
}
.firefly-shuo-like,
.firefly-shuo-comment-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.85rem;
	color: inherit;
	opacity: 0.7;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.2s ease, color 0.2s ease;
}
.firefly-shuo-like:hover,
.firefly-shuo-comment-link:hover {
	opacity: 1;
}
.firefly-shuo-like-icon {
	font-size: 1.1rem;
	line-height: 1;
}
/* 已点赞：实心红心 */
.firefly-shuo-like.is-liked {
	color: #e0245e;
	opacity: 1;
}
.firefly-shuo-like.is-liked .firefly-shuo-like-icon::before {
	content: "\2665"; /* ♥ 实心 */
}
.firefly-shuo-like.is-liked .firefly-shuo-like-icon {
	font-size: 0;
}
.firefly-shuo-like.is-liked .firefly-shuo-like-icon::before {
	font-size: 1.1rem;
}
/* 点赞跳动动画 */
.firefly-shuo-like.just-liked .firefly-shuo-like-icon {
	animation: firefly-shuo-pop 0.4s ease;
}
@keyframes firefly-shuo-pop {
	0% { transform: scale(1); }
	50% { transform: scale(1.4); }
	100% { transform: scale(1); }
}

/* 单页：正文后追加的操作栏留点间距 */
.firefly-shuo-actions--single {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid rgba(128, 128, 128, 0.15);
}

/* 分页 */
.firefly-shuo-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
	flex-wrap: wrap;
}
.firefly-shuo-pagination .page-numbers {
	padding: 6px 12px;
	border-radius: 8px;
	background: rgba(128, 128, 128, 0.1);
	text-decoration: none;
	color: inherit;
	font-size: 0.85rem;
}
.firefly-shuo-pagination .page-numbers.current {
	background: rgba(128, 128, 128, 0.28);
	font-weight: 600;
}

@media (max-width: 480px) {
	.firefly-shuo-avatar-wrap,
	.firefly-shuo-avatar-img {
		width: 38px;
		height: 38px;
	}
}

/* 博主删除评论按钮（仅博主可见） */
.firefly-shuo-comment-admin {
	margin-left: 8px;
}
.firefly-shuo-del-comment {
	font-size: 0.8em;
	color: #e0245e;
	text-decoration: none;
	opacity: 0.75;
	transition: opacity 0.2s;
}
.firefly-shuo-del-comment:hover {
	opacity: 1;
	text-decoration: underline;
}

/* 评论头像文字兜底：图片加载失败时露出昵称首字 */
.firefly-shuo-cavatar-wrap {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	line-height: 0;
}
.firefly-shuo-cavatar-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 0.9em;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: linear-gradient(135deg, #6a82fb, #fc5c7d);
}
.firefly-shuo-cavatar-wrap img {
	position: relative;
	z-index: 1;
	border-radius: 50%;
}

/* 评论框：游客头像选择器 */
.firefly-shuo-avatar-picker {
	margin: 10px 0 14px;
}
.firefly-shuo-avatar-picker-label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.9em;
	opacity: 0.85;
}
.firefly-shuo-avatar-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.firefly-shuo-avatar-option {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 50%;
	background: none;
	cursor: pointer;
	line-height: 0;
	transition: border-color 0.2s, transform 0.15s;
}
.firefly-shuo-avatar-option img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.firefly-shuo-avatar-option:hover {
	transform: scale(1.08);
}
.firefly-shuo-avatar-option.is-selected {
	border-color: #fc5c7d;
}

/* 评论区：评论者选定的本地头像 */
.firefly-shuo-cavatar-img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	display: inline-block;
	vertical-align: middle;
}
