/*
 * VakıfBank Sanal POS – ödeme formu stilleri.
 * Tema ile uyum için nötr tonlar + CSS değişkenleri; tema isterse
 * --vbpos-* değişkenleriyle ezebilir.
 */

.vbpos-form {
	--vbpos-accent: #f2a900;
	--vbpos-border: rgba(0, 0, 0, 0.16);
	--vbpos-input-bg: #fff;
	--vbpos-input-color: #1e1e1e;
	--vbpos-muted: #6b7177;
	--vbpos-radius: 8px;
	max-width: 480px;
	margin: 0;
	font-size: 0.95em;
	line-height: 1.45;
}

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

.vbpos-desc {
	margin: 0 0 0.9em;
	color: var(--vbpos-muted);
}

.vbpos-testmode {
	display: block;
	margin: 0 0 0.9em;
	padding: 0.5em 0.8em;
	border: 1px solid #f0c36d;
	border-radius: var(--vbpos-radius);
	background: #fdf6e3;
	color: #7a5b00;
	font-size: 0.9em;
}

.vbpos-field {
	margin: 0 0 0.9em;
}

.vbpos-field label {
	display: block;
	margin: 0 0 0.3em;
	font-weight: 600;
}

.vbpos-field label .required {
	color: #c0392b;
	text-decoration: none;
}

.vbpos-form input[type="text"],
.vbpos-form input[type="password"],
.vbpos-form input[type="tel"] {
	display: block;
	width: 100%;
	padding: 0.6em 0.85em;
	border: 1px solid var(--vbpos-border);
	border-radius: var(--vbpos-radius);
	background: var(--vbpos-input-bg);
	color: var(--vbpos-input-color);
	font: inherit;
	letter-spacing: 0.02em;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.vbpos-form input:focus {
	outline: none;
	border-color: var(--vbpos-accent);
	box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.18);
}

.vbpos-form input.vbpos-invalid {
	border-color: #c0392b;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

/* Kart numarası + marka rozeti */
.vbpos-input {
	position: relative;
}

.vbpos-input input {
	padding-right: 62px;
}

.vbpos-brand {
	position: absolute;
	top: 50%;
	right: 10px;
	width: 44px;
	height: 26px;
	transform: translateY(-50%);
	background-position: center right;
	background-repeat: no-repeat;
	background-size: contain;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.vbpos-brand[data-brand="visa"] {
	opacity: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 16'%3E%3Ctext x='1' y='13' font-family='Arial,Helvetica,sans-serif' font-size='14' font-style='italic' font-weight='bold' fill='%231a1f71'%3EVISA%3C/text%3E%3C/svg%3E");
}

.vbpos-brand[data-brand="mastercard"] {
	opacity: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 24'%3E%3Ccircle cx='14' cy='12' r='10' fill='%23eb001b'/%3E%3Ccircle cx='24' cy='12' r='10' fill='%23f79e1b' fill-opacity='0.85'/%3E%3C/svg%3E");
}

.vbpos-brand[data-brand="troy"] {
	opacity: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 16'%3E%3Ctext x='4' y='13' font-family='Arial,Helvetica,sans-serif' font-size='14' font-weight='bold' fill='%230f3365'%3Etroy%3C/text%3E%3C/svg%3E");
}

.vbpos-brand[data-brand="amex"] {
	opacity: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 16'%3E%3Ctext x='1' y='13' font-family='Arial,Helvetica,sans-serif' font-size='11' font-weight='bold' fill='%232e77bc'%3EAMEX%3C/text%3E%3C/svg%3E");
}

/* Son kullanma + CVV yan yana */
.vbpos-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.8em;
}

/* Taksit seçenekleri */
.vbpos-installments {
	margin: 0 0 0.9em;
	padding: 0;
	border: 0;
}

.vbpos-installments legend {
	padding: 0;
	margin: 0 0 0.4em;
	font-weight: 600;
	font-size: 1em;
}

.vbpos-installments .vbpos-inst-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.55em;
}

.vbpos-inst {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.vbpos-inst input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.vbpos-inst-body {
	display: block;
	padding: 0.6em 0.75em;
	border: 1px solid var(--vbpos-border);
	border-radius: var(--vbpos-radius);
	background: var(--vbpos-input-bg);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vbpos-inst input:checked + .vbpos-inst-body {
	border-color: var(--vbpos-accent);
	box-shadow: 0 0 0 2px rgba(242, 169, 0, 0.28);
}

.vbpos-inst input:focus-visible + .vbpos-inst-body {
	outline: 2px solid var(--vbpos-accent);
	outline-offset: 1px;
}

.vbpos-inst-name {
	display: block;
	font-weight: 600;
	font-size: 0.92em;
}

.vbpos-inst-monthly {
	display: block;
	margin-top: 0.15em;
	font-size: 0.92em;
	color: var(--vbpos-input-color);
}

.vbpos-inst-total {
	display: block;
	margin-top: 0.1em;
	font-size: 0.8em;
	color: var(--vbpos-muted);
}

/* Güvenlik notu */
.vbpos-secure {
	display: flex;
	align-items: center;
	gap: 0.45em;
	margin: 0.4em 0 0;
	color: var(--vbpos-muted);
	font-size: 0.85em;
}

.vbpos-secure::before {
	content: "";
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	background-repeat: no-repeat;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7177' stroke-width='2.2'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

@media (max-width: 420px) {
	.vbpos-grid {
		grid-template-columns: 1fr;
	}

	.vbpos-installments .vbpos-inst-grid {
		grid-template-columns: 1fr 1fr;
	}
}
