/* TM Kaubad – kohakaardi, lauanumbri ja lauasildi kalkulaator. Täiendab calculator.css-i. */
@font-face { font-family: "TMK Patrick Hand SC"; src: url("../fonts/patrick-hand-sc.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "TMK Bowlby One SC"; src: url("../fonts/bowlby-one-sc.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

.tmk-sign .tmk-calc__fonts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tmk-sign .tmk-font { min-height: 4.75rem; }
.tmk-sign .tmk-font__name { font-size: 1.6rem; }
.tmk-sign .tmk-calc__heights { grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); }
.tmk-sign .tmk-height__why { display: block; }
.tmk-sign .tmk-height:has(input:disabled) { cursor: not-allowed; }
.tmk-sign .tmk-height:has(input:disabled) .tmk-height__cm { text-decoration: line-through; }
.tmk-sign__style { font-size: 1.05rem !important; }

/* Aluse kujundus (1.10.0) */
.tmk-sign__bases { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr)); gap: .5rem; }
.tmk-sign__base { align-items: center; text-align: center; gap: .35rem; padding-top: .7rem; padding-bottom: .6rem; }
.tmk-sign__base-icon { width: 100%; max-width: 4.25rem; height: auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--c-ink); }
.tmk-sign__base-name { font-size: .875rem; font-weight: 600; }

.tmk-sign__names { resize: vertical; min-height: 7.5rem; line-height: 1.5; font-size: 1.125rem; }
.tmk-sign__qty { max-width: 8rem; }
.tmk-sign__label { display: block; font-size: .875rem; font-weight: 600; margin: .9rem 0 .4rem; }
.tmk-sign__label:first-of-type { margin-top: 0; }
.tmk-sign__sub { margin-top: 1rem; }

/* Nimekiri eelvaate jaoks */
.tmk-sign__list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.tmk-sign__list:empty { display: none; }
.tmk-sign__list .tmk-chip { padding: .35rem .8rem; }
.tmk-chip.is-bad { box-shadow: inset 0 0 0 1.5px var(--c-error); color: var(--c-error); }
.tmk-chip.is-active.is-bad { background: var(--c-error); color: #fff; }

/* Valikunupud (raadionupud kiibina) */
.tmk-sign__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.tmk-sign__opt { position: relative; display: inline-flex; align-items: center; }
.tmk-sign__opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tmk-sign__opt:has(input:checked) { background: var(--c-ink); color: #fff; box-shadow: none; }
.tmk-sign__opt:has(input:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.tmk-sign__opt.is-disabled, .tmk-sign__opt:has(input:disabled) { background: transparent; color: var(--c-muted); opacity: .55; text-decoration: line-through; cursor: not-allowed; }
.tmk-sign__opt:has(input:disabled) input { cursor: not-allowed; }
.tmk-sign__why { margin: .6rem 0 0; font-size: .875rem; color: #7A4A12; }
.tmk-sign__why[hidden] { display: none; }

/* 3D-eelvaade */
.tmk-sign__preview { padding: 0; }
.tmk-sign__stage {
	position: relative;
	aspect-ratio: 4 / 3;
	touch-action: pan-y;
	cursor: grab;
	background:
		radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .55), transparent 60%),
		linear-gradient(180deg, transparent 55%, rgba(22, 24, 23, .05));
}
.tmk-sign__stage:active { cursor: grabbing; }
.tmk-sign__canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.tmk-sign__loading {
	position: absolute; inset: 0; display: grid; place-items: center;
	font-size: .875rem; color: var(--c-muted); letter-spacing: .02em;
}
.tmk-sign__stage.is-ready .tmk-sign__loading { display: none; }
.tmk-sign__tools { position: absolute; top: .75rem; right: .75rem; display: flex; gap: .4rem; z-index: 2; }
.tmk-sign__tools .tmk-chip { background: rgba(255, 255, 255, .9); font-size: .8125rem; padding: .35rem .75rem; }
.tmk-sign__tools .tmk-chip[aria-pressed="true"] { background: var(--c-ink); color: #fff; }
.tmk-sign__dims { margin: 0; padding: .6rem 1rem 0; font-size: .875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.tmk-sign__dims:empty { display: none; }
.tmk-sign__hint { margin: 0; padding: .25rem 1rem .8rem; font-size: .75rem; color: var(--c-muted); }

/* Eritellimus */
.tmk-sign__ask {
	display: grid;
	gap: .3rem;
	margin: .5rem 0 0;
	padding: 1rem 1.15rem;
	border-radius: 10px;
	background: var(--wp--preset--color--sein, #DCE1D8);
	color: var(--wp--preset--color--sammal, #2F3B33);
	font-size: .9375rem;
}
.tmk-sign__ask a { justify-self: start; font-weight: 600; color: inherit; text-underline-offset: .2em; }

/* KKK */
.tmk-sign-faq { max-width: 860px; margin: var(--wp--preset--spacing--60, 4rem) auto 0; }
.tmk-sign-faq h2 { font-family: var(--wp--preset--font-family--kuva, inherit); margin: 0 0 1rem; }
.tmk-sign-faq details { border-bottom: 1px solid var(--wp--preset--color--joon, #C9CFC7); padding: .9rem 0; }
.tmk-sign-faq summary { cursor: pointer; font-weight: 600; font-size: 1.0625rem; list-style-position: outside; }
.tmk-sign-faq details p { margin: .6rem 0 0; color: var(--wp--preset--color--grafiit, #4A504C); }
.tmk-sign-faq__more { margin-top: 1.25rem; }
.tmk-sign-faq__more a { font-weight: 600; color: inherit; text-underline-offset: .2em; }

@media (max-width: 900px) {
	.tmk-sign__stage { aspect-ratio: 16 / 10; }
	.tmk-sign .tmk-calc__preview { position: relative; top: auto; }
}
@media (max-width: 420px) {
	.tmk-sign .tmk-calc__fonts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tmk-sign .tmk-font__name { font-size: 1.3rem; }
	.tmk-sign__tools { top: .5rem; right: .5rem; }
}

/* Lauasildi suurus S / M / L (1.8.0): mõõdud väiksemalt tähe all */
.tmk-sign .tmk-sign__size-mm { display: block; margin-top: .1rem; font-family: var(--wp--preset--font-family--tekst, inherit); font-size: .8125rem; font-weight: 500; color: var(--c-muted); letter-spacing: 0; }
.tmk-sign .tmk-calc__heights.tmk-sign__sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tmk-sign .tmk-sign__size-mm { white-space: nowrap; }
@media (max-width: 480px) { .tmk-sign .tmk-sign__sizes .tmk-height { padding-inline: .6rem; } .tmk-sign .tmk-sign__size-mm { font-size: .75rem; } }
