/*
 * TR Yakıt Maliyet Hesaplayıcı — Ön Yüz Stilleri
 *
 * Kurallar:
 * - Tüm seçiciler .tyh- ön eki ile namespace'lenir (§25).
 * - Global etiket seçiciler (input, button, select, h2) kullanılmaz.
 * - Renkler CSS değişkenleri üzerinden tanımlanır, site sahibi
 *   kendi temasından override edebilir (§63).
 * - Mobil öncelikli: temel stiller mobil için yazılır, breakpoint'lerle
 *   genişletilir (§26).
 */

.tyh-calculator {
	--tyh-primary: #0f6e5c;
	--tyh-primary-hover: #0b5648;
	--tyh-text: #1a1f1d;
	--tyh-muted: #5c6a66;
	--tyh-border: #d8e0dd;
	--tyh-bg: #ffffff;
	--tyh-bg-subtle: #f4f8f7;
	--tyh-success: #1a7f4e;
	--tyh-error: #b3261e;
	--tyh-radius: 12px;
	--tyh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	padding: 20px;
	background: var(--tyh-bg);
	border: 1px solid var(--tyh-border);
	border-radius: var(--tyh-radius);
	font-family: var(--tyh-font);
	color: var(--tyh-text);
	line-height: 1.45;
}

.tyh-calculator *,
.tyh-calculator *::before,
.tyh-calculator *::after {
	box-sizing: inherit;
}

.tyh-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tyh-text);
}

.tyh-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

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

.tyh-field label,
.tyh-checkbox-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--tyh-text);
}

.tyh-input-group {
	position: relative;
	display: flex;
	align-items: center;
}

.tyh-input,
.tyh-select {
	width: 100%;
	min-height: 48px;
	padding: 12px 56px 12px 14px;
	font-size: 1rem;
	font-family: inherit;
	color: var(--tyh-text);
	background: var(--tyh-bg);
	border: 1.5px solid var(--tyh-border);
	border-radius: 10px;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tyh-select {
	padding-right: 14px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6a66' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px;
	padding-right: 40px;
}

.tyh-input:focus,
.tyh-select:focus,
.tyh-checkbox:focus-visible,
.tyh-submit:focus-visible {
	outline: none;
	border-color: var(--tyh-primary);
	box-shadow: 0 0 0 3px rgba(15, 110, 92, 0.18);
}

.tyh-unit {
	position: absolute;
	right: 14px;
	font-size: 0.85rem;
	color: var(--tyh-muted);
	pointer-events: none;
	white-space: nowrap;
}

.tyh-hint {
	margin: 0;
	font-size: 0.8rem;
	color: var(--tyh-muted);
}

.tyh-error {
	margin: 0;
	font-size: 0.8rem;
	color: var(--tyh-error);
	min-height: 1em;
}

.tyh-error:empty {
	display: none;
}

.tyh-field-checkbox {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.tyh-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	cursor: pointer;
}

.tyh-checkbox {
	width: 20px;
	height: 20px;
	accent-color: var(--tyh-primary);
	cursor: pointer;
}

.tyh-submit {
	min-height: 52px;
	padding: 14px 20px;
	font-size: 1rem;
	font-weight: 700;
	font-family: inherit;
	color: #ffffff;
	background: var(--tyh-primary);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
}

.tyh-submit:hover {
	background: var(--tyh-primary-hover);
}

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

.tyh-result {
	margin-top: 20px;
	padding: 18px;
	background: var(--tyh-bg-subtle);
	border-radius: var(--tyh-radius);
	text-align: center;
}

.tyh-result[hidden] {
	display: none;
}

.tyh-result-eyebrow {
	margin: 0 0 4px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--tyh-muted);
}

.tyh-result-primary {
	margin: 0;
	font-size: 2rem;
	font-weight: 800;
	color: var(--tyh-primary);
	line-height: 1.15;
}

.tyh-result-label {
	margin: 2px 0 0;
	font-size: 0.8rem;
	color: var(--tyh-muted);
}

.tyh-result-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--tyh-border);
}

.tyh-result-secondary {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--tyh-text);
}

.tyh-result-meta {
	margin: 14px 0 0;
	font-size: 0.78rem;
	color: var(--tyh-muted);
}

.tyh-disclaimer {
	margin: 14px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--tyh-border);
	font-size: 0.78rem;
	color: var(--tyh-muted);
	text-align: left;
}

/* Tablet ve üzeri */
@media (min-width: 600px) {
	.tyh-calculator {
		padding: 28px;
	}

	.tyh-title {
		font-size: 1.4rem;
	}

	.tyh-result-primary {
		font-size: 2.3rem;
	}
}

/* Masaüstü: form alanları iki sütuna yayılabilir, buton ve sonuç tam genişlik kalır */
@media (min-width: 720px) {
	.tyh-calculator {
		max-width: 620px;
	}

	.tyh-form {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px 20px;
	}

	.tyh-field-checkbox,
	.tyh-submit {
		grid-column: 1 / -1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tyh-calculator * {
		transition: none !important;
	}
}
