/*
 * استایل فرانت‌اند ابزار ارزیابی قیمت زمین مازندران
 * کاملاً RTL، واکنش‌گرا و بدون وابستگی به فونت یا کتابخانه خارجی
 */

.mlv-calculator {
	--mlv-primary: #0f766e;
	--mlv-button: #0f766e;
	--mlv-bg: #f8fafc;
	--mlv-radius: 14px;
	--mlv-text: #1f2937;
	--mlv-muted: #6b7280;
	--mlv-border: #e2e8f0;

	box-sizing: border-box;
	max-width: 640px;
	margin: 0 auto;
	padding: 28px;
	background: var(--mlv-bg);
	border: 1px solid var(--mlv-border);
	border-radius: var(--mlv-radius);
	color: var(--mlv-text);
	font-family: inherit;
	line-height: 1.8;
}

.mlv-calculator * {
	box-sizing: border-box;
}

.mlv-header {
	margin-bottom: 20px;
	text-align: center;
}

.mlv-title {
	margin: 0 0 8px;
	font-size: 1.5em;
	font-weight: 700;
	color: var(--mlv-text);
}

.mlv-subtitle {
	margin: 0;
	color: var(--mlv-muted);
	font-size: 0.95em;
}

.mlv-field {
	margin-bottom: 18px;
	border: none;
	padding: 0;
}

.mlv-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 0.92em;
}

.mlv-unit {
	font-weight: 400;
	color: var(--mlv-muted);
	font-size: 0.85em;
}

.mlv-select,
.mlv-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--mlv-border);
	border-radius: calc(var(--mlv-radius) * 0.6);
	background: #ffffff;
	font-size: 1em;
	font-family: inherit;
	color: var(--mlv-text);
	transition: border-color .15s ease, box-shadow .15s ease;
	appearance: auto;
}

.mlv-select:focus,
.mlv-input:focus {
	outline: none;
	border-color: var(--mlv-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mlv-primary) 20%, transparent);
}

.mlv-segment {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mlv-segment-option {
	position: relative;
	flex: 1 1 auto;
	min-width: 110px;
}

.mlv-segment-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mlv-segment-option span {
	display: block;
	text-align: center;
	padding: 10px 12px;
	border: 1px solid var(--mlv-border);
	border-radius: calc(var(--mlv-radius) * 0.6);
	background: #ffffff;
	font-size: 0.88em;
	cursor: pointer;
	transition: all .15s ease;
	user-select: none;
}

.mlv-segment-option input:checked + span {
	background: var(--mlv-primary);
	border-color: var(--mlv-primary);
	color: #ffffff;
	font-weight: 600;
}

.mlv-segment-option:hover span {
	border-color: var(--mlv-primary);
}

.mlv-submit {
	display: block;
	width: 100%;
	padding: 14px 18px;
	margin-top: 8px;
	background: var(--mlv-button);
	color: #ffffff;
	border: none;
	border-radius: calc(var(--mlv-radius) * 0.6);
	font-size: 1.02em;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
}

.mlv-submit:hover {
	filter: brightness(0.92);
}

.mlv-submit:active {
	transform: translateY(1px);
}

.mlv-form-message {
	min-height: 20px;
	margin: 10px 0 0;
	color: #b91c1c;
	font-size: 0.85em;
	text-align: center;
}

.mlv-result {
	margin-top: 24px;
	padding: 22px;
	background: #ffffff;
	border: 1px solid var(--mlv-border);
	border-radius: var(--mlv-radius);
	text-align: center;
	animation: mlv-fade-in .35s ease;
}

@keyframes mlv-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.mlv-result-title {
	margin: 0 0 14px;
	font-size: 1.1em;
	font-weight: 700;
	color: var(--mlv-primary);
}

.mlv-result-main {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	margin-bottom: 18px;
}

.mlv-result-value {
	font-size: 2em;
	font-weight: 800;
	color: var(--mlv-text);
}

.mlv-result-currency {
	font-size: 1em;
	color: var(--mlv-muted);
}

.mlv-result-details {
	display: grid;
	gap: 10px;
	margin: 0 0 16px;
	text-align: right;
}

.mlv-result-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 12px;
	background: var(--mlv-bg);
	border-radius: calc(var(--mlv-radius) * 0.5);
	font-size: 0.92em;
}

.mlv-result-row dt {
	color: var(--mlv-muted);
	font-weight: 500;
}

.mlv-result-row dd {
	margin: 0;
	font-weight: 700;
}

.mlv-disclaimer {
	margin: 10px 0 0;
	padding-top: 14px;
	border-top: 1px dashed var(--mlv-border);
	font-size: 0.78em;
	color: var(--mlv-muted);
	line-height: 1.9;
	text-align: justify;
}

@media (max-width: 480px) {
	.mlv-calculator {
		padding: 18px;
	}
	.mlv-result-value {
		font-size: 1.5em;
	}
	.mlv-segment-option {
		min-width: 100%;
	}
}
