/* Nova Sloga - block calculator ([ns_block_calculator])
 * Matches the site: square corners, thin #666 field borders, red #b22d18 buttons, Roboto Condensed headings. */

.ns-calc {
	--ns-red: #b22d18;
	--ns-red-dark: #8e2312;
	--ns-red-tint: rgba(178, 45, 24, .06);
	--ns-ink: #222;
	--ns-muted: #666;
	--ns-line: #d6d6d6;
	--ns-field: #666;
	--ns-panel: #f4f4f4;
	--ns-head: "Roboto Condensed", sans-serif;
	--ns-body: Raleway, sans-serif;
	max-width: 1140px;
	margin: 0 auto;
	color: var(--ns-ink);
	text-align: left;
	line-height: 1.45;
	font-variant-numeric: lining-nums;   /* Raleway defaults to old-style figures */
}
.ns-calc *,
.ns-calc *::before,
.ns-calc *::after { box-sizing: border-box; }
.ns-calc [hidden] { display: none !important; }
.ns-calc svg { flex: none; }
.ns-calc button { font-family: inherit; line-height: inherit; }   /* same look with or without Bootstrap's reset */
.ns-calc label { margin-bottom: 0; }
.ns-calc button:focus { outline: 0; }                               /* Bootstrap's outline; keyboard focus below */
.ns-calc button:focus-visible,
.ns-calc a:focus-visible,
.ns-calc input[type="radio"]:focus-visible + span { outline: 2px solid var(--ns-red); outline-offset: 2px; }

/* ---------- steps ---------- */
.ns-calc-step + .ns-calc-step { margin-top: 28px; }
.ns-calc .ns-calc-step-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	font: 700 18px/1.2 var(--ns-head);
	text-transform: uppercase;
	color: var(--ns-ink);
}
.ns-calc-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: var(--ns-red);
	color: #fff;
	font-size: 15px;
}

/* ---------- 1. block picker ---------- */
.ns-calc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin-bottom: 14px;
}
.ns-calc .ns-calc-tab {
	margin: 0 -1px 0 0;                 /* joined buttons, shared borders */
	padding: 13px 22px;
	border: 1px solid var(--ns-field);
	border-radius: 0;
	background: #fff;
	color: var(--ns-ink);
	font: 600 15px/1 var(--ns-head);
	letter-spacing: -.2px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.ns-calc .ns-calc-tab:hover { color: var(--ns-red); }
.ns-calc .ns-calc-tab[aria-selected="true"] {
	position: relative;
	z-index: 1;
	border-color: var(--ns-red);
	background: var(--ns-red);
	color: #fff;
}

.ns-calc-blocks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 8px;
}
.ns-calc .ns-calc-block {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 6px 6px 10px;
	border: 1px solid var(--ns-line);
	border-radius: 0;
	background: #fff;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.ns-calc .ns-calc-block:hover { border-color: #999; }
.ns-calc .ns-calc-block input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.ns-calc .ns-calc-block:focus-within { outline: 2px solid var(--ns-red); outline-offset: 2px; }
.ns-calc .ns-calc-block.is-selected { border-color: var(--ns-red); box-shadow: inset 0 0 0 1px var(--ns-red); }
.ns-calc .ns-calc-block.is-selected::after {          /* square check tag in the corner */
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 22px;
	height: 22px;
	background: var(--ns-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='square'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.ns-calc-block-img {
	display: block;
	width: 72px;
	height: 72px;
}
.ns-calc .ns-calc-block-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.ns-calc-block-name {                 /* short name: "12/25/33" (the tab says which family) */
	margin-top: 0;
	font: 700 17px/1.15 var(--ns-head);
	color: var(--ns-ink);
}
.ns-calc .ns-calc-block.is-selected .ns-calc-block-name { color: var(--ns-red); }
.ns-calc .ns-calc-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ns-calc-variants {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-top: 14px;
}
.ns-calc-variants-label { font: 400 15px/1 var(--ns-head); color: var(--ns-muted); }
.ns-calc-variant-list { display: flex; flex-wrap: wrap; gap: 0; }
.ns-calc .ns-calc-variant {
	margin: 0 -1px 0 0;
	padding: 9px 16px;
	border: 1px solid var(--ns-field);
	border-radius: 0;
	background: #fff;
	color: var(--ns-ink);
	font: 600 15px/1 var(--ns-head);
	cursor: pointer;
}
.ns-calc .ns-calc-variant:hover { color: var(--ns-red); }
.ns-calc .ns-calc-variant[aria-pressed="true"] { position: relative; z-index: 1; border-color: var(--ns-red); background: var(--ns-red); color: #fff; }

/* ---------- layout: inputs | result ---------- */
.ns-calc-main {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 40px;
	align-items: start;
	margin-top: 34px;
}

/* ---------- 2. fields (same as the contact form fields) ---------- */
.ns-calc-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.ns-calc .ns-calc-field { display: block; margin: 0; }
.ns-calc-field-label {
	display: block;
	margin-bottom: 6px;
	font: 400 15px/1.2 var(--ns-head);
	color: var(--ns-muted);
}
.ns-calc-input {
	display: flex;
	align-items: center;
	border: 1px solid var(--ns-field);
	border-radius: 0;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.ns-calc-input:focus-within { border-color: var(--ns-red); box-shadow: inset 0 0 0 1px var(--ns-red); }
.ns-calc-input.is-invalid { border-color: #d9381e; background: #fff6f4; }
.ns-calc .ns-calc-input input[type="text"] {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 0 4px 0 18px;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ns-ink);
	font: 500 19px/1 var(--ns-head);
}
.ns-calc-unit {
	padding: 0 16px 0 4px;
	color: var(--ns-muted);
	font: 400 15px/1 var(--ns-head);
}
.ns-calc-hint {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--ns-muted);
}
.ns-calc .ns-calc-hint-top { margin: -6px 0 12px; }

/* ---------- 3. doors / windows ---------- */
.ns-calc .ns-calc-openings {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}
.ns-calc .ns-calc-openings:empty { margin: 0; }
.ns-calc .ns-calc-opening {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	padding: 7px 8px 7px 14px;
	border: 1px solid var(--ns-line);
	background: #fff;
	animation: ns-calc-in .18s ease-out;
}
.ns-calc .ns-calc-opening::before { display: none; }   /* theme list bullets */
@keyframes ns-calc-in { from { opacity: 0; transform: translateY(-4px); } }
.ns-calc-op-icon svg {
	display: block;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: var(--ns-muted);
	stroke-width: 1.6;
	stroke-linecap: square;
}
.ns-calc-op-name { flex: 1 1 auto; font: 500 16px/1.2 var(--ns-head); }
.ns-calc-op-size { display: flex; align-items: center; gap: 6px; }
.ns-calc-input-sm { width: 86px; }
.ns-calc .ns-calc-input-sm input[type="text"] { height: 36px; padding: 0 2px 0 10px; font-size: 17px; }
.ns-calc-input-sm .ns-calc-unit { padding: 0 9px 0 2px; font-size: 14px; }
.ns-calc-times { color: var(--ns-muted); }
.ns-calc .ns-calc-op-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}
.ns-calc .ns-calc-op-remove svg { width: 18px; height: 18px; fill: none; stroke: var(--ns-muted); stroke-width: 2; }
.ns-calc .ns-calc-op-remove:hover { background: var(--ns-red-tint); }
.ns-calc .ns-calc-op-remove:hover svg { stroke: var(--ns-red); }

.ns-calc-add { display: flex; flex-wrap: wrap; gap: 10px; }
.ns-calc .ns-calc-add-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 11px 18px 11px 14px;
	border: 1px dashed #999;
	border-radius: 0;
	background: #fff;
	color: var(--ns-ink);
	font: 600 15px/1 var(--ns-head);
	text-transform: uppercase;
	letter-spacing: -.2px;
	cursor: pointer;
	transition: border-color .15s, color .15s;
}
.ns-calc .ns-calc-add-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.ns-calc .ns-calc-add-btn:hover { border-color: var(--ns-red); border-style: solid; color: var(--ns-red); }

/* ---------- 4. reserve ---------- */
.ns-calc-seg { display: inline-flex; }
.ns-calc .ns-calc-seg-item { position: relative; margin: 0 -1px 0 0; cursor: pointer; }
.ns-calc .ns-calc-seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.ns-calc-seg-item span {
	display: block;
	min-width: 70px;
	padding: 12px 16px;
	border: 1px solid var(--ns-field);
	background: #fff;
	color: var(--ns-ink);
	font: 600 16px/1 var(--ns-head);
	text-align: center;
	transition: background-color .15s, color .15s;
}
.ns-calc-seg-item:hover span { color: var(--ns-red); }
.ns-calc-seg-item input:checked + span { position: relative; z-index: 1; border-color: var(--ns-red); background: var(--ns-red); color: #fff; }

/* ---------- result ---------- */
.ns-calc-result {
	position: sticky;
	top: 110px;
	padding: 24px 26px 22px;
	border-top: 4px solid var(--ns-red);
	background: var(--ns-panel);
}
.ns-calc-wall {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 150px;
	margin: 0 0 18px;
	transition: opacity .2s;
}
.ns-calc-wall.is-off { opacity: .3; }
.ns-calc-wall svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.ns-calc-dim { fill: #555; font-family: var(--ns-head); font-weight: 700; }

.ns-calc-total {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 12px;
}
.ns-calc-total-num {
	color: var(--ns-red);
	font: 700 56px/1 var(--ns-head);
	font-variant-numeric: tabular-nums;
	letter-spacing: -.01em;
}
.ns-calc-total-unit {
	color: var(--ns-ink);
	font: 700 20px/1 var(--ns-head);
	text-transform: uppercase;
}
.ns-calc .ns-calc-picked {
	margin: 6px 0 16px;
	font: 400 16px/1.3 var(--ns-head);
	color: var(--ns-muted);
}
.ns-calc-picked-name { color: var(--ns-ink); font-weight: 700; }

.ns-calc .ns-calc-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 0;
}
.ns-calc-stats > div {
	padding: 12px 16px;
	background: #fff;
}
.ns-calc .ns-calc-stats dt {
	margin: 0 0 3px;
	color: var(--ns-muted);
	font: 400 13px/1.2 var(--ns-head);
	letter-spacing: .03em;
	text-transform: uppercase;
}
.ns-calc .ns-calc-stats dd {
	margin: 0;
	color: var(--ns-ink);
	font: 700 22px/1.2 var(--ns-head);
	font-variant-numeric: tabular-nums;
}
.ns-calc .ns-calc-stats small {
	display: block;
	margin-top: 1px;
	color: var(--ns-muted);
	font: 400 14px/1.3 var(--ns-head);
}
/* weight: "≈ 2,4 t" or "≈ 520 kg"; just "—" when the product has no weight */
.ns-calc-weight-unit-kg,
.ns-calc-weight-wrap.is-kg .ns-calc-weight-unit-t,
.ns-calc-weight-wrap.is-empty .ns-calc-weight-unit-t,
.ns-calc-weight-wrap.is-empty .ns-calc-approx { display: none; }
.ns-calc-weight-wrap.is-kg .ns-calc-weight-unit-kg { display: inline; }

/* buttons: same as the contact form "Испрати" button */
.ns-calc-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}
.ns-calc a.ns-calc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 50px;
	padding: 0 26px;
	border: 1px solid transparent;
	border-radius: 0;
	font: 600 16px/1 var(--ns-head);
	letter-spacing: -.4px;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .15s, border-color .15s, color .15s;
}
.ns-calc a.ns-calc-btn-primary { flex: 1 1 200px; background: var(--ns-red); color: #fff; }
.ns-calc a.ns-calc-btn-primary:hover,
.ns-calc a.ns-calc-btn-primary:focus { background: var(--ns-red-dark); color: #fff; }
.ns-calc a.ns-calc-btn-ghost { flex: 0 1 auto; border-color: var(--ns-field); background: #fff; color: var(--ns-ink); }
.ns-calc a.ns-calc-btn-ghost:hover,
.ns-calc a.ns-calc-btn-ghost:focus { border-color: var(--ns-red); color: var(--ns-red); }
.ns-calc a.ns-calc-btn-ghost svg { width: 17px; height: 17px; fill: currentColor; }
.ns-calc .ns-calc-note {
	margin: 12px 0 0;
	color: var(--ns-muted);
	font-size: 13px;
}
.ns-calc .ns-calc-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- phone: result bar pinned to the bottom ---------- */
button.ns-calc-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
	border: 0;
	border-radius: 0;
	background: var(--ns-red);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, .18);
	color: #fff;
	font: 400 17px/1.2 var(--ns-head);
	text-align: left;
	cursor: pointer;
	animation: ns-calc-up .2s ease-out;
}
.ns-calc-bar strong { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ns-calc-bar-go {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, .7);
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
}
.ns-calc-bar-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
@keyframes ns-calc-up { from { transform: translateY(100%); } }
body.ns-calc-bar-on #eltd-back-to-top { bottom: 72px !important; transition: none; }

/* ---------- tablet / phone ---------- */
@media (max-width: 900px) {
	.ns-calc-main { grid-template-columns: 1fr; gap: 30px; }
	.ns-calc-result { position: static; scroll-margin-top: 16px; }
}
@media (max-width: 767px) {
	/* the homepage column has 75px padding on every side - too much for a phone */
	.ns-calc-col > .vc_column-inner { padding: 40px 15px !important; }

	.ns-calc-step + .ns-calc-step { margin-top: 30px; }
	.ns-calc-blocks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
	.ns-calc .ns-calc-block { padding: 4px 2px 8px; }
	.ns-calc .ns-calc-block.is-selected::after { width: 17px; height: 17px; background-size: 11px; }
	.ns-calc-block-img { width: 54px; height: 54px; }
	.ns-calc-block-name { font-size: 15px; }
	/* category tabs: one row of 3 equal buttons */
	.ns-calc-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
	.ns-calc .ns-calc-tab { padding: 13px 4px; font-size: 13px; line-height: 1.15; }

	/* big, full-width tap targets */
	.ns-calc-add { display: grid; grid-template-columns: 1fr 1fr; }
	.ns-calc .ns-calc-add-btn { justify-content: center; padding: 14px 8px; }
	.ns-calc-seg { display: flex; }
	.ns-calc .ns-calc-seg-item { flex: 1 1 0; }
	.ns-calc-seg-item span { min-width: 0; padding: 15px 4px; }

	.ns-calc-result { padding: 18px 14px; margin: 0 -4px; }
	.ns-calc-wall { min-height: 120px; }
	.ns-calc-total-num { font-size: 48px; }
	.ns-calc .ns-calc-stats dd { font-size: 20px; }
	.ns-calc a.ns-calc-btn-ghost { flex: 1 1 auto; }
}
@media (max-width: 359px) {
	.ns-calc-blocks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
	.ns-calc .ns-calc-opening { flex-wrap: wrap; row-gap: 6px; }
	.ns-calc-op-name { flex: 1 1 calc(100% - 80px); }
	.ns-calc-op-size { order: 3; flex: 1 1 100%; }
	.ns-calc-input-sm { flex: 1 1 0; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.ns-calc *,
	.ns-calc *::before { animation: none !important; transition: none !important; }
}
.ns-calc-bar[hidden],
.ns-calc-bar [hidden] { display: none !important; }
.ns-calc-bar { --ns-red: #b22d18; --ns-head: "Roboto Condensed", sans-serif; }   /* the bar lives in <body>, outside .ns-calc */

/* door/window larger than the wall */
.ns-calc .ns-calc-error {
	margin: -2px 0 12px;
	padding: 9px 12px;
	border-left: 3px solid #d9381e;
	background: #fff6f4;
	color: #b3261e;
	font: 500 15px/1.3 var(--ns-head);
}
