/* Sugo - Warhammer Tone Pro colour chart. Light UI: white cards on cool grey. */
.sugo-tpc { --tpc-bg: #f3f5f8; --tpc-card: #fff; --tpc-line: #dfe3ea; --tpc-ink: #1d2433; --tpc-mute: #6b7486; --tpc-acc: #2f6fec; max-width: 1200px; margin: 0 auto; color: var(--tpc-ink); }
.sugo-tpc__notice { background: #eaf1ff; border: 1px solid #c9dafc; border-radius: 8px; padding: 10px 14px; font-weight: 600; margin: 0 0 10px; }
.sugo-tpc__help { color: var(--tpc-mute); margin: 0 0 14px; font-size: .95em; }

.sugo-tpc__tools { background: var(--tpc-bg); padding: 10px; border-radius: 10px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sugo-tpc__search { flex: 1 1 220px; margin: 0 !important; height: 40px; border-radius: 8px !important; border: 1px solid var(--tpc-line) !important; background: #fff !important; box-shadow: none !important; }
.sugo-tpc__fams { display: flex; flex-wrap: wrap; gap: 6px; }
.sugo-tpc__fams button { margin: 0; padding: 0 12px; min-height: 34px; line-height: 34px; border-radius: 17px; border: 1px solid var(--tpc-line); background: #fff; color: var(--tpc-ink); font-size: .85em; font-weight: 600; text-transform: none; letter-spacing: 0; }
.sugo-tpc__fams button.is-on { background: var(--tpc-ink); border-color: var(--tpc-ink); color: #fff; }

.sugo-tpc__grid { background: var(--tpc-bg); border-radius: 12px; padding: 8px; }
.sugo-tpc__row { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: center; background: var(--tpc-card); border: 1px solid var(--tpc-line); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.sugo-tpc__row[hidden] { display: none; }
.sugo-tpc__name { display: flex; flex-direction: column; gap: 6px; }
.sugo-tpc__name strong { font-size: 1em; line-height: 1.2; }
.sugo-tpc__bar { display: block; height: 8px; border-radius: 4px; }
.sugo-tpc__all { align-self: flex-start; margin: 0; padding: 0 10px; min-height: 28px; line-height: 28px; font-size: .78em; border-radius: 14px; border: 1px solid var(--tpc-line); background: #fff; color: var(--tpc-ink); text-transform: none; letter-spacing: 0; }

.sugo-tpc__tones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sugo-tpc__row--med .sugo-tpc__tones { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 60%; }
.sugo-tpc__cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sugo-tpc__tone { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; border-radius: 9px; border: 2px solid transparent; background: #fff; overflow: hidden; box-shadow: 0 0 0 1px var(--tpc-line); }
.sugo-tpc__tone:focus-visible { outline: 3px solid var(--tpc-acc); outline-offset: 2px; }
.sugo-tpc__chip { position: relative; display: flex; align-items: center; justify-content: center; height: 54px; background: var(--sw); }
.sugo-tpc__num { font-weight: 700; font-size: 1.05em; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); text-align: center; line-height: 1.1; padding: 0 4px; }
.sugo-tpc__cell.is-light .sugo-tpc__num { color: #1d2433; text-shadow: none; }
.sugo-tpc__cell--med .sugo-tpc__num { font-size: .9em; }
.sugo-tpc__meta { display: flex; flex-direction: column; align-items: center; padding: 4px 2px 5px; font-size: .78em; line-height: 1.25; }
.sugo-tpc__price { font-weight: 700; min-height: 1.25em; }
.sugo-tpc__price del { color: var(--tpc-mute); font-weight: 400; margin-right: 2px; }
.sugo-tpc__code { color: var(--tpc-mute); }

.sugo-tpc__cell.is-sel .sugo-tpc__tone { border-color: var(--tpc-acc); box-shadow: 0 0 0 2px var(--tpc-acc); }
.sugo-tpc__cell.is-sel .sugo-tpc__chip::after { content: "\2713"; position: absolute; top: 4px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--tpc-acc); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
.sugo-tpc__cell.is-na .sugo-tpc__tone { cursor: default; }
.sugo-tpc__cell.is-na .sugo-tpc__chip { opacity: .45; }
.sugo-tpc__cell.is-na .sugo-tpc__price { color: var(--tpc-mute); font-weight: 600; }
.sugo-tpc__cell.is-loading .sugo-tpc__price::before { content: "\2026"; color: var(--tpc-mute); }

.sugo-tpc__step { display: flex; align-items: center; justify-content: space-between; background: #eef3ff; border-radius: 8px; }
.sugo-tpc__step[hidden] { display: none; }
.sugo-tpc__step button { margin: 0; min-height: 30px; width: 32px; padding: 0; line-height: 30px; font-size: 1.1em; font-weight: 700; background: transparent; color: var(--tpc-acc); border: 0; }
.sugo-tpc__step button:disabled { opacity: .3; }
.sugo-tpc__n { font-weight: 700; font-size: .9em; }

.sugo-tpc__empty { text-align: center; color: var(--tpc-mute); padding: 20px; margin: 0; }

.sugo-tpc__bar-bottom { position: sticky; bottom: 0; padding-right: 150px !important; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--tpc-line); border-radius: 12px; box-shadow: 0 -4px 18px rgba(29,36,51,.12); padding: 10px 12px; margin-top: 10px; }
.sugo-tpc__bar-bottom[hidden] { display: none; }
.sugo-tpc__sum { flex: 1 1 auto; font-weight: 700; }
.sugo-tpc__total { color: var(--tpc-acc); margin-left: 6px; }
.sugo-tpc__clear { margin: 0; background: transparent; color: var(--tpc-mute); border: 0; text-transform: none; letter-spacing: 0; min-height: 40px; }
.sugo-tpc__add { margin: 0 !important; min-height: 42px; border-radius: 8px; }
.sugo-tpc__msg { margin-top: 10px; min-height: 1em; font-weight: 600; }
.sugo-tpc__msg.is-bad { color: #b42318; }
.sugo-tpc-link { margin: 6px 0 12px; font-weight: 600; }

@media (max-width: 849px) {
	.sugo-tpc__row { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
	.sugo-tpc__name { flex-direction: row; align-items: center; flex-wrap: wrap; }
	.sugo-tpc__name strong { flex: 1 1 auto; }
	.sugo-tpc__bar { order: 3; width: 100%; height: 6px; }
	.sugo-tpc__tones { gap: 5px; }
	.sugo-tpc__row--med .sugo-tpc__tones { max-width: none; }
	.sugo-tpc__chip { height: 44px; }
	.sugo-tpc__meta { font-size: .7em; }
	.sugo-tpc__code { display: none; }
	.sugo-tpc__price del { display: none; }
	.sugo-tpc__step button { width: 24px; }
	.sugo-tpc__tools { padding: 8px; }
	.sugo-tpc__fams { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
	.sugo-tpc__fams button { flex: 0 0 auto; }
	.sugo-tpc__bar-bottom { bottom: 64px; margin: 10px -4px 0; padding-right: 12px !important; }
	.sugo-tpc__add { flex: 1 1 100%; }
}

/* pop-up message above the cart bar */
.sugo-tpc__toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 99999; width: min(560px, calc(100vw - 24px)); box-sizing: border-box; background: #fff; color: #1d2433; border: 2px solid #0e0e0e; box-shadow: 4px 4px 0 #0e0e0e; padding: 14px 40px 14px 16px; font-size: .95em; line-height: 1.45; }
.sugo-tpc__toast[hidden] { display: none; }
.sugo-tpc__toast.is-bad { border-color: #b42318; box-shadow: 4px 4px 0 #b42318; }
.sugo-tpc__x { position: absolute; top: 6px; right: 8px; margin: 0; padding: 0 6px; min-height: 0; background: transparent; border: 0; font-size: 22px; line-height: 1; color: #6b7486; }
.sugo-tpc__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sugo-tpc__acts a, .sugo-tpc__acts button { margin: 0; padding: 0 12px; min-height: 36px; line-height: 34px; font-size: .85em; font-weight: 700; border: 2px solid #0e0e0e; text-transform: none; letter-spacing: 0; text-decoration: none !important; }
.sugo-tpc__btn2 { background: #fff; color: #0e0e0e !important; }
.sugo-tpc__replace { background: #ff3b1f; color: #fff; }

/* mobile: keep everything off the screen edges */
@media (max-width: 849px) {
	.sugo-tpc, .tpc-b, .tpc-c { margin-left: 10px !important; margin-right: 10px !important; }
	.sugo-tpc__help { padding: 0 2px; }
	.sugo-tpc__toast { bottom: 150px; }
}
