/* お気に入りハートボタン + お気に入り一覧ページのスタイル。
   バニラ JS から data 属性 / aria-pressed を切り替えて反映する。 */

/* === ボタン共通 === */
.guz-fav-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1.5px solid #d97706;
	border-radius: 999px;
	background: #fff;
	color: #d97706;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 100ms ease;
	-webkit-tap-highlight-color: transparent;
}

.guz-fav-btn:hover {
	background: #fff7ed;
}

.guz-fav-btn:active {
	transform: scale(0.96);
}

.guz-fav-btn[aria-pressed="true"] {
	background: #d97706;
	color: #fff;
	border-color: #d97706;
}

.guz-fav-btn[aria-pressed="true"] .guz-fav-btn-heart svg {
	fill: #fff;
}

.guz-fav-btn-heart {
	display: inline-flex;
	align-items: center;
}

.guz-fav-btn-heart svg {
	transition: fill 150ms ease;
}

.guz-fav-btn-count {
	font-variant-numeric: tabular-nums;
	font-size: 11px;
	opacity: 0.85;
}

.guz-fav-btn-count:empty {
	display: none;
}

/* 押下後の +1 アニメーション(JS で .is-bumping を一瞬付与) */
.guz-fav-btn.is-bumping .guz-fav-btn-heart {
	animation: guz-fav-bump 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes guz-fav-bump {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.3); }
	100% { transform: scale(1); }
}

/* === 配置別バリアント === */
.guz-fav-btn--top {
	margin: 8px 0 4px;
}

.guz-fav-btn--bottom {
	margin: 18px auto 8px;
	padding: 10px 18px;
	font-size: 14px;
}

/* === お気に入り一覧ページ === */
.guz-favorites-wrapper {
	margin: 24px 0;
}

.guz-favorites-loading,
.guz-favorites-empty {
	color: #6b7280;
	text-align: center;
	padding: 32px 12px;
	font-size: 14px;
}

.guz-favorites-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}

.guz-favorites-grid li {
	background: #fff;
	border: 1px solid #e6e8ee;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 150ms ease, transform 150ms ease;
}

.guz-favorites-grid li:hover {
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
	transform: translateY(-2px);
}

.guz-favorites-grid a.guz-fav-card-link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
	height: 100%;
}

.guz-favorites-grid .guz-fav-card-image {
	aspect-ratio: 16 / 9;
	background: #f4f5f7;
	overflow: hidden;
}

.guz-favorites-grid .guz-fav-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.guz-favorites-grid .guz-fav-card-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.guz-favorites-grid .guz-fav-card-title {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 600;
	color: #1f2330;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.guz-favorites-grid .guz-fav-card-meta {
	font-size: 11px;
	color: #9ca3af;
}

.guz-favorites-grid .guz-fav-card-remove {
	margin-top: auto;
	align-self: flex-start;
	padding: 5px 10px;
	border: 1px solid #e6e8ee;
	border-radius: 6px;
	background: #fff;
	color: #6b7280;
	font-size: 11px;
	cursor: pointer;
	transition: background 120ms ease, color 120ms ease;
}

.guz-favorites-grid .guz-fav-card-remove:hover {
	background: #fee2e2;
	color: #b91c1c;
	border-color: #fecaca;
}

.guz-favorites-notice {
	margin-top: 18px;
	color: #9ca3af;
	font-size: 11px;
	line-height: 1.6;
	text-align: center;
}

/* === トースト通知(お気に入りボタン押下時) === */
.guz-fav-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	z-index: 9999;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	max-width: calc(100vw - 32px);
	padding: 12px 20px;
	background: #1f2330;
	color: #fff;
	border-radius: 999px;
	box-shadow: 0 10px 32px rgba(15, 23, 42, 0.25);
	font-size: 13px;
	font-weight: 500;
	opacity: 0;
	transition: opacity 200ms ease, transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
}

.guz-fav-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

.guz-fav-toast-link {
	color: #fbbf24;
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap;
}

.guz-fav-toast-link:hover {
	text-decoration: underline;
}

/* ブランド固定 CTA と被らないよう、CTA 表示時はトーストを上げる */
body.has-guz-brand-cta .guz-fav-toast {
	bottom: calc(var(--guz-brand-cta-h, 60px) + 20px);
}
