/* Hramar façade scaffold calculator. Everything is scoped under .hramar-calc and uses the theme's own variables. */
.hramar-calc {
	--hc-brd: var(--brdcolor-gray-300, #d9d9d9);
	--hc-soft: var(--bgcolor-gray-100, #f5f5f5);
	--hc-ink: var(--wd-title-color, #242424);
	--hc-accent: var(--wd-primary-color, #1c61e7);
	--hc-radius: var(--wd-brd-radius, 12px);
	margin: 0 0 30px;
}

.hramar-calc__inputs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 24px;
	padding: 20px;
	background: var(--hc-soft);
	border-radius: var(--hc-radius);
}

.hramar-calc__field { margin: 0; padding: 0; border: 0; min-width: 0; }

.hramar-calc__field > label,
.hramar-calc__field > legend,
.hramar-calc__legend {
	display: block;
	width: auto;
	margin: 0 0 6px;
	padding: 0;
	border: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--hc-ink);
}

.hramar-calc__field input[type="text"] {
	width: 100%;
	max-width: 220px;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
}

.hramar-calc__field input[aria-invalid="true"] { border-color: #c0392b; }

.hramar-calc__hint { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; }

.hramar-calc__choice {
	display: block;
	margin: 0 0 6px;
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
}

.hramar-calc__choice input { margin-right: 6px; }

.hramar-calc__choice span { display: block; margin-left: 24px; font-size: 13px; }

.hramar-calc__error,
.hramar-calc__warn {
	margin: 16px 0 0;
	padding: 12px 16px;
	border-left: 4px solid #c0392b;
	background: #fdf1ef;
	color: #7a1f14;
	border-radius: 4px;
}

.hramar-calc__warn { border-left-color: #b9770e; background: #fdf6e7; color: #6b4406; }

.hramar-calc [hidden] { display: none !important; }

.hramar-calc__result { margin-top: 28px; }

.hramar-calc__title { margin: 0 0 14px; font-size: 22px; }

.hramar-calc__summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
	margin: 0 0 8px;
}

.hramar-calc__stat {
	padding: 14px 16px;
	border: 1px solid var(--hc-brd);
	border-radius: var(--hc-radius);
}

.hramar-calc__stat dt { margin: 0 0 2px; font-size: 13px; font-weight: 400; }

.hramar-calc__stat dd { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--hc-ink); }

.hramar-calc__stat dd.hramar-calc__statnote { margin-top: 4px; font-size: 13px; font-weight: 400; line-height: 1.4; color: inherit; }

.hramar-calc__scheme { margin: 20px 0; }

.hramar-calc__scheme svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 340px;
	background: #fff;
	border: 1px solid var(--hc-brd);
	border-radius: var(--hc-radius);
}

.hramar-calc__scheme svg * { vector-effect: non-scaling-stroke; }

.hramar-calc .hc-facade { fill: #ececec; stroke: #9a9a9a; stroke-width: 1; stroke-dasharray: 5 4; }
.hramar-calc .hc-stair { fill: var(--hc-accent); fill-opacity: 0.14; stroke: none; }
.hramar-calc .hc-frame { stroke: var(--hc-ink); stroke-width: 1.4; }
.hramar-calc .hc-deck { stroke: var(--hc-ink); stroke-width: 1; }
.hramar-calc .hc-rail { stroke: var(--hc-ink); stroke-width: 1; stroke-dasharray: 2 3; }
.hramar-calc .hc-ground { stroke: #6b6b6b; stroke-width: 2; }
.hramar-calc .hc-diag { stroke: #b9770e; stroke-width: 1.4; }
.hramar-calc .hc-anchor { fill: var(--hc-accent); stroke: #fff; stroke-width: 1; }

.hramar-calc__scheme figcaption { margin-top: 8px; font-size: 13px; line-height: 1.6; text-align: left; }

.hramar-calc__key { display: inline-block; margin-right: 14px; white-space: nowrap; }

.hramar-calc__key::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 6px;
	vertical-align: -2px;
	box-sizing: border-box;
}

.hramar-calc__key--facade::before { background: #ececec; border: 1px dashed #9a9a9a; }
.hramar-calc__key--frame::before { height: 0; border-top: 2px solid var(--hc-ink); vertical-align: 4px; }
.hramar-calc__key--stair::before { background: var(--hc-accent); opacity: 0.25; }
.hramar-calc__key--diag::before { height: 0; border-top: 2px solid #b9770e; vertical-align: 4px; transform: rotate(-35deg); }
.hramar-calc__key--anchor::before { width: 10px; height: 10px; border-radius: 50%; background: var(--hc-accent); vertical-align: 0; }

.hramar-calc__tablewrap { overflow-x: auto; }

.hramar-calc__table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; }

.hramar-calc__table th,
.hramar-calc__table td {
	padding: 9px 10px;
	border: 0;
	border-bottom: 1px solid var(--hc-brd);
	text-align: left;
	vertical-align: top;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

.hramar-calc__table thead th { font-size: 13px; font-weight: 600; color: var(--hc-ink); border-bottom-width: 2px; }

.hramar-calc__table tbody th a { color: var(--hc-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.hramar-calc__table .hramar-calc__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.hramar-calc__table tfoot th,
.hramar-calc__table tfoot td { font-size: 17px; font-weight: 700; color: var(--hc-ink); border-bottom: 0; }

.hramar-calc__sku { display: none; font-size: 12px; font-weight: 400; }

.hramar-calc__notes { margin: 18px 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }

.hramar-calc__notes li { margin-bottom: 4px; }

.hramar-calc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.hramar-calc__status { flex: 1 1 100%; margin: 0; min-height: 1.5em; font-size: 14px; }

.hramar-calc__other {
	margin-top: 32px;
	padding: 20px;
	border: 1px solid var(--hc-brd);
	border-radius: var(--hc-radius);
}

.hramar-calc__other p { margin: 0 0 14px; }

@media (max-width: 767px) {
	.hramar-calc__inputs { grid-template-columns: 1fr; padding: 16px; }
	.hramar-calc__field input[type="text"] { max-width: none; }
	.hramar-calc__table { font-size: 14px; }
	.hramar-calc__table .hramar-calc__c-code,
	.hramar-calc__table .hramar-calc__c-unit { display: none; }
	.hramar-calc__table tfoot th { font-size: 15px; }
	.hramar-calc__sku { display: block; }
	.hramar-calc__actions .btn { flex: 1 1 100%; text-align: center; }
}

/* ---------- 0.2.0: the product's choices, square metres, the block on the product page ---------- */

.hramar-calc__inputs { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }


.hramar-calc__choice:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

.hramar-calc__chosen { margin: 14px 0 0; font-size: 14px; line-height: 1.5; }

/* The theme paints every button grey; these are text links inside a sentence. */
.hramar-calc button.hramar-calc__link {
	display: inline;
	width: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	line-height: inherit;
	vertical-align: baseline;
	font: inherit;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.hramar-calc button.hramar-calc__link:hover,
.hramar-calc button.hramar-calc__link:focus { background: none; box-shadow: none; color: var(--hc-accent); }

.hramar-calc button.hramar-calc__link:focus-visible { outline: 2px solid var(--hc-accent); outline-offset: 2px; }

.hramar-calc__warns .hramar-calc__warn { margin: 12px 0 0; }

.hramar-calc__summary .hramar-calc__stat:first-child { border-color: var(--hc-accent); border-width: 2px; }

.hramar-calc__details { margin: 0; border: 1px solid var(--hc-brd); border-radius: var(--hc-radius); }

.hramar-calc__details > summary {
	padding: 14px 16px;
	font-weight: 600;
	color: var(--hc-ink);
	cursor: pointer;
}

.hramar-calc__details > summary span { font-weight: 400; }

.hramar-calc__details[open] > summary { border-bottom: 1px solid var(--hc-brd); }

.hramar-calc__details .hramar-calc__tablewrap { padding: 4px 6px 6px; }

.hramar-calc__how { flex: 1 1 100%; margin: 0; font-size: 13px; line-height: 1.5; }

.hramar-calc-section { margin: 0 0 40px; scroll-margin-top: 90px; }

.hramar-calc-section > .hramar-calc__title { font-size: 24px; }

.hramar-calc__intro { margin: 0 0 16px; }

.hramar-calc--product .hramar-calc__title { font-size: 20px; }

.hramar-calc-jump { margin: 12px 0 0; font-size: 14px; }

.hramar-calc-jump a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* The link buttons look like outlines, so the add button reads as the main action on every page. */
.hramar-calc .hramar-calc__actions .btn,
.hramar-calc .hramar-calc__other .btn { border-radius: var(--btn-accented-brd-radius, 5px); }

.hramar-calc .hramar-calc__go,
.hramar-calc .hramar-calc__other .btn {
	background: transparent;
	color: var(--hc-ink);
	box-shadow: inset 0 0 0 2px var(--btn-accented-bgcolor, #767676);
}

.hramar-calc .hramar-calc__go:hover,
.hramar-calc .hramar-calc__go:focus-visible,
.hramar-calc .hramar-calc__other .btn:hover,
.hramar-calc .hramar-calc__other .btn:focus-visible {
	background: var(--btn-accented-bgcolor-hover, var(--hc-accent));
	color: #fff;
	box-shadow: none;
}

.hramar-calc .hramar-calc__add:disabled { opacity: 0.6; cursor: progress; }


/* ---------- Facade sizes inside the product form (inline.js) ---------- */
.hramar-ic { margin: 4px 0 20px; }
.hramar-ic__sizes { margin: 0; padding: 16px; border: 1px solid var(--hc-brd); border-radius: var(--hc-radius); background: var(--hc-soft); min-width: 0; }
.hramar-ic__sizes > legend { float: left; width: 100%; margin: 0 0 4px; padding: 0; font-size: 15px; font-weight: 600; color: var(--hc-ink); }
.hramar-ic__intro { clear: both; margin: 0 0 12px; font-size: 13px; line-height: 1.4; }
.hramar-ic__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.hramar-ic__field { min-width: 0; }
.hramar-ic__field label { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--hc-ink); }
.hramar-ic__field input[type="text"] { width: 100%; font-size: 17px; font-variant-numeric: tabular-nums; }
.hramar-ic__field input[aria-invalid="true"] { border-color: #c0392b; }
.hramar-ic__field .hramar-calc__hint { font-size: 12px; }
.hramar-ic__choices { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.hramar-ic__choices > legend { margin: 0 0 6px; padding: 0; font-size: 14px; font-weight: 600; color: var(--hc-ink); }
.hramar-ic__check { margin-top: 14px; }
.hramar-ic .hramar-ic__msg { margin: 10px 0 0; }
.hramar-ic .hramar-ic__msg--info { border-left-color: var(--hc-brd); background: var(--hc-soft); color: inherit; }
.hramar-ic__result { margin-top: 12px; }
.hramar-ic__area { margin: 0 0 8px; font-size: 15px; }
.hramar-ic__area strong { font-size: 20px; color: var(--hc-ink); font-variant-numeric: tabular-nums; }
.hramar-ic__note { font-size: 13px; }
.hramar-ic .hramar-calc__warn { margin: 0 0 8px; }
.hramar-ic__scheme { margin: 8px 0 0; }
.hramar-ic__scheme svg { max-height: 240px; }
.hramar-ic__scheme figcaption { font-size: 12px; }
.hramar-ic__more { margin: 10px 0 0; font-size: 13px; }
@media (max-width: 420px) { .hramar-ic__row { grid-template-columns: minmax(0, 1fr); } }
/* Height, length or facade area (30.11.2026): three in a row; on a narrow screen the area goes under the other two. */
.hramar-ic__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hramar-ic__hint { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.hramar-ic__field input.hramar-ic__derived { color: #6b6b6b; font-style: italic; }
@media (max-width: 420px) {
	.hramar-ic__row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hramar-ic__row--3 > .hramar-ic__field:last-child { grid-column: 1 / -1; }
}
/* The scheme of 5342 and 8646: ladders in the stair cells and the sizes (30.11.2026). */
.hramar-calc .hc-ladder { stroke: var(--hc-accent); stroke-width: 2; stroke-linecap: round; }
.hramar-calc .hc-dimline { stroke: #6b6b6b; stroke-width: 1; }
.hramar-calc .hc-dim { fill: var(--hc-ink); font-family: inherit; }
.hramar-calc .hc-dim--top, .hramar-calc .hc-dim--len { font-weight: 700; }

/* Desktop: the result sits under the product pictures (inline.js moves it there at 1025 px and wider). */
.hramar-ic-aside { margin: 24px 0 0; }
.hramar-ic-aside:empty { display: none; }
.hramar-ic-aside .hramar-ic__result { margin: 0; padding: 20px 24px; background: #fff; border: 1px solid var(--hc-brd); border-radius: 16px; }
.hramar-ic-aside .hramar-ic__scheme svg { max-height: 340px; }
