/**
 * PosHelper kart formu.
 *
 * Kendi görünümünü taşır, temaya yaslanmaz:
 * - Yazı tipi ve yazı rengi temadan devralınır; çizgi, zemin ve soluk metinler
 *   bu renkten türetilir. Böylece form açık ve koyu temada kendiliğinden uyar.
 * - Vurgu rengi --poshelper-accent ile değişir (ayarlardan); boşsa yazı rengi.
 * - Temaların giriş kutusu kurallarını geçmek için seçiciler #payment önekli
 *   ve çift sınıflı yazılmıştır. Uzak font ya da görsel yok.
 */

/* ------------------------------------------------------------------ */
/* Değişkenler ve kap                                                  */
/* ------------------------------------------------------------------ */

.poshelper-card-form.poshelper-card-form {
	--poshelper-accent: currentColor;
	--poshelper-error: #d92d20;
	--poshelper-radius: 12px;
	--poshelper-field-radius: 10px;
	--poshelper-line: rgba(127, 127, 127, 0.32);
	--poshelper-line-strong: rgba(127, 127, 127, 0.55);
	--poshelper-fill: rgba(127, 127, 127, 0.06);
	--poshelper-muted: rgba(127, 127, 127, 0.95);

	position: relative;
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 560px;
	min-width: 0;
	margin: 6px 0 0;
	padding: 18px 18px 14px;
	border: 1px solid var(--poshelper-line);
	border-radius: var(--poshelper-radius);
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	box-shadow: none;
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.poshelper-card-form.poshelper-card-form {
		--poshelper-line: color-mix(in srgb, currentColor 16%, transparent);
		--poshelper-line-strong: color-mix(in srgb, currentColor 30%, transparent);
		--poshelper-fill: color-mix(in srgb, currentColor 4%, transparent);
		--poshelper-muted: color-mix(in srgb, currentColor 62%, transparent);
	}
}

.poshelper-card-form.poshelper-card-form *,
.poshelper-card-form.poshelper-card-form *::before,
.poshelper-card-form.poshelper-card-form *::after {
	box-sizing: border-box;
}

.poshelper-card-form .poshelper-screen-reader,
.poshelper-screen-reader {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ------------------------------------------------------------------ */
/* Alanlar                                                             */
/* ------------------------------------------------------------------ */

.poshelper-card-form.poshelper-card-form .poshelper-field {
	position: relative;
	float: none;
	width: auto;
	margin: 0 0 14px;
	padding: 0;
	min-width: 0;
	border: 0;
}

.poshelper-card-form.poshelper-card-form .poshelper-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0 12px;
	margin: 0;
	padding: 0;
}

.poshelper-card-form.poshelper-card-form .poshelper-label,
#payment .poshelper-card-form .poshelper-label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 7px;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
	opacity: 0.86;
	cursor: pointer;
}

.poshelper-card-form.poshelper-card-form .poshelper-input-wrap,
.poshelper-card-form.poshelper-card-form .poshelper-select-wrap {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
}

/* Giriş kutuları. */
.poshelper-card-form.poshelper-card-form input.poshelper-input,
.poshelper-card-form.poshelper-card-form select.poshelper-select,
#payment .poshelper-card-form input.poshelper-input,
#payment .poshelper-card-form select.poshelper-select,
#payment div.payment_box .poshelper-card-form input.poshelper-input,
#payment div.payment_box .poshelper-card-form select.poshelper-select {
	display: block;
	float: none;
	width: 100%;
	max-width: 100%;
	height: 50px;
	min-height: 50px;
	margin: 0;
	padding: 0 14px;
	font-family: inherit;
	font-size: 16px; /* iOS'ta odaklanınca yakınlaştırmayı önler. */
	font-weight: 500;
	line-height: 50px;
	letter-spacing: 0.01em;
	text-indent: 0;
	text-transform: none;
	color: inherit;
	background-color: var(--poshelper-fill);
	background-image: none;
	border: 1px solid var(--poshelper-line-strong);
	border-radius: var(--poshelper-field-radius);
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.poshelper-card-form.poshelper-card-form input.poshelper-input::placeholder,
#payment .poshelper-card-form input.poshelper-input::placeholder {
	color: inherit;
	opacity: 0.42;
	font-weight: 400;
	letter-spacing: 0.01em;
}

.poshelper-card-form.poshelper-card-form input.poshelper-input:hover,
.poshelper-card-form.poshelper-card-form select.poshelper-select:hover,
#payment .poshelper-card-form input.poshelper-input:hover,
#payment .poshelper-card-form select.poshelper-select:hover {
	border-color: var(--poshelper-muted);
}

.poshelper-card-form.poshelper-card-form input.poshelper-input:focus,
.poshelper-card-form.poshelper-card-form select.poshelper-select:focus,
#payment .poshelper-card-form input.poshelper-input:focus,
#payment .poshelper-card-form select.poshelper-select:focus,
#payment div.payment_box .poshelper-card-form input.poshelper-input:focus,
#payment div.payment_box .poshelper-card-form select.poshelper-select:focus {
	border-color: var(--poshelper-accent);
	background-color: transparent;
	box-shadow: 0 0 0 3px rgba(127, 127, 127, 0.22);
	outline: none;
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.poshelper-card-form.poshelper-card-form input.poshelper-input:focus,
	.poshelper-card-form.poshelper-card-form select.poshelper-select:focus,
	#payment .poshelper-card-form input.poshelper-input:focus,
	#payment .poshelper-card-form select.poshelper-select:focus,
	#payment div.payment_box .poshelper-card-form input.poshelper-input:focus,
	#payment div.payment_box .poshelper-card-form select.poshelper-select:focus {
		box-shadow: 0 0 0 3px color-mix(in srgb, var(--poshelper-accent) 20%, transparent);
	}
}

/* Hatalı alan. */
.poshelper-card-form.poshelper-card-form input.poshelper-input.poshelper-invalid,
#payment .poshelper-card-form input.poshelper-input.poshelper-invalid,
#payment div.payment_box .poshelper-card-form input.poshelper-input.poshelper-invalid {
	border-color: var(--poshelper-error);
}

.poshelper-card-form.poshelper-card-form input.poshelper-input.poshelper-invalid:focus,
#payment .poshelper-card-form input.poshelper-input.poshelper-invalid:focus,
#payment div.payment_box .poshelper-card-form input.poshelper-input.poshelper-invalid:focus {
	box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.18);
}

/* Kart numarası: rakamlar eşit genişlikte, sağda marka logosu için yer. */
.poshelper-card-form.poshelper-card-form input.poshelper-input--number,
#payment .poshelper-card-form input.poshelper-input--number,
#payment div.payment_box .poshelper-card-form input.poshelper-input--number {
	padding-right: 62px;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
}

.poshelper-card-form.poshelper-card-form .poshelper-input-wrap--cvc input.poshelper-input,
#payment .poshelper-card-form .poshelper-input-wrap--cvc input.poshelper-input,
#payment div.payment_box .poshelper-card-form .poshelper-input-wrap--cvc input.poshelper-input {
	padding-right: 50px;
	letter-spacing: 0.12em;
	font-variant-numeric: tabular-nums;
}

/* Marka logosu (kart numarası kutusunun içinde). Marka tanınmadan önce boş kart simgesi. */
.poshelper-card-form.poshelper-card-form .poshelper-brand {
	position: absolute;
	top: 50%;
	right: 12px;
	display: block;
	width: 38px;
	height: 24px;
	margin: -12px 0 0;
	padding: 0;
	background: url("../img/card.svg") center / contain no-repeat;
	border-radius: 4px;
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.poshelper-card-form.poshelper-card-form .poshelper-has-brand .poshelper-brand {
	opacity: 1;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.poshelper-card-form.poshelper-card-form .poshelper-brand[data-poshelper-brand="visa"] {
	background-image: url("../img/visa.svg");
}

.poshelper-card-form.poshelper-card-form .poshelper-brand[data-poshelper-brand="mastercard"] {
	background-image: url("../img/mastercard.svg");
}

.poshelper-card-form.poshelper-card-form .poshelper-brand[data-poshelper-brand="troy"] {
	background-image: url("../img/troy.svg");
}

/* CVV simgesi (kartın arkası). */
.poshelper-card-form.poshelper-card-form .poshelper-cvc-icon {
	position: absolute;
	top: 50%;
	right: 13px;
	width: 26px;
	height: 17px;
	margin-top: -8.5px;
	color: inherit;
	opacity: 0.4;
	pointer-events: none;
}

/* Taksit seçimi: kendi oku. */
.poshelper-card-form.poshelper-card-form select.poshelper-select,
#payment .poshelper-card-form select.poshelper-select,
#payment div.payment_box .poshelper-card-form select.poshelper-select {
	padding-right: 40px;
	line-height: normal;
	cursor: pointer;
}

.poshelper-card-form.poshelper-card-form .poshelper-select-wrap::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.55;
	pointer-events: none;
}

.poshelper-card-form.poshelper-card-form select.poshelper-select option {
	color: #1d2327;
	background: #fff;
}

/* İpuçları ve hatalar. */
.poshelper-card-form.poshelper-card-form .poshelper-hint {
	display: block;
	margin: 6px 0 0;
	padding: 0;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--poshelper-error);
}

.poshelper-card-form.poshelper-card-form .poshelper-hint:empty {
	display: none;
}

.poshelper-card-form.poshelper-card-form .poshelper-hint--info {
	font-weight: 400;
	color: inherit;
	opacity: 0.68;
}

/* Güvenlik notu. */
.poshelper-card-form.poshelper-card-form .poshelper-secure-note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 4px 0 0;
	padding: 12px 0 0;
	border-top: 1px solid var(--poshelper-line);
	font-size: 12.5px;
	line-height: 1.5;
	color: inherit;
	opacity: 0.75;
}

.poshelper-card-form.poshelper-card-form .poshelper-lock {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 1px;
	color: #12a150;
}

/* ------------------------------------------------------------------ */
/* Ödeme yöntemi başlığındaki logolar                                  */
/* ------------------------------------------------------------------ */

.poshelper-logos,
#payment .payment_methods li .poshelper-logos {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0 0 0 8px;
	padding: 0;
	vertical-align: middle;
	line-height: 1;
	float: none;
}

.poshelper-logos img.poshelper-logo,
#payment .payment_methods li .poshelper-logos img.poshelper-logo,
#payment ul.payment_methods li img.poshelper-logo {
	display: block;
	float: none;
	width: 34px;
	height: 22px;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
	vertical-align: middle;
	transition: opacity 0.15s ease, filter 0.15s ease;
}

.poshelper-logos img.poshelper-logo--dim,
#payment ul.payment_methods li img.poshelper-logo--dim {
	opacity: 0.3;
	filter: grayscale(1);
}

/* ------------------------------------------------------------------ */
/* Açıklama ve test uyarısı                                            */
/* ------------------------------------------------------------------ */

.poshelper-description {
	margin: 0 0 4px;
	font-size: 0.92em;
	line-height: 1.5;
	opacity: 0.8;
}

.poshelper-description p {
	margin: 0 0 6px;
}

.poshelper-description p:last-child {
	margin-bottom: 0;
}

.poshelper-test-notice,
#payment .poshelper-test-notice {
	display: inline-block;
	margin: 0 0 10px !important;
	padding: 5px 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;
	color: #7a4b00;
	background: #fff4d6;
	border: 1px solid #f1c75b;
	border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/* Dar ekranlar ve hareket tercihi                                     */
/* ------------------------------------------------------------------ */

@media (max-width: 480px) {
	.poshelper-card-form.poshelper-card-form {
		padding: 14px 14px 12px;
	}

	.poshelper-card-form.poshelper-card-form input.poshelper-input--number,
	#payment .poshelper-card-form input.poshelper-input--number,
	#payment div.payment_box .poshelper-card-form input.poshelper-input--number {
		letter-spacing: 0.02em;
	}
}

@media (max-width: 340px) {
	.poshelper-card-form.poshelper-card-form .poshelper-row {
		grid-template-columns: minmax(0, 1fr);
	}

	.poshelper-logos,
	#payment .payment_methods li .poshelper-logos {
		display: flex;
		margin: 6px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.poshelper-card-form.poshelper-card-form input.poshelper-input,
	.poshelper-card-form.poshelper-card-form select.poshelper-select,
	.poshelper-card-form.poshelper-card-form .poshelper-brand,
	.poshelper-logos img.poshelper-logo {
		transition: none;
	}
}
