/**
 * WooCommerce B2B Quoting Engine — Frontend Quote Cart Styles
 *
 * Applied to the [b2b_quote_cart] shortcode output and the
 * "Add to Quote Request" buttons. All colors reference CSS
 * custom properties injected by class-b2b-settings.php.
 *
 * @package WooCommerce_B2B_Quoting_Engine
 */

/* ─── Container ──────────────────────────────────────── */

#b2b-quote-cart-container {
	max-width: 800px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Empty State ────────────────────────────────────── */

.b2b-empty-cart {
	padding: 40px 24px;
	background: var(--b2b-bg-subtle);
	border: 1px solid var(--b2b-border);
	border-radius: var(--b2b-radius);
	text-align: center;
}

.b2b-empty-cart p {
	color: #6c757d;
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
}

.b2b-empty-cart strong {
	color: var(--b2b-primary);
}

/* ─── Quote Items Table ──────────────────────────────── */

#b2b-quote-items-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--b2b-radius);
	overflow: hidden;
	border: 1px solid var(--b2b-border);
	margin-bottom: 28px;
}

#b2b-quote-items-table thead th {
	background: var(--b2b-secondary);
	color: #fff;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	text-align: left;
	border: none;
}

#b2b-quote-items-table thead th:nth-child(2),
#b2b-quote-items-table thead th:nth-child(3) {
	text-align: center;
}

#b2b-quote-items-table tbody td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--b2b-border);
	vertical-align: middle;
	font-size: 14px;
}

#b2b-quote-items-table tbody tr:last-child td {
	border-bottom: none;
}

#b2b-quote-items-table tbody tr {
	transition: var(--b2b-transition);
}

#b2b-quote-items-table tbody tr:hover {
	background: var(--b2b-primary-light);
}

/* Product cell */
.b2b-product-cell {
	display: flex;
	align-items: center;
	gap: 12px;
}

.b2b-product-cell img {
	border-radius: var(--b2b-radius-sm);
	flex-shrink: 0;
}

.b2b-product-cell a {
	color: var(--b2b-primary);
	text-decoration: none;
	font-weight: 500;
}

.b2b-product-cell a:hover {
	text-decoration: underline;
}

/* Quantity cell */
.b2b-qty-cell {
	text-align: center;
	font-weight: 600;
	font-size: 15px;
}

/* Remove button */
.b2b-remove-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fee;
	color: #d63638;
	text-decoration: none;
	font-size: 16px;
	font-weight: 700;
	transition: var(--b2b-transition);
	line-height: 1;
}

.b2b-remove-item:hover {
	background: #d63638;
	color: #fff;
}

/* ─── Quote Submission Form ──────────────────────────── */

#b2b-quote-submit-form {
	background: var(--b2b-bg-subtle);
	padding: 28px;
	border-radius: var(--b2b-radius);
	border: 1px solid var(--b2b-border);
}

#b2b-quote-submit-form h3 {
	margin-top: 0;
	font-size: 20px;
	color: var(--b2b-secondary);
	padding-bottom: 12px;
	border-bottom: 1px solid var(--b2b-border);
	margin-bottom: 20px;
}

.b2b-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

@media (max-width: 600px) {
	.b2b-form-grid {
		grid-template-columns: 1fr;
	}
}

.b2b-field {
	margin-bottom: 16px;
}

.b2b-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
	color: var(--b2b-secondary);
}

.b2b-field label .b2b-required {
	color: #d63638;
}

.b2b-field input,
.b2b-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--b2b-border);
	border-radius: var(--b2b-radius-sm);
	font-size: 14px;
	transition: var(--b2b-transition);
	outline: none;
	background: #fff;
	box-sizing: border-box;
}

.b2b-field input:focus,
.b2b-field textarea:focus {
	border-color: var(--b2b-primary);
	box-shadow: 0 0 0 3px var(--b2b-primary-light);
}

.b2b-field textarea {
	resize: vertical;
	min-height: 100px;
}

/* Submit button */
.b2b-submit-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 32px;
	background: var(--b2b-action);
	color: #fff;
	border: none;
	border-radius: var(--b2b-radius-sm);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: var(--b2b-transition);
}

.b2b-submit-btn:hover {
	background: var(--b2b-action-hover);
	box-shadow: var(--b2b-shadow);
}

.b2b-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ─── "Add to Quote" Button (Loop + Single) ──────────── */

.b2b-add-to-quote {
	background-color: var(--b2b-primary) !important;
	color: #fff !important;
	border-color: var(--b2b-primary) !important;
	border-radius: var(--b2b-radius-sm) !important;
	font-weight: 600 !important;
	transition: var(--b2b-transition) !important;
}

.b2b-add-to-quote:hover {
	opacity: 0.9;
	box-shadow: var(--b2b-shadow);
}

.b2b-add-to-quote.loading {
	opacity: 0.7;
	pointer-events: none;
}

.b2b-add-to-quote.b2b-added {
	background-color: var(--b2b-action) !important;
	border-color: var(--b2b-action) !important;
}

/* ─── Success Message ────────────────────────────────── */

.b2b-success-message {
	padding: 28px;
	background: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: var(--b2b-radius);
	text-align: center;
}

.b2b-success-message h3 {
	color: #155724;
	margin: 0 0 8px;
}

.b2b-success-message p {
	color: #155724;
	margin: 0;
}
