/* 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; }
/* Checkbox / radio field options share the product & consent selection mark:
   the native control is hidden and a styled box with a ✓ is drawn, using the
   same --tpay-check-* / --tpay-choice-size variables. */
.tpay-choice {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding-inline-start: calc( var( --tpay-choice-size, 22px ) + 12px );
	min-height: var( --tpay-choice-size, 22px );
	cursor: pointer;
}
.tpay-choice input[type="checkbox"],
.tpay-choice input[type="radio"] {
	position: absolute;
	inset-inline-start: 0;
	top: 50%;
	transform: translateY( -50% );
	width: var( --tpay-choice-size, 22px );
	height: var( --tpay-choice-size, 22px );
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}
.tpay-choice::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 50%;
	transform: translateY( -50% );
	width: var( --tpay-choice-size, 22px );
	height: var( --tpay-choice-size, 22px );
	box-sizing: border-box;
	border: 2px solid var( --tpay-check-border, #c7ccd4 );
	background: var( --tpay-check-bg-empty, #fff );
	border-radius: 6px;
	transition: background-color .15s, border-color .15s;
}
.tpay-choice:has( input[type="radio"] )::before { border-radius: 50%; }
/* The ✓ (hidden until checked). */
.tpay-choice::after {
	content: "\2713";
	position: absolute;
	inset-inline-start: 0;
	top: 50%;
	transform: translateY( -50% );
	width: var( --tpay-choice-size, 22px );
	height: var( --tpay-choice-size, 22px );
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc( var( --tpay-choice-size, 22px ) * .62 );
	font-weight: 700;
	line-height: 1;
	color: var( --tpay-check-color, #fff );
	opacity: 0;
	pointer-events: none;
	transition: opacity .12s;
}
.tpay-choice:has( input:checked )::before {
	border-color: var( --tpay-check-bg, var( --tpay-btn-bg ) );
	background: var( --tpay-check-bg, var( --tpay-btn-bg ) );
}
.tpay-choice:has( input:checked )::after { opacity: 1; }
.tpay-choice:has( input:focus-visible )::before {
	outline: 2px solid var( --tpay-check-bg, var( --tpay-btn-bg ) );
	outline-offset: 2px;
}

/* 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, .tpay-guests, .tpay-summary, .tpay-consents { 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 ) ); } }
/* Very small phones: one product card per row so titles/prices stay readable. */
@media ( max-width: 400px ) { .tpay-products-cards { grid-template-columns: 1fr; } }
/* Comfortable touch targets on phones. */
@media ( max-width: 600px ) {
	.tpay-input, .tpay-submit, .tpay-step-btn, .tpay-coupon-apply { min-height: 44px; }
	.tpay-submit { font-size: 16px; }
}

/* Accessibility: a clear, high-contrast keyboard focus ring on every control,
   an invalid state that doesn't rely on colour alone, and respect for users who
   asked for reduced motion. */
.tpay-form :focus-visible,
.tpay-card:focus-within {
	outline: 3px solid #1c64f2;
	outline-offset: 2px;
	border-radius: 4px;
}
.tpay-input:focus-visible { outline-offset: 0; }
.tpay-input[aria-invalid="true"] { border-color: #b0413a; box-shadow: 0 0 0 1px #b0413a; }
.tpay-field-error, .tpay-msg-error { color: #a11; }
@media ( prefers-reduced-motion: reduce ) {
	.tpay-form *, .tpay-form *::before, .tpay-form *::after {
		animation-duration: .001ms !important;
		transition-duration: .001ms !important;
	}
}
.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;
}
/* Selected card highlight — shared by plain cards (:has checked input) and
   quantity cards (.tpay-card-selected, toggled by JS when qty > 0). Border
   colour and ring width are variables so they can be styled — or disabled —
   from Elementor. */
.tpay-card.tpay-card-selected,
.tpay-card:has( input:checked ) {
	border-color: var( --tpay-card-sel-border, var( --tpay-btn-bg ) );
	box-shadow: 0 0 0 var( --tpay-card-sel-width, 2px ) var( --tpay-card-sel-border, var( --tpay-btn-bg ) ) inset;
}
/* The native radio/checkbox is kept for form state but hidden; the styled
   marker circle below is the visual, identical on every card type. */
.tpay-card input[type="radio"],
.tpay-card input[type="checkbox"] {
	position: absolute;
	inset-inline-start: 12px;
	top: 12px;
	width: var( --tpay-choice-size, 24px );
	height: var( --tpay-choice-size, 24px );
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}
/* Unified selection marker: an outlined circle when unselected, a filled
   circle with a ✓ when selected. Every colour is a CSS variable. */
.tpay-card-check {
	position: absolute;
	inset-inline-start: 12px;
	top: 12px;
	width: var( --tpay-choice-size, 24px );
	height: var( --tpay-choice-size, 24px );
	border-radius: 50%;
	border: 2px solid var( --tpay-check-border, #c7ccd4 );
	background: var( --tpay-check-bg-empty, #fff );
	color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc( var( --tpay-choice-size, 24px ) * .6 );
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
	box-sizing: border-box;
	transition: background-color .15s, border-color .15s, color .15s;
}
.tpay-card.tpay-card-selected .tpay-card-check,
.tpay-card:has( input:checked ) .tpay-card-check {
	border-color: var( --tpay-check-bg, var( --tpay-btn-bg ) );
	background: var( --tpay-check-bg, var( --tpay-btn-bg ) );
	color: var( --tpay-check-color, #fff );
}
/* Keyboard focus ring on the styled circle (input itself is invisible). */
.tpay-card:has( input:focus-visible ) .tpay-card-check {
	outline: 2px solid var( --tpay-check-bg, var( --tpay-btn-bg ) );
	outline-offset: 2px;
}
/* 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; }
/* Loading state: keep the active (hover) look — not dimmed — and show a spinner
   next to the changing label, so clicking gives immediate feedback. */
.tpay-submit.is-loading {
	opacity: 1;
	filter: brightness( .95 );
	cursor: wait;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.tpay-spinner {
	width: 1.05em;
	height: 1.05em;
	flex: 0 0 auto;
	border: 2px solid currentColor;
	border-inline-start-color: transparent;
	border-radius: 50%;
	animation: tpay-spin .7s linear infinite;
}
@keyframes tpay-spin { to { transform: rotate( 360deg ); } }
@media ( prefers-reduced-motion: reduce ) { .tpay-spinner { animation-duration: 1.6s; } }
.tpay-free-notice { margin-top: 8px; font-size: 15px; opacity: .85; }

.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; }

/* Coupon field */
.tpay-coupon-row { display: flex; gap: 8px; align-items: stretch; }
.tpay-coupon-row .tpay-input { flex: 1; }
.tpay-coupon-apply { background: var(--tpay-btn-bg); color: var(--tpay-btn-text); border: none; border-radius: var(--tpay-radius, 8px); padding: 0 16px; cursor: pointer; font-weight: 600; }
.tpay-coupon-apply:hover { filter: brightness( .95 ); }
.tpay-coupon-msg { margin-top: 6px; font-size: 14px; min-height: 1em; }
.tpay-coupon-msg.tpay-msg-ok { color: #1e7e34; }
.tpay-coupon-msg.tpay-msg-error { color: #b0413a; }
/* Applied-coupon chip (WooCommerce-style): a removable tag shown after apply. */
.tpay-coupon-applied {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 6px;
	padding: 8px 12px;
	border-radius: var( --tpay-radius, 8px );
	background: var( --tpay-coupon-applied-bg, rgba( 30, 126, 52, .1 ) );
	color: var( --tpay-coupon-applied-color, #1e7e34 );
	font-weight: 600;
	font-size: 14px;
}
.tpay-coupon-remove {
	flex: 0 0 auto;
	background: none;
	border: 0;
	padding: 2px 6px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	color: var( --tpay-coupon-remove-color, #b0413a );
}
.tpay-coupon-remove:hover { opacity: .8; }

/* Order summary (shown before submit) */
.tpay-summary {
	margin: 6px 0 4px;
	padding: var( --tpay-summary-pad, 14px 16px );
	background: var( --tpay-summary-bg, #f7f9f9 );
	border: 1px solid var( --tpay-summary-border, #e2e4e7 );
	border-radius: var( --tpay-summary-radius, 8px );
	color: var( --tpay-summary-text, inherit );
}
.tpay-summary-title { font-weight: 700; margin-bottom: 8px; color: var( --tpay-summary-title, inherit ); }
.tpay-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.tpay-summary-discount .tpay-summary-val { color: var( --tpay-summary-discount, #1e7e34 ); }
.tpay-summary-grand {
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid var( --tpay-summary-border, #e2e4e7 );
	font-weight: 700;
	font-size: 1.08em;
	color: var( --tpay-summary-total, inherit );
}

/* Conference tickets — per-guest fields */
.tpay-guests { width: 100%; display: grid; grid-template-columns: repeat( var( --tpay-guest-cols, auto-fit ), minmax( min( 200px, 100% ), 1fr ) ); gap: var( --tpay-guest-gap, 14px ); }
.tpay-guest-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tpay-guest-head .tpay-guest-title { margin: 0; }
.tpay-guest-remove { width: 26px; height: 26px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #fdecea; color: #b0413a; font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tpay-guest-remove:hover { background: #f9d7d2; }
.tpay-guest {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var( --tpay-field-border, #dcdfe6 );
	border-radius: var( --tpay-radius, 8px );
	background: rgba( 0, 0, 0, .015 );
}
.tpay-guest .tpay-guest-head { margin-bottom: 0; }
.tpay-guest-title { font-weight: 700; margin-bottom: 0; }

/* Quantity stepper (− input +) */
.tpay-stepper { display: inline-flex; align-items: stretch; border: 1px solid var( --tpay-field-border, #dcdfe6 ); border-radius: var( --tpay-radius, 8px ); overflow: hidden; max-width: 170px; }
.tpay-stepper .tpay-step-input { flex: 0 0 auto; width: 64px; min-width: 56px; box-sizing: border-box; text-align: center; font-size: 16px; font-weight: 600; background: #fff; color: inherit; border: 0; border-radius: 0; margin: 0; padding: 8px 4px; -moz-appearance: textfield; }
.tpay-stepper .tpay-step-input::-webkit-outer-spin-button,
.tpay-stepper .tpay-step-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tpay-stepper .tpay-step-input:focus { outline: none; box-shadow: none; }
.tpay-step-btn { width: 44px; border: 0; background: var( --tpay-btn-bg, #2f5d62 ); color: var( --tpay-btn-text, #fff ); font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; user-select: none; }
.tpay-step-btn:hover { filter: brightness( .95 ); }
.tpay-step-btn:active { filter: brightness( .9 ); }

/* Per-product quantity cards */
.tpay-card-qty { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; }
/* The stepper keeps its own cursor — clicking it changes qty, not selection. */
.tpay-card-qty .tpay-qty-stepper, .tpay-card-qty .tpay-step-input { cursor: auto; }
.tpay-card-qty .tpay-qty-stepper { margin-top: 12px; }
.tpay-card-qty .tpay-card-title { margin-top: 6px; }

/* Additional-guest blocks */
.tpay-guest { width: 100%; box-sizing: border-box; }
.tpay-guest .tpay-field { width: 100%; }
.tpay-guest .tpay-input { width: 100%; box-sizing: border-box; }

/* Inline validation: red border + per-field message */
.tpay-input.tpay-invalid { border-color: #d63638; box-shadow: 0 0 0 1px #d63638; }
.tpay-input.tpay-invalid:focus { outline-color: #d63638; }
.tpay-field-error { font-size: 13px; margin-top: 2px; line-height: 1.3; }

/* ------------------------------------------------------------------ *
 * Consent checkboxes (terms / privacy) shown before the pay button.  *
 * The mark reuses the product "selection mark" variables, so the same *
 * Elementor controls style both. Link/text colours are their own vars.*
 * ------------------------------------------------------------------ */
.tpay-consents { display: block; margin: 2px 0; width: 100%; }
/* Layout is forced with !important so a theme or page-builder rule (generic
 * `label{display:block}`, a form plugin styling `input[type=checkbox]`, etc.)
 * can never push the checkbox onto its own line. Colours, fonts and sizes stay
 * overridable (they are plain properties / CSS vars, not forced here). */
.tpay-consent {
	position: relative;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	/* Center the box against the text so a tall inherited line-height (themes set
	 * `label{line-height:1}`, Elementor sets its own) can't leave the checkbox
	 * floating above the first line. Works at any font size. */
	align-items: center !important;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	margin: 8px 0;
	cursor: pointer;
	line-height: 1.4;
	color: var( --tpay-consent-text, inherit );
}
.tpay-consent .tpay-consent-input {
	position: absolute !important;
	inset-inline-start: 0;
	top: 50%;
	transform: translateY( -50% );
	width: var( --tpay-choice-size, 22px ) !important;
	height: var( --tpay-choice-size, 22px ) !important;
	max-width: var( --tpay-choice-size, 22px );
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
	flex: 0 0 auto;
}
.tpay-consent-check {
	position: static;
	flex: 0 0 auto !important;
	float: none !important;
	margin-top: 0;
	width: var( --tpay-choice-size, 22px );
	height: var( --tpay-choice-size, 22px );
	border-radius: 6px;
	border: 2px solid var( --tpay-check-border, #c7ccd4 );
	background: var( --tpay-check-bg-empty, #fff );
	color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc( var( --tpay-choice-size, 22px ) * .62 );
	font-weight: 700;
	line-height: 1;
	box-sizing: border-box;
	transition: background-color .15s, border-color .15s, color .15s;
}
.tpay-consent .tpay-consent-input:checked ~ .tpay-consent-check {
	border-color: var( --tpay-check-bg, var( --tpay-btn-bg ) );
	background: var( --tpay-check-bg, var( --tpay-btn-bg ) );
	color: var( --tpay-check-color, #fff );
}
.tpay-consent .tpay-consent-input:focus-visible ~ .tpay-consent-check {
	outline: 2px solid var( --tpay-check-bg, var( --tpay-btn-bg ) );
	outline-offset: 2px;
}
.tpay-consent.is-invalid .tpay-consent-check {
	border-color: #d63638;
	box-shadow: 0 0 0 2px rgba( 214, 54, 56, .2 );
}
.tpay-consent-text { flex: 1 1 auto !important; min-width: 0; width: auto !important; float: none !important; }
/* Scoped with .tpay-consent so it beats a theme's generic `a` link styles. */
.tpay-consent .tpay-consent-link {
	color: var( --tpay-consent-link, var( --tpay-btn-bg ) );
	/* Underline is off by default; the Elementor "Underline link" switch (or the
	   Design section) turns it on. The underline follows the link colour
	   (text-decoration-color: currentColor by default). */
	text-decoration: var( --tpay-consent-underline, none );
	text-decoration-color: currentColor;
}
.tpay-consent .tpay-consent-link:hover {
	color: var( --tpay-consent-link-hover, var( --tpay-consent-link, var( --tpay-btn-bg ) ) );
}

/* Consent modal: a terms/privacy page opened in a dialog (iframe). */
.tpay-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba( 15, 23, 42, .55 );
}
.tpay-modal[hidden] { display: none; }
.tpay-modal-box {
	background: #fff;
	border-radius: var( --tpay-modal-radius, 12px );
	width: min( 900px, 100% );
	height: min( 82vh, 940px );
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba( 0, 0, 0, .38 );
	animation: tpayModalIn .18s ease;
}
@keyframes tpayModalIn { from { opacity: 0; transform: translateY( 10px ) scale( .99 ); } to { opacity: 1; transform: none; } }
.tpay-modal-head { display: flex; justify-content: flex-end; padding: 6px; border-bottom: 1px solid #eef1f2; }
/* Scoped so the site theme's global button styles can't leak into the close
   button; colours are variables so Elementor (or the Design section) can set them. */
.tpay-modal .tpay-modal-close {
	border: 0;
	background: var( --tpay-modal-close-bg, #f1f3f4 );
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 12px;
	color: var( --tpay-modal-close-color, #333 );
	border-radius: var( --tpay-modal-close-radius, 8px );
	transition: background-color .15s ease, color .15s ease;
}
.tpay-modal .tpay-modal-close:hover {
	background: var( --tpay-modal-close-hover-bg, #e2e5e7 );
	color: var( --tpay-modal-close-hover-color, var( --tpay-modal-close-color, #333 ) );
}
.tpay-modal-frame { flex: 1 1 auto; width: 100%; border: 0; }
@media ( max-width: 600px ) {
	.tpay-modal { padding: 0; }
	.tpay-modal-box { width: 100%; height: 100%; border-radius: 0; }
}
/* Inline variant used in the Elementor editor to preview & style the dialog. */
.tpay-modal-inline { position: static; inset: auto; display: block; padding: 0; background: transparent; z-index: auto; }
.tpay-modal-inline .tpay-modal-box { width: 100%; max-width: 560px; height: auto; min-height: 220px; max-height: 460px; margin: 14px auto 0; box-shadow: 0 6px 22px rgba( 0, 0, 0, .14 ); animation: none; }
.tpay-modal-inline .tpay-modal-body { padding: 20px; overflow: auto; color: #333; }
.tpay-modal-inline .tpay-modal-body h3 { margin: 0 0 10px; font-size: 20px; }
.tpay-modal-inline .tpay-modal-body p { margin: 0 0 10px; line-height: 1.6; }
.tpay-modal-inline-label { display: block; margin: 14px 0 0; text-align: center; font-size: 12px; color: #8a949a; }
