/* The Builders - Kalkulator kosztów budowy
   Autor: Still IT (https://still-it.pl/)
   Kolory dopasuj do zmiennych marki, jeśli motyw Elementora je definiuje. */

.tbc-calculator {
	--tbc-yellow: #FFB500;
	--tbc-text: #ffffff;
	--tbc-text-muted: #aab2c8;
	--tbc-border: #ffffff;
	--tbc-hover-bg: #ffffff;
	--tbc-hover-text: #0e1a3d;
	--tbc-card-selected-bg: #E7ECFB;
	--tbc-card-selected-text: #0e1a3d;

	background: transparent;
	color: var(--tbc-text);
	padding: 0;
	font-family: "Manrope", sans-serif !important;
}

.tbc-field {
	margin-bottom: 24px;
}

.tbc-field label {
	display: block;
	font-size: 16px;
	margin-bottom: 10px;
	color: var(--tbc-text);
}

.tbc-input,
.tbc-select {
	width: 100%;
	padding: 16px !important;
	border-radius: 8px !important;
	border: 1px solid var(--tbc-border) !important;
	border-style: solid !important;
	background: #ffffff;
	color: #0e1a3d;
	font-size: 16px !important;
	font-family: "Manrope", sans-serif !important;
	box-sizing: border-box;
	outline: none;
}

.tbc-input:focus,
.tbc-select:focus {
	outline: none;
	box-shadow: none;
}

/* Input powierzchni (m2): sufiks jednostki + usunięcie strzałek spinnera */
.tbc-input-wrap {
	position: relative;
}

.tbc-input-wrap .tbc-input {
	padding-right: 48px !important;
}

.tbc-input-wrap .tbc-input::-webkit-outer-spin-button,
.tbc-input-wrap .tbc-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.tbc-input-wrap .tbc-input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
	padding: 16px !important;
	padding-right: 48px !important;
	border-radius: 8px !important;
}

.tbc-input-suffix {
	position: absolute;
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
	color: #6b7488;
	font-size: 16px;
	pointer-events: none;
}

/* Rząd: pole liczbowe + suwak obok siebie */
.tbc-area-row {
	display: flex;
	align-items: center;
	gap: 16px;
}

.tbc-area-row .tbc-input-wrap {
	flex: 0 0 140px;
}

.tbc-slider {
	flex: 1 1 auto;
	-webkit-appearance: none;
	appearance: none;
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	accent-color: var(--tbc-yellow);
	cursor: pointer;
}

.tbc-slider::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
}

.tbc-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--tbc-yellow);
	border: 3px solid #0e1a3d;
	margin-top: -7px;
	cursor: pointer;
}

.tbc-slider::-moz-range-track {
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
}

.tbc-slider::-moz-range-progress {
	height: 6px;
	border-radius: 999px;
	background: var(--tbc-yellow);
}

.tbc-slider::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--tbc-yellow);
	border: 3px solid #0e1a3d;
	cursor: pointer;
}

@media (max-width: 480px) {
	.tbc-area-row {
		flex-wrap: wrap;
	}
	.tbc-area-row .tbc-input-wrap {
		flex: 1 1 100%;
	}
	.tbc-slider {
		flex: 1 1 100%;
	}
}

.tbc-select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1a3d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 18px;
	padding-right: 44px !important;
}

.tbc-cards {
	display: grid;
	grid-template-columns: repeat(var(--tbc-columns, 3), minmax(0, 1fr));
	gap: 12px;
}

.tbc-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	background: transparent;
	border: 1px solid var(--tbc-border);
	border-radius: 12px;
	color: var(--tbc-text);
	cursor: pointer;
	text-align: left;
	font-size: 16px;
	font-family: "Manrope", sans-serif !important;
	line-height: 1.3;
	min-width: 0;
	box-sizing: border-box;
	white-space: normal !important;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.tbc-card:hover {
	background: var(--tbc-hover-bg);
	color: var(--tbc-hover-text);
}

.tbc-card-icon {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tbc-card-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.tbc-card-label {
	max-width: 100%;
	min-width: 0;
	flex: 1 1 auto;
	overflow-wrap: break-word;
	word-wrap: break-word;
	white-space: normal !important;
	font-size: 14px;
}

.tbc-card-check {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #0e1a3d;
	color: #ffffff;
	font-size: 11px;
	line-height: 22px;
	text-align: center;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity .12s ease, transform .12s ease;
}

.tbc-card.is-selected {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--tbc-card-selected-text);
}

.tbc-card.is-selected .tbc-card-check {
	opacity: 1;
	transform: scale(1);
}

.tbc-card.is-invalid {
	border-color: #e5484d;
}

.tbc-input.is-invalid,
.tbc-select.is-invalid {
	box-shadow: 0 0 0 2px #e5484d;
}

.tbc-error {
	color: #ff8a8a;
	font-size: 13px;
	margin: -8px 0 16px;
}

.tbc-submit {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	padding: 16px;
	background: var(--tbc-yellow) !important;
	color: #0e1a3d !important;
	border: none !important;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	font-family: "Manrope", sans-serif !important;
	cursor: pointer;
	transition: background-color .15s ease;
}

.tbc-card:focus,
.tbc-submit:focus {
	outline: none;
}

.tbc-submit:hover,
.tbc-submit:focus,
.tbc-submit:active {
	background: #eba700 !important;
	color: #0e1a3d !important;
}

.tbc-submit[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

@media (max-width: 640px) {
	.tbc-cards {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}
