/* ==========================================================
   星評価コンポーネント
   ─ ucs_render_star_rating() の出力に対応
   ========================================================== */

:root {
	--ucs-color-star-full:  #f59e0b;
	--ucs-color-star-empty: #d1d5db;
}

/* ── ラッパー ── */
.ucs-star-rating {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	line-height: 1;
	vertical-align: middle;
}

/* ── ラベル ── */
.ucs-star-rating__label {
	font-size: 0.8125rem;   /* 13px */
	color: var(--wp--preset--color--text-muted, #6b7280);
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── 星コンテナ ── */
.ucs-star-rating__stars {
	display: inline-flex;
	align-items: center;
	gap: 1px;
}

/* ── 個別の星 ── */
.ucs-star {
	display: inline-flex;
	flex-shrink: 0;
}

.ucs-star--full  { color: var(--ucs-color-star-full);  }
.ucs-star--half  { color: var(--ucs-color-star-full);  }
.ucs-star--empty { color: var(--ucs-color-star-empty); }

/* ── SVG ── */
.ucs-star-svg {
	fill: currentColor;
	display: block;
}

/* ── サイズバリアント ── */
.ucs-star-rating--sm .ucs-star-svg {
	width: 14px;
	height: 14px;
}

.ucs-star-rating--md .ucs-star-svg {
	width: 18px;
	height: 18px;
}

.ucs-star-rating--lg .ucs-star-svg {
	width: 24px;
	height: 24px;
}

/* ── 数値 ── */
.ucs-star-rating__value {
	font-weight: 700;
	color: var(--wp--preset--color--text-base, #374151);
	white-space: nowrap;
}

.ucs-star-rating--sm .ucs-star-rating__value { font-size: 0.75rem;  }
.ucs-star-rating--md .ucs-star-rating__value { font-size: 0.875rem; }
.ucs-star-rating--lg .ucs-star-rating__value { font-size: 1.125rem; }

/* ── 評価軸リスト ── */
.ucs-axis-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.ucs-axis-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ucs-axis-item__label {
	font-size: 0.875rem;
	color: var(--wp--preset--color--text-muted, #6b7280);
	min-width: 100px;
	margin: 0;
}

.ucs-axis-item__stars {
	margin: 0;
	display: flex;
	align-items: center;
}

/* ── モバイル ── */
@media (max-width: 640px) {
	.ucs-axis-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.ucs-axis-item__label {
		min-width: unset;
	}
}
