/* 2BG Product Connect – frontend. Inherits the theme font. */
.tbpc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 12px 0 18px;
	clear: both;
}
.tbpc-btn {
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	transition: opacity .15s ease, box-shadow .15s ease;
}
.tbpc-btn[hidden] { display: none !important; }
.tbpc-btn--stock { background: var(--tbpc-stock-bg, #1f2937); color: var(--tbpc-stock-fg, #fff); }
.tbpc-btn--quote { background: var(--tbpc-quote-bg, #1f2937); color: var(--tbpc-quote-fg, #fff); }
.tbpc-btn:hover { opacity: .9; }
.tbpc-btn:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(0,0,0,.15); }
.tbpc-btn[disabled] { opacity: .6; cursor: progress; }

.tbpc-price-on-request { font-weight: 600; }

/* Blocked purchase: hide the variation quantity / add-to-cart row (purchase is also blocked on the server). */
.tbpc-quote-only .single_variation_wrap .woocommerce-variation-add-to-cart { display: none !important; }

/* Modal */
html.tbpc-modal-open { overflow: hidden; }
.tbpc-modal[hidden] { display: none !important; }
.tbpc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: inherit;
}
.tbpc-modal__overlay { position: absolute; inset: 0; background: rgba(17, 24, 39, .55); }
.tbpc-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fff;
	color: #1f2937;
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}
.tbpc-modal__dialog:focus { outline: none; }
.tbpc-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
	padding: 0;
}
.tbpc-modal__close:focus-visible { outline: 2px solid currentColor; }
.tbpc-modal__product { display: flex; gap: 12px; align-items: center; margin: 0 40px 12px 0; }
.tbpc-modal__img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.tbpc-modal__name { margin: 0; font-weight: 600; }
.tbpc-modal__attrs { margin: 2px 0 0; font-size: 13px; color: #4b5563; }
.tbpc-modal__attrs:empty { display: none; }
.tbpc-modal__title { font-family: inherit; font-size: 1.2em; margin: 8px 0 4px; line-height: 1.3; }
.tbpc-modal__intro { margin: 0 0 14px; color: #4b5563; }

.tbpc-form[hidden] { display: none; }
.tbpc-field { margin: 0 0 12px; }
.tbpc-field label { display: block; font-weight: 600; margin: 0 0 4px; font-size: 14px; }
.tbpc-field input,
.tbpc-field textarea {
	font: inherit;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #9ca3af;
	border-radius: 6px;
	background: #fff;
	color: #111827;
	min-height: 44px;
}
.tbpc-field input:focus,
.tbpc-field textarea:focus { outline: 2px solid var(--tbpc-stock-bg, #1f2937); outline-offset: 1px; border-color: transparent; }
.tbpc-field [aria-invalid="true"] { border-color: #b91c1c; }
.tbpc-field__error { margin: 4px 0 0; color: #b91c1c; font-size: 13px; }
.tbpc-field__error:empty { display: none; }
.tbpc-req { color: #b91c1c; }
.tbpc-form .tbpc-submit { width: 100%; margin-top: 4px; }
.tbpc-consent { font-size: 12px; color: #4b5563; margin: 10px 0 0; }
.tbpc-consent a { color: inherit; text-decoration: underline; }

.tbpc-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.tbpc-status { margin-top: 12px; font-size: 14px; border-radius: 6px; }
.tbpc-status:empty { display: none; }
.tbpc-status:focus { outline: none; }
.tbpc-status--info { padding: 10px 12px; background: #eff6ff; color: #1e3a8a; }
.tbpc-status--success { padding: 10px 12px; background: #ecfdf5; color: #065f46; }
.tbpc-status--error { padding: 10px 12px; background: #fef2f2; color: #991b1b; }

@media (max-width: 480px) {
	.tbpc-modal { align-items: flex-end; padding: 0; }
	.tbpc-modal__dialog { max-width: none; border-radius: 12px 12px 0 0; max-height: 92vh; padding: 20px 16px 24px; }
	.tbpc-actions .tbpc-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.tbpc-btn { transition: none; }
}

/* Fallback / theme integration */
.tbpc-quote-marker, .tbpc-anchor { display: none !important; }
.tbpc-theme-quote { cursor: pointer; }
.tbpc-loop-quote { text-align: center; }
