/*
 * xnx_comment_skin 评论装扮样式
 * 前缀约定：xnx-cs-*
 */

/* ---- 商城卡片 ---- */
.xnx-cs-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding-top: 1.5rem;
}
.xnx-cs-card:hover {
	transform: translateY(-2px);
}
.xnx-cs-card-owned {
	opacity: 0.75;
}

/* 预览区：背景色由模板内联 style 输出；图片类型叠加 <img> 铺满 */
/* 装饰图右上角角标（商城/我的装扮卡片预览 + 前台 ::after 共用此观感） */
.xnx-cs-corner {
    position: absolute;
    top: -1.125rem;
    right: 0;
 
    width: 128px;
    height: 32px;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
}

.xnx-cs-preview {
	position: relative;
	height: 60px;
	border-radius: 0.5rem ;
	background-color: #f1f3f5;
	overflow: revert;
	margin-bottom: 0.5rem;
}

/* 已拥有角标（右上角） */
.xnx-cs-badge {
	position: absolute;
	bottom:  0.5rem;
	right: 0.5rem;
	z-index: 10;
}

/* ---- 我的装扮设置页：选择 chips ---- */
button.xnx-cs-chip,
button.xnx-cs-chip-none {
	display: inline-flex;
	align-items: center;
	border: 1px solid #dee2e6;
	background: #fff;
	border-radius: 0.5rem;
	padding: 0.35rem 0.7rem;
	font-size: 0.875rem;
	line-height: 1.4;
	cursor: pointer;
}
button.xnx-cs-chip:hover:not(:disabled),
button.xnx-cs-chip-none:hover {
	border-color: #86b7fe;
}
button.xnx-cs-chip.active,
button.xnx-cs-thumb-chip.active,
button.xnx-cs-text-swatch.active {
	outline: 2px solid #0d6efd;
	outline-offset: 1px;
}
button.xnx-cs-chip:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 色块小样 */
.xnx-cs-swatch {
	display: inline-block;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 0.3rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

/* 背景图缩略 chip */
button.xnx-cs-thumb-chip {
	position: relative;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 0.5rem;
	overflow: hidden;
	cursor: pointer;
	background: #fff;
}
button.xnx-cs-thumb-chip img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
button.xnx-cs-thumb-chip:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
button.xnx-cs-thumb-chip .badge {
	position: absolute;
	left: 2px;
	bottom: 2px;
	font-size: 0.6em;
}

/* 文字颜色 swatch */
button.xnx-cs-text-swatch {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid rgba(0, 0, 0, 0.1);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
}
button.xnx-cs-text-swatch:first-child {
	background: #fff;
}

/* ---- 我的装扮：卡片预览区（即评论楼层层叠样式） ---- */
.xnx-cs-card-preview {
	margin: .75rem 0;
    position : relative;
    min-height: 96px;
    padding: .75rem 1rem;
    border-radius: .5rem;
	overflow: none;
	background-color: #f8f9fa;
}

.xnx-cs-card-demo {
	display: block;
	font-size: .85rem;
	line-height: 1.4;
	word-break: break-word;
	margin-top: 0.4rem;
}

.xnx-cs-card-active {
	position: absolute;
	bottom: .4rem;
	right: .4rem;
	z-index: 2;
}

/* ---- 预览区空态 ---- */
.xnx-cs-preview-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #adb5bd;
}

/* ---- 旧设置页预览盒（已废弃，保留兼容） ---- */
.xnx-cs-preview-box {
	min-height: 52px;
	word-break: break-word;
}

/* ---- 数据加载中按钮态（原生实现，无 htmx dependency）---- */
.btn[data-loading="1"]::after {
	content: '';
	display: inline-block;
	width: 0.85em;
	height: 0.85em;
	margin-left: 0.35rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: xnx-cs-spin 0.6s linear infinite;
	vertical-align: -0.1em;
}
@keyframes xnx-cs-spin {
	to { transform: rotate(360deg); }
}
