/* ─── Order Summary Block ─────────────────────────────────────────────────── */

.bfp-order-summary {
	margin-top: 8px;
}

.bfp-order-summary .boldform-lite-form__label {
	font-weight: 600;
	margin-bottom: 10px;
}

/* Surface + accent track the active Design Theme via the --bf-* vars the form
   wrapper carries (built by Lite's build_form_style_block). Accent resolves
   button bg → focus colour → neutral, matching Lite's --bf-choice-accent-r
   convention (and NOTE: on the front end --bf-focus-color is ALWAYS emitted,
   defaulting to teal, so button-bg MUST come first or non-blue themes go teal). */
.bfp-table-wrap {
	border: 1px solid var(--bf-field-border, #e9ecef);
	border-radius: var(--bf-field-radius, 8px);
	overflow: hidden;
	margin-bottom: 16px;
	background: var(--bf-field-bg, #fff);
}

.bfp-order-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	line-height: 1.5;
	margin:0
}

/* Header */
.bfp-order-table thead tr {
	background: var(--bf-field-bg, #f8f9fa);
	border-bottom: 1px solid var(--bf-field-border, #e9ecef);
}

.bfp-order-table thead th {
	padding: 9px 14px;
	font-weight: 600;
	color: var(--bf-label-color, #6b7280);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .04em;
	white-space: nowrap;
}

.bfp-order-table thead th.bfp-col-price,
.bfp-order-table thead th.bfp-col-qty,
.bfp-order-table thead th.bfp-col-total {
	text-align: right;
}

/* Body rows */
.bfp-order-table tbody tr {
	border-bottom: 1px solid var(--bf-field-border, #f3f4f6);
	transition: background .1s;
}

.bfp-order-table tbody tr:last-child {
	border-bottom: none;
}

.bfp-order-table tbody td {
	padding: 11px 14px;
	color: var(--bf-field-text, #374151);
	vertical-align: middle;
}

.bfp-col-item {
	font-weight: 500;
}

.bfp-col-price,
.bfp-col-qty,
.bfp-col-total {
	text-align: right;
	white-space: nowrap;
	color: var(--bf-field-text, #4b5563);
}

.bfp-line-total {
	font-weight: 500;
	color: var(--bf-field-text, #111827);
}

/* Footer total row */
.bfp-order-table tfoot tr {
	background: var(--bf-field-bg, #f8f9fa);
	border-top: 1px solid var(--bf-field-border, #e9ecef);
}

.bfp-order-table tfoot td {
	padding: 12px 14px;
}

.bfp-total-label {
	text-align: right;
	font-weight: 600;
	color: var(--bf-label-color, #374151);
	font-size: 13px;
}

.bfp-total-value {
	text-align: right;
	white-space: nowrap;
}

.bfp-grand-total {
	font-size: 17px;
	font-weight: 700;
	color: var(--bf-button-bg, var(--bf-focus-color, #111827));
}

/* ─── Gateway Section ─────────────────────────────────────────────────────── */

.bfp-gateway-ui {
	margin-top: 4px;
}

/* ─── Stripe Elements ─────────────────────────────────────────────────────── */

.bfp-stripe-elements {
	padding: 14px;
	border: 1px solid var(--bf-field-border, #d1d5db);
	border-radius: var(--bf-field-radius, 8px);
	background: var(--bf-field-bg, #fff);
	min-height: 54px;
}

.bfp-stripe-elements iframe {
	width: 100% !important;
}

/* ─── Payment Error ───────────────────────────────────────────────────────── */

.bfp-payment-error {
	margin-top: 10px;
	padding: 10px 14px;
	background: #fef2f2;
	border: 1px solid var(--bf-error-color, #fca5a5);
	border-radius: 6px;
	color: var(--bf-error-color, #dc2626);
	font-size: 13px;
}

/* ─── Payment Unavailable Notice ──────────────────────────────────────────── */

.bfp-payment-notice {
	margin-top: 4px;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.5;
}

.bfp-payment-notice p {
	margin: 0 0 6px;
}

.bfp-payment-notice p:last-child {
	margin-bottom: 0;
}

/* Admin-only: actionable amber notice with a link to Payment Settings. */
.bfp-payment-notice--admin {
	background: #fffbeb;
	border: 1px solid #fcd34d;
	color: #92400e;
}

.bfp-payment-notice--admin a {
	color: #92400e;
	font-weight: 600;
	text-decoration: underline;
}

.bfp-payment-notice__meta {
	font-size: 11px;
	opacity: 0.75;
}

/* Visitor-facing: neutral, non-alarming. */
.bfp-payment-notice--visitor {
	background: var(--bf-field-bg, #f9fafb);
	border: 1px solid var(--bf-field-border, #e5e7eb);
	color: var(--bf-label-color, #4b5563);
}

/* ─── PayPal Smart Buttons ────────────────────────────────────────────────── */

.bfp-paypal-buttons {
	margin-top: 8px;
	min-height: 45px;
}

/* When the buttons render, JS hides the fallback notice + native submit; give the
   button a little breathing room above whatever follows in the form. */
.bfp-paypal-buttons:not(:empty) {
	margin-bottom: 6px;
}

/* ─── PayPal Redirect Notice (fallback) ───────────────────────────────────── */

.bfp-paypal-notice {
	margin-top: 4px;
	padding: 12px 14px;
	border: 1px solid var(--bf-field-border, #e5e7eb);
	border-radius: 8px;
	background: var(--bf-field-bg, #f9fafb);
	color: var(--bf-label-color, #4b5563);
	font-size: 13px;
	line-height: 1.5;
}

.bfp-paypal-notice p {
	margin: 0;
}

/* ─── Processing Spinner ──────────────────────────────────────────────────── */

.boldform-payment-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid #d1d5db;
	border-top-color: var(--bf-button-bg, var(--bf-focus-color, #2f80ed));
	border-radius: 50%;
	animation: bfp-spin .7s linear infinite;
	display: inline-block;
	vertical-align: middle;
	margin-right: 6px;
}

@keyframes bfp-spin {
	to { transform: rotate(360deg); }
}

/* ─── Product Field ───────────────────────────────────────────────────────── */

.bfp-product-price {
	font-weight: 600;
	color: var(--bf-button-bg, var(--bf-focus-color, #0d9488));
	white-space: nowrap;
}

/* ─── Custom Amount Field ─────────────────────────────────────────────────── */

.bfp-amount-input-wrap,
.boldform-amount-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	width: 100%;
}

.bfp-currency-symbol,
.boldform-amount-symbol {
	position: absolute;
	left: 12px;
	font-weight: 600;
	color: var(--bf-field-text, #374151);
	pointer-events: none;
	font-size: 14px;
	line-height: 1;
	z-index: 1;
}

.bfp-amount-input,
.boldform-amount-input {
	padding-left: 28px !important;
}