/*
 * Enkar Garanti — müşteri sorgusu ve işveren giriş penceresi.
 * Tema köşesiz (rad 0) çalıştığı için yüzeyler düz kenarlıdır; yalnızca plaka gerçeğindeki gibi yuvarlak.
 */

@font-face {
	font-family: "EG Plaka";
	src: url("../fonts/plaka.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

.eg,
.eg-modal {
	--eg-ink: #0b0b0b;
	--eg-text: #2a2b2e;
	--eg-muted: #6b6d72;
	--eg-faint: #9a9ca1;
	--eg-line: #e4e2dc;
	--eg-field: #cfccc4;
	--eg-soft: #f6f5f1;
	--eg-gold: #c9a94a;
	--eg-gold-light: #e3ce63;
	--eg-blue: #0b3a8c;
	--eg-ok: #1f7a4c;
	--eg-bad: #b0281f;
	--eg-ease: cubic-bezier(.22, .8, .24, 1);
	--eg-font: var(--theme-font-p_font-family, Manrope, system-ui, sans-serif);
	--eg-plate: "EG Plaka", "Arial Narrow", sans-serif;
	font-family: var(--eg-font);
	color: var(--eg-text);
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.eg *,
.eg *::before,
.eg *::after,
.eg-modal *,
.eg-modal *::before,
.eg-modal *::after {
	box-sizing: border-box;
}

html.eg-locked {
	overflow: hidden;
	scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
	html.eg-locked body {
		padding-right: var(--eg-gap, 0);
	}
}

.eg .eg-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.eg-nowrap {
	white-space: nowrap;
}

/* ---------- Yerleşim ---------- */

.eg {
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	padding: 8px 0 0;
}

.eg-query {
	container-type: inline-size;
}

.eg .eg-query__label {
	display: block;
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--eg-ink);
}

/* ---------- Türkiye plakası (520 × 110 mm oranı) ---------- */

.eg-plate {
	--eg-w: 100cqw;
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	aspect-ratio: 520 / 112;
	padding: 0.6cqw;
	background: #fdfdfb;
	border: max(2px, 0.42cqw) solid var(--eg-ink);
	border-radius: 1.7cqw;
	box-shadow:
		inset 0 1px 0 #fff,
		0 1px 1px rgba(11, 11, 11, 0.08),
		0 12px 28px -18px rgba(11, 11, 11, 0.45);
	cursor: text;
	-webkit-tap-highlight-color: transparent;
	transition: box-shadow 0.3s var(--eg-ease);
}

.eg-plate:focus-within {
	outline: 2px solid var(--eg-gold);
	outline-offset: 5px;
}

.eg-plate.is-invalid {
	animation: eg-shake 0.36s var(--eg-ease);
}

.eg-plate__band {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	flex: none;
	width: 8.4cqw;
	padding-bottom: 1.6cqw;
	overflow: hidden;
	border-radius: 1cqw 0 0 1cqw;
	background: var(--eg-blue);
}

/* Reflektif folyonun ince parıltısı */
.eg-plate__band::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28) 0.5px, transparent 0.9px) 0 0 / 3px 3px,
		radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.16) 0.5px, transparent 0.9px) 1px 1px / 4px 4px,
		linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 55%);
}

.eg-plate__tr {
	position: relative;
	font-family: var(--eg-plate);
	font-size: 4.4cqw;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.03em;
	color: #fff;
}

:is(.eg, .egp) .eg-plate__input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0 3cqw 0 2cqw;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: 0;
	font-family: var(--eg-plate);
	font-size: 13.4cqw;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
	color: var(--eg-ink);
	text-shadow: 0 1px 0 #fff, 0 -0.5px 0 rgba(11, 11, 11, 0.35);
	caret-color: var(--eg-blue);
	-webkit-appearance: none;
	appearance: none;
}

:is(.eg, .egp) .eg-plate__input::placeholder {
	color: #d9dadc;
	text-shadow: none;
	opacity: 1;
}

:is(.eg, .egp) .eg-plate__input:focus {
	border: 0;
	box-shadow: none;
	outline: 0;
	background: transparent;
}

/* Kapsayıcı sorgusu desteklemeyen eski tarayıcılar */
@supports not (container-type: inline-size) {
	.eg-plate { aspect-ratio: auto; height: clamp(72px, 21vw, 120px); padding: 3px; border-width: 2px; border-radius: 8px; }
	.eg-plate__band { width: clamp(28px, 8vw, 46px); padding-bottom: 8px; border-radius: 5px 0 0 5px; }
	.eg-plate__tr { font-size: clamp(13px, 3.8vw, 22px); }
	:is(.eg, .egp) .eg-plate__input { font-size: clamp(44px, 12.5vw, 74px); padding: 0 14px 0 10px; }
}

.eg .eg-query__msg {
	min-height: 21px;
	margin: 14px 0 22px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--eg-muted);
	transition: color 0.2s var(--eg-ease);
}

.eg .eg-query__msg.is-error {
	color: var(--eg-bad);
}

/* ---------- Buton ---------- */

.eg .eg-btn,
.eg-modal .eg-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 58px;
	margin: 0;
	padding: 0 28px;
	border: 0;
	border-radius: 0;
	background: var(--eg-ink);
	box-shadow: none;
	font-family: var(--eg-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: none;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s var(--eg-ease), color 0.2s var(--eg-ease);
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.eg .eg-btn--block,
.eg-modal .eg-btn--block {
	display: flex;
	width: 100%;
}

.eg .eg-btn:hover,
.eg-modal .eg-btn:hover {
	background: var(--eg-gold-light);
	color: var(--eg-ink);
}

.eg .eg-btn:focus-visible,
.eg-modal .eg-btn:focus-visible {
	outline: 2px solid var(--eg-gold);
	outline-offset: 3px;
}

.eg .eg-btn[aria-busy="true"],
.eg-modal .eg-btn[aria-busy="true"] {
	pointer-events: none;
	background: var(--eg-ink);
	color: rgba(255, 255, 255, 0.72);
}

.eg-btn[aria-busy="true"]::before {
	content: "";
	width: 14px;
	height: 14px;
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: eg-spin 0.7s linear infinite;
}

/* ---------- Sonuç ---------- */

.eg-result {
	outline: 0;
	scroll-margin-top: 96px;
}

.eg-result:empty {
	display: none;
}

.eg-result__card {
	margin-top: 40px;
	background: #fff;
	border: 1px solid var(--eg-line);
	animation: eg-in 0.4s var(--eg-ease) both;
}

.eg-vehicle {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	padding: 20px 24px;
	background: var(--eg-ink);
	color: #fff;
}

.eg-vehicle__text {
	min-width: 0;
}

.eg .eg-vehicle__name {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}

.eg .eg-vehicle__meta {
	margin: 3px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: #a7a9ae;
}

.eg-sep {
	display: inline-block;
	width: 3px;
	height: 3px;
	margin: 0 9px 3px;
	vertical-align: middle;
	background: currentColor;
}

.eg .eg-vehicle__count {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	color: var(--eg-gold-light);
}

.eg-mini-plate {
	display: inline-flex;
	align-items: stretch;
	flex: none;
	height: 34px;
	padding: 2px;
	background: #fdfdfb;
	border: 1.5px solid var(--eg-ink);
	border-radius: 4px;
	font-family: var(--eg-plate);
	font-weight: 600;
	line-height: 1;
	color: var(--eg-ink);
	white-space: nowrap;
}

.eg-vehicle .eg-mini-plate {
	border-color: #fdfdfb;
	box-shadow: inset 0 0 0 1px var(--eg-ink);
}

.eg-mini-plate__band {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 13px;
	padding-bottom: 3px;
	border-radius: 2px 0 0 2px;
	background: var(--eg-blue);
	font-size: 7px;
	color: #fff;
}

.eg-mini-plate__text {
	display: flex;
	align-items: center;
	padding: 0 9px 0 8px;
	font-size: 21px;
	letter-spacing: 0.035em;
}

.eg .eg-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.eg .eg-item {
	margin: 0;
	padding: 26px 24px 24px;
}

.eg .eg-item + .eg-item {
	border-top: 1px solid var(--eg-line);
}

.eg-item__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.eg-item__title {
	min-width: 0;
}

.eg .eg-item__name {
	margin: 0;
	font-family: var(--eg-font);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--eg-ink);
}

.eg .eg-item__film {
	margin: 4px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--eg-muted);
}

.eg-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	padding-top: 4px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.eg-status::before {
	content: "";
	width: 8px;
	height: 8px;
	background: currentColor;
}

.eg-status--aktif { color: var(--eg-ok); }
.eg-status--dolan { color: var(--eg-muted); }
.eg-status--iptal { color: var(--eg-bad); }

.eg .eg-left {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 22px 0 34px;
	line-height: 1;
}

.eg-left__num {
	font-family: var(--eg-plate);
	font-size: 54px;
	font-weight: 600;
	letter-spacing: 0.01em;
	font-variant-numeric: tabular-nums;
	color: var(--eg-ink);
}

.eg-left__unit {
	font-size: 15px;
	font-weight: 500;
	color: var(--eg-muted);
}

.eg .eg-left--off {
	margin: 18px 0 18px;
}

.eg-left__text {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--eg-text);
}

.eg-item--iptal .eg-left__text {
	color: var(--eg-bad);
}

/* Zaman çizgisi */

.eg-line__track {
	position: relative;
	height: 2px;
	margin: 0;
	background: var(--eg-line);
}

.eg-line__fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--eg-done);
	background: var(--eg-ink);
	transform-origin: left center;
	animation: eg-grow 0.9s var(--eg-ease) both 0.1s;
}

.eg-item--dolan .eg-line__fill { background: var(--eg-faint); }
.eg-item--iptal .eg-line__fill { background: var(--eg-bad); opacity: 0.55; }

.eg-line__now {
	position: absolute;
	top: 50%;
	left: var(--eg-done);
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	background: var(--eg-gold);
	box-shadow: 0 0 0 3px #fff;
	animation: eg-fade 0.3s var(--eg-ease) both 0.85s;
}

.eg-line__now span {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	white-space: nowrap;
	color: var(--eg-muted);
}

.eg-line--start .eg-line__now span {
	left: -5px;
	transform: none;
}

.eg-line--end .eg-line__now span {
	right: -5px;
	left: auto;
	transform: none;
}

.eg .eg-line__ends {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 12px;
	margin: 12px 0 0;
}

.eg .eg-line__ends > div {
	margin: 0;
}

.eg .eg-line__ends > div:last-child {
	text-align: right;
}

.eg .eg-line__mid {
	text-align: center;
}

.eg .eg-line__ends dt {
	margin: 0 0 3px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--eg-faint);
}

.eg .eg-line__ends dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	font-variant-numeric: tabular-nums;
	color: var(--eg-ink);
}

.eg .eg-result__note {
	margin: 0;
	padding: 16px 24px;
	border-top: 1px solid var(--eg-line);
	background: var(--eg-soft);
	font-size: 14px;
	line-height: 1.5;
	color: var(--eg-muted);
}

.eg a.eg-link {
	color: var(--eg-ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--eg-gold);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

.eg a.eg-link:hover {
	color: var(--eg-ink);
	text-decoration-color: var(--eg-ink);
}

.eg-none {
	padding: 28px 24px;
}

.eg .eg-none__title {
	margin: 18px 0 6px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--eg-ink);
}

.eg .eg-none__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--eg-muted);
}

/* ---------- İşveren girişi bağlantısı ---------- */

.eg-staff {
	margin-top: 72px;
	padding-top: 18px;
	border-top: 1px solid var(--eg-line);
	text-align: center;
}

.eg .eg-staff__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--eg-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	color: var(--eg-muted);
	cursor: pointer;
	touch-action: manipulation;
}

.eg .eg-staff__link:hover,
.eg .eg-staff__link:focus-visible {
	background: transparent;
	color: var(--eg-ink);
	text-decoration: underline;
	text-underline-offset: 4px;
	outline: 0;
}

.eg .eg-staff__link[aria-busy="true"] {
	opacity: 0.5;
	pointer-events: none;
}

/* ---------- Giriş penceresi ---------- */

.eg-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: rgba(11, 11, 11, 0.7);
	animation: eg-fade 0.2s var(--eg-ease) both;
}

.eg-modal.is-closing {
	animation: eg-fade-out 0.16s var(--eg-ease) both;
}

.eg-modal__box {
	position: relative;
	width: 100%;
	max-width: 420px;
	margin: auto;
	background: #fff;
	box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6);
	animation: eg-in 0.28s var(--eg-ease) both;
}

.eg-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 6px 6px 28px;
	border-bottom: 1px solid var(--eg-line);
}

.eg-modal .eg-modal__title {
	margin: 0;
	font-family: var(--eg-font);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--eg-ink);
}

.eg-modal .eg-modal__close {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--eg-muted);
	cursor: pointer;
}

.eg-modal .eg-modal__close:hover,
.eg-modal .eg-modal__close:focus-visible {
	background: var(--eg-soft);
	color: var(--eg-ink);
	outline: 0;
}

.eg-modal__form {
	padding: 24px 28px 28px;
}

.eg-modal .eg-field__label {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--eg-ink);
}

.eg-modal .eg-field {
	position: relative;
}

.eg-modal .eg-field__input {
	display: block;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 76px 0 16px;
	border: 1px solid var(--eg-field);
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	font-family: var(--eg-font);
	font-size: 16px;
	letter-spacing: 0.02em;
	line-height: 1;
	color: var(--eg-ink);
	transition: border-color 0.15s var(--eg-ease), box-shadow 0.15s var(--eg-ease);
	-webkit-appearance: none;
	appearance: none;
}

.eg-modal .eg-field__input:hover {
	border-color: #b9b6ad;
}

.eg-modal .eg-field__input:focus {
	border-color: var(--eg-ink);
	box-shadow: inset 0 0 0 1px var(--eg-ink);
	outline: 0;
}

.eg-modal .eg-field__input[aria-invalid="true"] {
	border-color: var(--eg-bad);
	box-shadow: inset 0 0 0 1px var(--eg-bad);
}

.eg-modal .eg-field__toggle {
	position: absolute;
	top: 1px;
	right: 1px;
	bottom: 1px;
	min-width: 68px;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--eg-font);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	color: var(--eg-muted);
	cursor: pointer;
	touch-action: manipulation;
}

.eg-modal .eg-field__toggle:hover,
.eg-modal .eg-field__toggle:focus-visible {
	background: transparent;
	color: var(--eg-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	outline: 0;
}

.eg-modal .eg-modal__error {
	min-height: 21px;
	margin: 10px 0 14px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--eg-bad);
}

/* ---------- Hareket ---------- */

@keyframes eg-in {
	from { opacity: 0; transform: translateY(8px); }
}

@keyframes eg-grow {
	from { transform: scaleX(0); }
}

@keyframes eg-fade {
	from { opacity: 0; }
}

@keyframes eg-fade-out {
	to { opacity: 0; }
}

@keyframes eg-spin {
	to { transform: rotate(360deg); }
}

@keyframes eg-shake {
	25% { transform: translateX(-6px); }
	50% { transform: translateX(5px); }
	75% { transform: translateX(-3px); }
}

@media (prefers-reduced-motion: reduce) {
	.eg *,
	.eg-modal,
	.eg-modal * {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Mobil ---------- */

@media (max-width: 600px) {
	.eg .eg-query__msg {
		min-height: 42px;
		margin: 12px 0 16px;
	}

	.eg .eg-left {
		margin-bottom: 30px;
	}

	.eg-result__card {
		margin-top: 32px;
	}

	.eg-vehicle {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 14px 12px;
		padding: 18px;
	}

	.eg-vehicle .eg-mini-plate {
		grid-column: 1;
		justify-self: start;
	}

	.eg .eg-vehicle__count {
		grid-column: 2;
		grid-row: 1;
	}

	.eg-vehicle__text {
		grid-column: 1 / -1;
	}

	.eg .eg-item {
		padding: 22px 18px 20px;
	}

	.eg .eg-item__name {
		font-size: 17px;
	}

	.eg-left__num {
		font-size: 46px;
	}

	.eg .eg-line__ends dd {
		font-size: 14px;
	}

	.eg .eg-result__note {
		padding: 14px 18px;
	}

	.eg-none {
		padding: 24px 18px;
	}

	.eg-staff {
		margin-top: 56px;
	}

	/* Pencere üstte durur: telefon klavyesi açıldığında alan ve buton görünür kalır. */
	.eg-modal {
		align-items: flex-start;
		padding: max(12px, env(safe-area-inset-top)) 12px 12px;
	}

	.eg-modal__box {
		margin: 8vh auto auto;
	}

	.eg-modal__form {
		padding: 20px 20px 22px;
	}

	.eg-modal__head {
		padding-left: 20px;
	}
}
