/* ThunderTransport Calculator — front-end styles */

.tt-calc-wrapper {
	--tt-green: #2d5a2d;
	--tt-green-dark: #1f3f1f;
	--tt-accent: #1e8e3e;
	--tt-bg: #f4f8f3;
	--tt-border: #dfe6dc;
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--tt-green-dark);
}

.tt-calc-main {
	flex: 1 1 640px;
	min-width: 320px;
}

.tt-calc-sidebar {
	flex: 0 0 340px;
}

.tt-calc-section-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 20px;
}

.tt-calc-type-label {
	font-weight: 600;
	margin-bottom: 12px;
}

.tt-req {
	color: #c0392b;
}

.tt-calc-type-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

@media (max-width: 720px) {
	.tt-calc-type-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.tt-calc-type-card {
	position: relative;
	border: 1px solid var(--tt-border);
	border-radius: 10px;
	padding: 24px 16px 16px;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	text-align: left;
}

.tt-calc-type-card:hover {
	border-color: var(--tt-green);
}

.tt-calc-type-card.is-selected {
	border-color: var(--tt-accent);
	box-shadow: 0 0 0 1px var(--tt-accent);
}

.tt-calc-type-card svg {
	width: 56px;
	height: 56px;
	display: block;
	margin-bottom: 16px;
	stroke: var(--tt-green);
}

.tt-calc-type-card .tt-calc-type-name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
}

.tt-calc-type-radio {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #ccc;
	display: inline-block;
	flex-shrink: 0;
}

.tt-calc-type-card.is-selected .tt-calc-type-radio {
	border-color: var(--tt-accent);
	background: radial-gradient(circle, var(--tt-accent) 0 40%, transparent 44%);
}

.tt-calc-warning {
	background: var(--tt-green-dark);
	color: #f4f8f3;
	padding: 18px 20px;
	border-radius: 8px;
	font-size: 0.92rem;
	line-height: 1.5;
	margin-bottom: 24px;
}

.tt-calc-item-group {
	border: 1px solid var(--tt-border);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 16px;
	background: #fff;
	position: relative;
}

.tt-calc-item-group-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.tt-calc-item-group-header h3 {
	margin: 0;
	font-size: 1.05rem;
}

.tt-calc-remove-item {
	background: none;
	border: none;
	color: #c0392b;
	cursor: pointer;
	font-size: 0.85rem;
	text-decoration: underline;
}

.tt-calc-field-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 14px;
}

.tt-calc-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tt-calc-field label {
	font-size: 0.85rem;
	font-weight: 600;
}

.tt-calc-field input,
.tt-calc-field select,
.tt-calc-field textarea {
	padding: 10px 12px;
	border: 1px solid var(--tt-border);
	border-radius: 6px;
	font-size: 0.95rem;
	width: 100%;
	box-sizing: border-box;
}

.tt-calc-field .tt-calc-hint {
	font-size: 0.78rem;
	color: #6b7a63;
}

.tt-calc-field-error {
	font-size: 0.78rem;
	color: #c0392b;
	display: none;
}

.tt-calc-field.has-error input,
.tt-calc-field.has-error select {
	border-color: #c0392b;
}

.tt-calc-field.has-error .tt-calc-field-error {
	display: block;
}

.tt-calc-info-box {
	background: #eef4ec;
	border: 1px solid var(--tt-border);
	border-radius: 8px;
	padding: 14px 16px;
	font-size: 0.85rem;
	line-height: 1.5;
	margin-bottom: 14px;
}

.tt-calc-line-total {
	text-align: right;
	font-weight: 700;
	font-size: 0.95rem;
	margin-top: 8px;
}

.tt-calc-group-error {
	background: #fdecea;
	color: #a12b1f;
	border: 1px solid #f5c6cb;
	padding: 12px 14px;
	border-radius: 6px;
	font-size: 0.88rem;
	line-height: 1.5;
	margin-top: 10px;
}

.tt-calc-group-error a {
	color: #a12b1f;
	font-weight: 700;
	text-decoration: underline;
}

.tt-calc-btn-secondary {
	background: #fff;
	border: 1px dashed var(--tt-green);
	color: var(--tt-green-dark);
	padding: 10px 18px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	margin-bottom: 20px;
}

.tt-calc-multi-toggle,
.tt-calc-consent {
	margin-bottom: 20px;
	font-size: 0.92rem;
}

.tt-calc-consent-label {
	font-weight: 600;
	margin-bottom: 8px;
}

.tt-calc-multi-toggle label,
.tt-calc-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
}

.tt-calc-multi-toggle input,
.tt-calc-consent input {
	margin-top: 3px;
}

.tt-calc-form-error {
	background: #fdecea;
	color: #c0392b;
	border: 1px solid #f5c6cb;
	padding: 12px 14px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 0.9rem;
}

.tt-calc-sidebar-card {
	position: sticky;
	top: 24px;
	border: 1px solid var(--tt-border);
	border-radius: 10px;
	background: #fff;
	padding: 24px;
}

.tt-calc-sidebar-header {
	font-weight: 700;
	font-size: 1.15rem;
	margin-bottom: 16px;
}

.tt-calc-summary-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
	margin-bottom: 16px;
}

.tt-calc-summary-table thead th {
	background: #eceeea;
	text-align: left;
	padding: 10px 12px;
	font-weight: 600;
}

.tt-calc-summary-table thead th:last-child,
.tt-calc-summary-table td:last-child {
	text-align: right;
}

.tt-calc-summary-table tbody td {
	padding: 10px 12px;
	border-bottom: 1px dashed var(--tt-border);
}

.tt-calc-summary-empty td {
	color: #8a978a;
	font-style: italic;
}

.tt-calc-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.2rem;
	font-weight: 700;
	padding-top: 8px;
	margin-bottom: 20px;
}

.tt-calc-btn-primary {
	width: 100%;
	background: var(--tt-accent);
	color: #fff;
	border: none;
	padding: 14px 16px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
}

.tt-calc-btn-primary:disabled {
	background: #a9c9ac;
	cursor: not-allowed;
}

.tt-calc-slider-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tt-calc-slider-wrap input[type="range"] {
	flex: 1;
}

.tt-calc-slider-value {
	font-weight: 700;
	min-width: 80px;
	text-align: right;
}
