/* Tranzila Pay — front-end form. Lightweight, theme-friendly, RTL-safe.
   Per-form colors arrive as CSS custom properties on the .tpay-form element. */
.tpay-form {
	--tpay-btn-bg: #2f5d62;
	--tpay-btn-text: #ffffff;
	--tpay-field-border: #dcdfe6;
	--tpay-radius: 8px;
	--tpay-gap: 16px;
	display: grid;
	gap: var( --tpay-gap, 16px );
	max-width: 640px;
}

.tpay-field { display: flex; flex-direction: column; gap: 6px; }
.tpay-label { font-weight: 600; }
.tpay-req { color: #b0413a; }

.tpay-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--tpay-field-border);
	border-radius: var(--tpay-radius);
	font: inherit;
	box-sizing: border-box;
}
/* Neutral focus ring by default (accessible, but not a brand color that looks
   unexpected). Set a Focus color in Elementor to override it. */
.tpay-input:focus { outline: 2px solid var( --tpay-focus, rgba( 15, 23, 42, .35 ) ); outline-offset: 1px; }
textarea.tpay-input { resize: vertical; }

.tpay-help { color: #6a7180; }

/* Field note / tooltip. "question" = a ? badge with a hover/focus bubble;
   "note" = an always-visible ! note under the field. Colors are variables so
   Elementor can restyle them. */
.tpay-tip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-inline-start: 6px;
	border-radius: 50%;
	background: var( --tpay-tip-badge, #6a7180 );
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: help;
	vertical-align: middle;
}
.tpay-tip-bubble {
	position: absolute;
	inset-inline-start: 0;
	bottom: calc( 100% + 8px );
	z-index: 5;
	width: max-content;
	min-width: 140px;
	max-width: 260px;
	padding: 8px 10px;
	border-radius: var( --tpay-tip-radius, 6px );
	background: var( --tpay-tip-bg, #1e2430 );
	color: var( --tpay-tip-color, #ffffff );
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	text-align: start;
	box-shadow: 0 6px 20px rgba( 0, 0, 0, .18 );
	opacity: 0;
	visibility: hidden;
	transform: translateY( 4px );
	transition: opacity .15s, transform .15s;
	pointer-events: none;
}
.tpay-tip:hover .tpay-tip-bubble,
.tpay-tip:focus .tpay-tip-bubble,
.tpay-tip:focus-within .tpay-tip-bubble { opacity: 1; visibility: visible; transform: none; }

.tpay-note {
	position: relative;
	display: block;
	margin-top: 6px;
	padding-inline-start: 22px;
	color: var( --tpay-note-color, #6a7180 );
	font-size: .9em;
	line-height: 1.4;
}
.tpay-note::before {
	content: "!";
	position: absolute;
	inset-inline-start: 0;
	top: 1px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var( --tpay-note-badge, #e0a800 );
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

/* Optional field icon (Font Awesome) at the start of the input. */
.tpay-input-wrap { position: relative; display: block; }
.tpay-field-icon {
	position: absolute;
	inset-inline-start: 12px;
	top: 50%;
	transform: translateY( -50% );
	color: var( --tpay-icon-color, var( --tpay-btn-bg ) );
	pointer-events: none;
	font-size: 15px;
}
.tpay-has-icon .tpay-input { padding-inline-start: 38px; }

.tpay-choices { display: grid; gap: 8px; }
.tpay-choice { display: flex; align-items: center; gap: 8px; }

/* Widths */
.tpay-w-50 { width: 100%; }
.tpay-w-33 { width: 100%; }
@media ( min-width: 600px ) {
	.tpay-form { grid-template-columns: repeat( 6, 1fr ); }
	.tpay-field, .tpay-total, .tpay-messages, .tpay-submit, .tpay-products { grid-column: 1 / -1; }
	.tpay-w-50 { grid-column: span 3; }
	.tpay-w-33 { grid-column: span 2; }
}

/* Product cards — N per row (set per form via --tpay-cols). */
.tpay-products-cards { display: grid; gap: 12px; grid-template-columns: repeat( var( --tpay-cols, 3 ), minmax( 0, 1fr ) ); }
@media ( max-width: 600px ) { .tpay-products-cards { grid-template-columns: repeat( 2, minmax( 0, 1fr ) ); } }
.tpay-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	border: 1px solid var(--tpay-field-border);
	border-radius: var(--tpay-radius);
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.tpay-card:has( input:checked ) {
	border-color: var(--tpay-btn-bg);
	box-shadow: 0 0 0 2px var(--tpay-btn-bg) inset;
}
.tpay-card input {
	position: absolute;
	inset-inline-start: 10px;
	top: 10px;
	width: var( --tpay-choice-size, 20px );
	height: var( --tpay-choice-size, 20px );
	accent-color: var( --tpay-choice-accent, var( --tpay-btn-bg ) );
	cursor: pointer;
}
/* All product images the same size regardless of their source dimensions. */
.tpay-card-img {
	width: 100%;
	height: var( --tpay-card-img-h, 160px );
	object-fit: cover;
	border-radius: calc( var(--tpay-radius) - 2px );
	background: #f1f3f5;
}
.tpay-card-title { font-weight: 700; }
.tpay-card-price { color: var(--tpay-btn-bg); font-weight: 700; }
.tpay-card-price-original { color: #9aa1ac; font-weight: 400; font-size: .85em; text-decoration: line-through; }
.tpay-card-price-sale { color: var( --tpay-sale-color, var(--tpay-btn-bg) ); font-weight: 700; }
.tpay-card-content { color: #6a7180; font-size: .9em; }

/* Optional discount badge on a product card. */
.tpay-card-badge {
	position: absolute;
	inset-inline-end: 10px;
	top: 10px;
	z-index: 1;
	padding: 3px 9px;
	border-radius: var( --tpay-badge-radius, 999px );
	background: var( --tpay-badge-bg, #d6336c );
	color: var( --tpay-badge-color, #ffffff );
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}

/* Total + messages */
.tpay-total { font-size: 1.2em; font-weight: 700; }
.tpay-messages:empty { display: none; }
.tpay-msg-error { color: #b0413a; margin: 4px 0; }
.tpay-thankyou { font-size: 1.15em; font-weight: 700; }

/* Honeypot: visually hidden but present for bots. */
.tpay-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

/* Submit */
.tpay-submit {
	padding: 12px 20px;
	background: var(--tpay-btn-bg);
	color: var(--tpay-btn-text);
	border: none;
	border-radius: var(--tpay-radius);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.tpay-submit:hover { filter: brightness( .95 ); }
.tpay-submit:disabled { opacity: .6; cursor: default; }

.tpay-error { color: #b0413a; }

/* Multi-step wizard */
.tpay-step-break { display: none; }
.tpay-step-hide { display: none !important; }
.tpay-nav { display: flex; justify-content: space-between; gap: 12px; }
@media ( min-width: 600px ) { .tpay-nav { grid-column: 1 / -1; } }
.tpay-btn-next, .tpay-btn-back {
	padding: 12px 20px;
	border-radius: var(--tpay-radius);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.tpay-btn-next { background: var(--tpay-btn-bg); color: var(--tpay-btn-text); border: none; }
.tpay-btn-back { background: transparent; color: var(--tpay-btn-bg); border: 1px solid var(--tpay-btn-bg); }
@keyframes tpayStep { from { opacity: 0; transform: translateY( 8px ); } to { opacity: 1; transform: none; } }
.tpay-step-anim { animation: tpayStep .25s ease; }
