/* TrivalRO Cash Shop: favorites heart, My Favorites tab, Recommended Sets */
.store-item-card .store-item-image { position: relative; }

.store-fav-toggle,
.store-set-toggle {
	position: absolute;
	top: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 2px solid #d6e9f7;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: #9db8cc;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(40, 110, 170, 0.15);
	transition: transform .15s ease, color .15s ease, border-color .15s ease, background .15s ease;
}
.store-fav-toggle { right: 8px; }
.store-set-toggle { left: 8px; }
.store-fav-toggle svg path { fill: none; stroke: currentColor; stroke-width: 2; }
.store-set-toggle svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.store-fav-toggle:hover { color: #ff5c8a; border-color: #ffc2d3; transform: scale(1.08); }
.store-set-toggle:hover { color: #f5a623; border-color: #ffe0a6; transform: scale(1.08); }
.store-fav-toggle.is-fav { color: #ff3d74; border-color: #ffb3c8; background: #fff0f5; }
.store-fav-toggle.is-fav svg path { fill: currentColor; }
.store-fav-toggle.is-pop { animation: trvFavPop .3s ease; }
.store-fav-toggle:focus-visible,
.store-set-toggle:focus-visible { outline: 3px solid #3aa0f0; outline-offset: 2px; }
@keyframes trvFavPop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

.store-category--favorites svg { color: #ff3d74; vertical-align: -2px; }
.store-category--sets svg { color: #f5a623; vertical-align: -2px; }

/* Recommended Sets panel */
.store-sets-panel { margin-top: 14px; }
.store-sets-head,
.store-sets-anchor {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	margin-bottom: 12px;
	border: 2px solid #d6e9f7;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.92);
}
.store-sets-head strong { display: block; font-family: 'Grobold', 'Arial Black', sans-serif; color: #2b6c9e; font-size: 16px; }
.store-sets-head small { display: block; color: #6c8aa1; margin-top: 3px; }
.store-sets-anchor { background: #fff8e8; border-color: #ffe0a6; color: #7a5a1c; }
.store-sets-anchor[hidden] { display: none; }

.store-sets-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 14px;
}
.store-set-card {
	display: flex;
	flex-direction: column;
	padding: 14px;
	border: 2px solid #d6e9f7;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(40, 110, 170, 0.08);
}
.store-set-title { font-family: 'Grobold', 'Arial Black', sans-serif; color: #2b6c9e; font-size: 13px; margin-bottom: 10px; }
.store-set-pieces { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; }
.store-set-piece {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px;
	border-radius: 10px;
	background: #f3f9fd;
	text-decoration: none;
	color: inherit;
}
.store-set-piece:hover { background: #e6f3fc; }
.store-set-thumb {
	flex: 0 0 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: #fff;
	color: #8eb8d4;
}
.store-set-thumb img { max-width: 40px; max-height: 40px; image-rendering: pixelated; }
.store-set-meta { display: flex; flex-direction: column; min-width: 0; }
.store-set-meta small { font-size: 10px; text-transform: uppercase; color: #8aa6bb; letter-spacing: .04em; }
.store-set-meta strong { font-size: 13px; color: #24557c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-set-meta em { font-style: normal; font-size: 11px; color: #3a8fd0; }
.store-set-footer { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.store-set-footer > span { color: #6c8aa1; font-size: 12px; }
.store-set-footer > span strong { color: #2b8be0; font-size: 15px; }
.store-set-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.store-set-actions .store-button { flex: 1; }

@media (max-width: 520px) {
	.store-sets-list { grid-template-columns: 1fr; }
	.store-fav-toggle, .store-set-toggle { width: 38px; height: 38px; }
}

/* Sets tab: really hide the item grid and give the looks breathing room */
.store-grid[hidden],
.store-sets-panel[hidden] { display: none !important; }
.store-sets-panel { margin-bottom: 36px; }
.store-sets-list { gap: 20px; padding-bottom: 12px; }
.store-set-card { margin-bottom: 4px; }

/* Set cards: long item names wrap inside the card instead of overflowing */
.store-set-card { min-width: 0; overflow: hidden; }
.store-set-pieces, .store-set-pieces li { min-width: 0; }
.store-set-piece { min-width: 0; width: 100%; box-sizing: border-box; }
.store-set-meta { flex: 1 1 auto; min-width: 0; }
.store-set-meta strong {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: break-word;
	line-height: 1.25;
}
.store-set-title { overflow-wrap: anywhere; }

/* ===== Calmer Recommended Sets layout (v4) ===== */
.store-live-results[hidden] { display: none !important; }

.store-sets-head {
	padding: 10px 4px 14px;
	margin-bottom: 14px;
	border: 0;
	border-bottom: 1px solid rgba(43, 108, 158, 0.15);
	border-radius: 0;
	background: transparent;
}
.store-sets-head strong { font-size: 18px; }
.store-sets-head small { font-size: 12px; max-width: 620px; }
.store-sets-head .store-button { min-height: 34px; padding: 7px 14px 6px; font-size: 10px; }

.store-sets-anchor {
	padding: 10px 14px;
	border-width: 1px;
	border-radius: 12px;
}

.store-sets-list {
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 18px;
	align-items: stretch;
}

.store-set-card {
	padding: 16px;
	border: 1px solid rgba(43, 108, 158, 0.14);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 2px 10px rgba(30, 80, 130, 0.06);
	transition: box-shadow .2s ease, transform .2s ease;
}
.store-set-card:hover { box-shadow: 0 6px 18px rgba(30, 80, 130, 0.12); transform: translateY(-2px); }

.store-set-title {
	font-size: 13px;
	line-height: 1.3;
	margin-bottom: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	overflow-wrap: normal;
}

.store-set-pieces { gap: 6px; align-content: start; }
.store-set-piece { padding: 6px 8px; border-radius: 10px; background: #f5f9fc; }
.store-set-thumb { flex-basis: 40px; height: 40px; border: 1px solid #e3eef6; }
.store-set-meta small { font-size: 9px; }
.store-set-meta strong { font-size: 13px; font-weight: 700; }
.store-set-meta em { font-size: 11px; }

.store-set-footer {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed rgba(43, 108, 158, 0.18);
	gap: 10px;
}
.store-set-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.store-set-actions .store-button {
	min-height: 36px;
	padding: 8px 10px 7px;
	font-size: 10px;
	line-height: 1.15;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin: 0;
}
.store-set-actions .store-set-preview { grid-column: 1 / -1; }
.store-set-actions [data-set-cart] { grid-column: 1 / -1; }

@media (min-width: 900px) {
	.store-set-actions { grid-template-columns: 1fr 1fr; }
	.store-set-actions .store-set-preview { grid-column: auto; }
	.store-set-actions [data-set-fav] { grid-column: auto; }
}

/* Set buttons (v5): mobile = 3 full-width rows; PC = View + Favorite side by side, Cart below */
.store-set-actions { grid-template-columns: 1fr; }
.store-set-actions .store-button { width: 100%; grid-column: 1 / -1; }
@media (min-width: 900px) {
	.store-set-actions { grid-template-columns: 1fr 1fr; }
	.store-set-actions .store-set-preview,
	.store-set-actions [data-set-fav] { grid-column: auto; }
	.store-set-actions [data-set-fav]:only-child,
	.store-set-actions [data-set-fav]:first-child:nth-last-child(2) { grid-column: 1 / -1; }
	.store-set-actions [data-set-cart] { grid-column: 1 / -1; }
}
/* Keep every card's footer pinned to the bottom so shuffled cards line up */
.store-set-card { height: 100%; box-sizing: border-box; }
.store-set-pieces { flex: 1 1 auto; }
.store-set-footer { margin-top: auto; }

/* ===== Recommended Sets v6: themes, tags, lock & swap ===== */
.store-theme-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.store-theme-chip {
	display: inline-flex; align-items: center; gap: 5px;
	min-height: 32px; padding: 5px 12px;
	border: 1px solid #d6e9f7; border-radius: 999px;
	background: #fff; color: #2b6c9e;
	font: 700 12px/1 Arial, sans-serif; cursor: pointer;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.store-theme-chip span { font-size: 10px; color: #8aa6bb; background: #eef5fb; border-radius: 999px; padding: 2px 6px; }
.store-theme-chip:hover { border-color: #9cc9ec; transform: translateY(-1px); }
.store-theme-chip.is-active { background: linear-gradient(180deg, #4fb3f6, #2a8fe0); border-color: #2a8fe0; color: #fff; }
.store-theme-chip.is-active span { background: rgba(255,255,255,.25); color: #fff; }
.store-theme-chip:focus-visible { outline: 3px solid #3aa0f0; outline-offset: 2px; }
.store-sets-tip { margin: 0 0 14px; font-size: 12px; color: #6c8aa1; }
.store-sets-tip b { color: #2b6c9e; }

.store-set-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.store-set-top .store-set-title { flex: 1; min-width: 0; margin-bottom: 0; }
.store-set-reroll-all {
	flex: 0 0 30px; width: 30px; height: 30px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid #d6e9f7; border-radius: 50%; background: #fff; color: #2b8be0; cursor: pointer;
	transition: transform .3s ease, background .15s ease;
}
.store-set-reroll-all:hover { background: #eef7fe; transform: rotate(180deg); }

.store-set-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.store-set-tag { font: 700 10px/1 Arial, sans-serif; padding: 4px 8px; border-radius: 999px; background: #eef5fb; color: #2b6c9e; }
.store-set-tag--match { background: #e7f8ee; color: #1e8a4c; }
.store-set-tag--fav { background: #fff0f5; color: #e0336a; }
.store-set-tag--angelic { background: #f3f6ff; color: #5a6fc0; }
.store-set-tag--dark { background: #ece9f3; color: #4a3d6b; }
.store-set-tag--frost { background: #e8f5ff; color: #1f7cc4; }
.store-set-tag--crimson { background: #fff0ec; color: #d0452a; }
.store-set-tag--cute { background: #fff0f7; color: #d04c8c; }
.store-set-tag--royal { background: #fff7e0; color: #b07d12; }
.store-set-tag--nature { background: #ecf8ea; color: #3f8a33; }

.store-set-row { display: flex; align-items: stretch; gap: 6px; border-radius: 10px; transition: box-shadow .15s ease; }
.store-set-row .store-set-piece { flex: 1 1 auto; }
.store-set-row.is-locked .store-set-piece { background: #fff8e8; box-shadow: inset 0 0 0 1px #ffd98a; }
.store-set-piece-tools { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.store-set-tool {
	width: 30px; height: 30px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid #e0edf7; border-radius: 8px; background: #fff; color: #7c9ab0; cursor: pointer;
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.store-set-tool:hover { color: #2b8be0; border-color: #b9dbf5; background: #f3f9fe; }
.store-set-tool--lock[aria-pressed="true"] { color: #c98a00; border-color: #ffd98a; background: #fff8e8; }
.store-set-tool:focus-visible, .store-set-reroll-all:focus-visible { outline: 3px solid #3aa0f0; outline-offset: 1px; }

.store-sets-more { display: flex; justify-content: center; margin-top: 18px; }
.store-sets-more[hidden] { display: none; }
.store-sets-more .store-button { min-width: 180px; }

.store-set-card.is-dealt { animation: trvDeal .38s ease both; }
@keyframes trvDeal { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .store-set-card.is-dealt { animation: none; } .store-set-reroll-all:hover { transform: none; } }

@media (max-width: 520px) {
	.store-theme-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.store-theme-bar::-webkit-scrollbar { display: none; }
	.store-theme-chip { flex: 0 0 auto; }
	.store-set-tool { width: 34px; height: 34px; }
}

/* Tip readable over the background photo */
.store-sets-tip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 4px rgba(30, 80, 130, 0.08); }
