/* =========================================================
   VAT / NDS CALCULATOR
   Specific styles only for calculators/nds.tpl
   ========================================================= */

.vat-calculator,
.vat-calculator *,
.vat-calculator *::before,
.vat-calculator *::after {
	box-sizing: border-box;
}

.vat-calculator {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	overflow: hidden;
}

.vat-layout {
	display: grid;
	grid-template-columns: minmax(0, 600px) minmax(320px, 400px);
	gap: 24px;
	align-items: start;
	justify-content: center;
}

.vat-layout > * {
	min-width: 0;
}

.vat-card {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	padding: 22px;
	border: 1px solid #e1e5ee;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
}

.vat-card-title {
	margin: 0 0 18px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: #111827;
	text-transform: none;
}

.vat-field {
	margin-bottom: 16px;
}

.vat-field label,
.vat-link-box label {
	display: block;
	margin-bottom: 6px;
	font-weight: 700;
	color: #404549;
}

.vat-field input,
.vat-field select,
.vat-link-box input {
	width: 100%;
	max-width: 100%;
	height: 44px;
	box-sizing: border-box;
	border-radius: 8px;
}

.vat-help {
	margin-top: 6px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.45;
}

.vat-fields-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 14px;
	max-width: 520px;
}

.vat-mode-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 18px;
}

.vat-mode-item {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.vat-mode-item input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.vat-mode-item span {
	display: block;
	min-height: 82px;
	padding: 14px;
	border: 1px solid #d9dee8;
	border-radius: 12px;
	background: #f8fafc;
	transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.vat-mode-item strong {
	display: block;
	color: #111827;
	font-size: 16px;
}

.vat-mode-item small {
	display: block;
	margin-top: 4px;
	color: #6b7280;
}

.vat-mode-item input:checked + span {
	border-color: #ff485b;
	background: rgba(255, 72, 91, 0.08);
	box-shadow: 0 0 0 3px rgba(255, 72, 91, 0.10);
}

.vat-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 420px;
	margin-top: 20px;
}

.vat-error {
	min-height: 20px;
	margin-top: 14px;
	color: #dc2626;
	font-size: 14px;
	font-weight: 600;
}


/* =========================================================
   RESULT CARD
   ========================================================= */

.vat-result-card {
	position: static;
	align-self: start;
}

.vat-result-main {
	margin-bottom: 16px;
	padding: 14px;
	border-radius: 12px;
	background: #f8fafc;
	color: #111827;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
}

.vat-result-list {
	display: grid;
	gap: 10px;
}

.vat-result-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid #eef1f5;
}

.vat-result-row span {
	color: #6b7280;
}

.vat-result-row strong {
	color: #111827;
	font-weight: 800;
	text-align: right;
}

.vat-result-row-accent strong {
	color: #dc2626;
}

.vat-formula {
	margin-top: 16px;
	padding: 12px;
	border-radius: 10px;
	background: #f8fafc;
	color: #4b5563;
	font-size: 14px;
	line-height: 1.5;
}

.vat-link-box {
	margin-top: 18px;
}

.vat-link-row {
	display: flex;
	gap: 10px;
}

.vat-link-row input {
	min-width: 0;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media only screen and (max-width: 991px) {
	.vat-calculator {
		max-width: 720px;
	}

	.vat-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.vat-result-card {
		position: static;
	}
}

@media only screen and (max-width: 575px) {
	.vat-card {
		padding: 15px;
		border-radius: 12px;
	}

	.vat-card-title {
		margin-bottom: 14px;
		font-size: 16px;
	}

	.vat-mode-grid {
		grid-template-columns: 1fr;
	}

	.vat-fields-grid {
		grid-template-columns: 1fr;
		max-width: 100%;
	}

	.vat-result-main {
		padding: 12px;
		font-size: 16px;
		word-break: break-word;
	}

	.vat-result-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 3px;
		padding: 10px 0;
	}

	.vat-result-row strong {
		text-align: left;
		word-break: break-word;
	}

	.vat-actions {
		flex-direction: column;
	}

	.vat-actions .btn {
		width: 100%;
	}

	.vat-link-row {
		flex-direction: column;
	}

	.vat-link-row .btn {
		width: 100%;
	}
}

@media only screen and (max-width: 420px) {
	.vat-card {
		padding: 13px;
	}
}