/* Texa Panel Calculator — Texa identity. Prefixed (.tpc / .tpc-) to avoid clashes with WoodMart. */
@font-face { font-family: "tpc-digits"; font-weight: 100 599; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Roboto"), local("Segoe UI"), local("Noto Sans"), local("DejaVu Sans"), local("Liberation Sans"); unicode-range: U+0030-0039, U+002B-002E, U+0025, U+00D7; }
@font-face { font-family: "tpc-digits"; font-weight: 600 900; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica Bold"), local("Roboto Bold"), local("Segoe UI Bold"), local("Noto Sans Bold"), local("DejaVu Sans Bold"), local("Liberation Sans Bold"); unicode-range: U+0030-0039, U+002B-002E, U+0025, U+00D7; }

.tpc {
	--tpc-dark: #1D1C1A;
	--tpc-accent: #A07A4B;
	--tpc-accent-dark: #7E5E37;
	--tpc-soft: #EEE9E3;
	--tpc-error: #B4433A;
	--tpc-radius: 20px;
	--tpc-line: color-mix(in srgb, var(--tpc-soft) 55%, #cfc6ba);
	--tpc-muted: #7A736A;
	--tpc-paper: color-mix(in srgb, var(--tpc-soft) 40%, #fff);
	--tpc-r: calc(var(--tpc-radius) * .7);
	box-sizing: border-box;
	width: 100%;
	flex: 1 1 100%;
	margin: 0 0 18px;
	padding: 24px 26px;
	border: 1px solid var(--tpc-line);
	border-radius: var(--tpc-radius);
	background: #fff;
	color: var(--tpc-dark);
	direction: rtl;
	text-align: right;
	line-height: 1.5;
	container: tpc / inline-size;
}
.tpc *, .tpc *::before, .tpc *::after { box-sizing: border-box; }
.tpc [hidden] { display: none !important; }

.tpc__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.tpc__icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--tpc-r); background: var(--tpc-soft); }
.tpc__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--tpc-accent-dark); stroke-width: 1.7; }
.tpc .tpc__title { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.3; color: var(--tpc-dark); text-transform: none; letter-spacing: 0; font-family: inherit; }
.tpc__desc { margin: 4px 0 0; font-size: 14px; color: var(--tpc-muted); }

.tpc__dims { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.tpc__times { padding-bottom: 14px; font-size: 20px; font-weight: 700; color: var(--tpc-accent); }
.tpc__label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--tpc-dark); }
.tpc__input { display: flex; height: 52px; border: 1.5px solid var(--tpc-line); border-radius: var(--tpc-r); background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.tpc__input:focus-within { border-color: var(--tpc-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tpc-accent) 15%, transparent); }
.tpc .tpc__input input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0 14px; border: 0 !important; border-radius: 0; background: transparent; box-shadow: none !important; font-size: 19px; font-weight: 700; color: var(--tpc-dark); text-align: right; outline: none; }
.tpc .tpc__input input::placeholder { font-size: 15px; font-weight: 500; color: #a39a8e; opacity: 1; }
.tpc__unit { display: grid; place-items: center; padding: 0 14px; background: var(--tpc-soft); color: var(--tpc-accent-dark); font-weight: 700; border-inline-start: 1px solid var(--tpc-line); }
.tpc__error { margin: 10px 0 0; font-size: 13px; font-weight: 500; color: var(--tpc-error); }
.tpc__error::before { content: "⚠ "; }
.tpc__error--stock { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--tpc-error) 8%, #fff); }
.tpc__hint { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--tpc-r); background: var(--tpc-paper); color: var(--tpc-accent-dark); font-size: 13.5px; font-weight: 500; }

.tpc__results { margin-top: 18px; border-top: 1px dashed var(--tpc-line); }
.tpc__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--tpc-line); font-size: 15px; }
.tpc__row > span { color: #57514a; }
.tpc__row b { font-weight: 700; white-space: nowrap; }
.tpc__row--plain { border-bottom: 0; padding-bottom: 0; }
.tpc__pill { padding: 5px 14px; border-radius: 999px; background: var(--tpc-dark); color: #fff !important; font-size: 17px; font-weight: 800 !important; }
.tpc__muted { display: block; margin-top: 2px; font-size: 12px; color: var(--tpc-muted); font-weight: 400; }

.tpc__diagram { padding: 14px 0 4px; }
.tpc__wall { position: relative; width: 100%; max-width: 420px; margin: 0 auto; height: 0; border: 2px solid var(--tpc-dark); border-radius: 6px; background-color: color-mix(in srgb, var(--tpc-accent) 22%, #fff); background-image: repeating-linear-gradient(to left, transparent 0, transparent calc(var(--tpc-step, 4%) - 1px), color-mix(in srgb, var(--tpc-accent-dark) 70%, transparent) calc(var(--tpc-step, 4%) - 1px), color-mix(in srgb, var(--tpc-accent-dark) 70%, transparent) var(--tpc-step, 4%)); overflow: hidden; }
.tpc__cut { position: absolute; top: 0; bottom: 0; left: 0; background: repeating-linear-gradient(45deg, rgba(180, 67, 58, .22) 0 6px, transparent 6px 12px); border-right: 2px dashed var(--tpc-error); }
.tpc__joint { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--tpc-dark); }
.tpc__notes { margin: 10px 0 0; padding: 0; list-style: none; }
.tpc__notes li { position: relative; margin: 0 0 6px; padding-inline-start: 16px; font-size: 13px; color: var(--tpc-muted); }
.tpc__notes li::before { content: ""; position: absolute; top: .6em; inset-inline-start: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--tpc-accent); }

.tpc__install { margin-top: 16px; }
.tpc__locked { margin: 0; padding: 12px 16px; border: 1px solid #f0d58c; border-radius: var(--tpc-r); background: #fdf6e3; color: #8a6514; font-size: 13.5px; font-weight: 700; }
.tpc__select { position: relative; }
.tpc .tpc__select select { width: 100%; height: 50px; margin: 0; padding: 0 16px 0 40px; border: 1.5px solid var(--tpc-line); border-radius: calc(var(--tpc-radius) * .6); background: #fff; color: var(--tpc-dark); font-size: 15px; font-family: inherit; appearance: none; -webkit-appearance: none; background-image: none; }
.tpc .tpc__select select:focus { border-color: var(--tpc-accent); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tpc-accent) 15%, transparent); }
.tpc__select::after { content: ""; position: absolute; left: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: solid var(--tpc-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }

.tpc__total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding: 16px 20px; border-radius: var(--tpc-r); background: var(--tpc-dark); color: #fff; }
.tpc__total > span { font-size: 14px; color: #cbc3b8; }
.tpc__total small { display: block; margin-top: 3px; font-size: 11.5px; color: #9a9186; }
.tpc__total b { font-size: 26px; font-weight: 800; white-space: nowrap; color: #fff; }
.tpc__note { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 12.5px; color: var(--tpc-muted); }
.tpc__note span { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--tpc-accent); }

/* WooCommerce form integration */
form.tpc-form .woocommerce-variation-add-to-cart { flex-wrap: wrap; }
form.tpc-form .woocommerce-variation-add-to-cart > .tpc { order: -1; }
.tpc-row-hidden { display: none !important; }
.tpc-qty { position: relative; }
.tpc-qty.tpc-qty--locked input.qty { pointer-events: none; background: color-mix(in srgb, #EEE9E3 45%, #fff); font-weight: 700; }
.tpc-qty.tpc-qty--locked .plus, .tpc-qty.tpc-qty--locked .minus, .tpc-qty.tpc-qty--locked input[type="button"] { display: none !important; }
.tpc-cart-qty { display: inline-block; line-height: 1.35; text-align: center; }
.tpc-cart-qty small { display: block; font-size: 11px; color: #7A736A; white-space: nowrap; }

@container tpc (max-width: 380px) {
	.tpc__dims { grid-template-columns: 1fr; }
	.tpc__times { display: none; }
	.tpc__total b { font-size: 22px; }
}
@media (max-width: 768px) {
	.tpc { padding: 16px; }
	.tpc .tpc__title { font-size: 18px; }
}

/* Currency symbol (text or SVG) */
.tpc .tpc-money { display: inline-flex; align-items: baseline; white-space: nowrap; unicode-bidi: isolate; }
.tpc-cur svg { height: .85em; width: auto; display: inline-block; vertical-align: -.06em; fill: currentColor; }
.tpc-cur svg * { fill: currentColor; }
