/*!
 * Smart Quote Basket - front end styles
 * Colours: navy #0e4f8b (Add to Quote), orange #c9500c (Send an enquiry).
 * Change the variables below to re-colour everything.
 */
:root {
	--smart-main-top: #1565a8;
	--smart-main: #0e4f8b;
	--smart-main-edge: #082f55;
	--smart-main-border: #0a3a68;
	--smart-accent-top: #e8630f;
	--smart-accent: #c9500c;
	--smart-accent-edge: #8a3407;
	--smart-accent-border: #a84209;
	--smart-text: #1f2937;
	--smart-line: #e3e7ee;
	--smart-error: #b3261e;
	--smart-ok: #1a7f37;
}

/* ---------- Add to Quote button (navy, 3D) ---------- */

.smart-quote-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	vertical-align: top;
	margin: 0;
}

.smart-add-quote,
.smart-enquire,
.smart-btn {
	display: inline-block;
	position: relative;
	box-sizing: border-box;
	padding: 15px 30px !important;
	min-height: 52px;
	margin: 8px 14px 14px 0 !important;
	border-radius: 10px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.4px;
	text-decoration: none !important;
	text-transform: none;
	text-align: center;
	cursor: pointer;
	color: #fff !important;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
	-webkit-tap-highlight-color: transparent;
}

.smart-add-quote {
	background: linear-gradient(180deg, var(--smart-main-top) 0%, var(--smart-main) 100%) !important;
	border: 1px solid var(--smart-main-border) !important;
	box-shadow:
		0 6px 0 var(--smart-main-edge),
		0 12px 18px rgba(0, 0, 0, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.smart-enquire,
.smart-btn {
	background: linear-gradient(180deg, var(--smart-accent-top) 0%, var(--smart-accent) 100%) !important;
	border: 1px solid var(--smart-accent-border) !important;
	box-shadow:
		0 6px 0 var(--smart-accent-edge),
		0 12px 18px rgba(0, 0, 0, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.smart-add-quote:hover,
.smart-enquire:hover,
.smart-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.08);
}

.smart-add-quote:active,
.smart-enquire:active,
.smart-btn:active {
	transform: translateY(5px);
}

.smart-add-quote:active {
	box-shadow: 0 1px 0 var(--smart-main-edge), 0 3px 6px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

.smart-enquire:active,
.smart-btn:active {
	box-shadow: 0 1px 0 var(--smart-accent-edge), 0 3px 6px rgba(0, 0, 0, 0.28), inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

/* Already in the basket: turn green so the visitor sees it worked */
.smart-add-quote.is-added {
	background: linear-gradient(180deg, #2f9e57 0%, #1a7f37 100%) !important;
	border-color: #12602a !important;
	box-shadow: 0 6px 0 #0d4a20, 0 12px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.smart-add-quote:disabled,
.smart-enquire:disabled,
.smart-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.smart-add-quote:focus-visible,
.smart-enquire:focus-visible,
.smart-btn:focus-visible,
.smart-quote-pill:focus-visible {
	outline: 3px solid #ffd27a;
	outline-offset: 3px;
}

/* ---------- Header link and floating pill ---------- */

.smart-quote-link {
	font-weight: 600;
	text-decoration: none;
}

.smart-quote-pill {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 9998;
	padding: 13px 22px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--smart-accent-top) 0%, var(--smart-accent) 100%);
	border: 1px solid var(--smart-accent-border);
	box-shadow: 0 5px 0 var(--smart-accent-edge), 0 10px 18px rgba(0, 0, 0, 0.3);
	color: #fff !important;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none !important;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.smart-quote-pill[hidden] {
	display: none !important;
}

/* ---------- Basket page ---------- */

.smart-quote-app {
	max-width: 960px;
	margin: 0 auto;
	color: var(--smart-text);
}

.smart-q-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 28px;
	font-size: 15px;
}

.smart-q-table th,
.smart-q-table td {
	padding: 12px 10px;
	border-bottom: 1px solid var(--smart-line);
	text-align: left;
	vertical-align: middle;
}

.smart-q-table thead th {
	background: #f3f6fa;
	font-weight: 700;
}

.smart-q-prod {
	display: flex;
	align-items: center;
	gap: 12px;
}

.smart-q-prod img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--smart-line);
	flex: 0 0 auto;
}

.smart-q-prod a {
	font-weight: 600;
	text-decoration: none;
}

.smart-q-col-qty {
	width: 130px;
}

.smart-q-col-rm {
	width: 48px;
	text-align: center !important;
}

.smart-q-qty {
	width: 100px;
	padding: 8px 10px;
	border: 1px solid #c9d1dc;
	border-radius: 6px;
	font-size: 15px;
}

.smart-q-remove {
	width: 34px;
	height: 34px;
	line-height: 1;
	border: 1px solid #c9d1dc;
	border-radius: 50%;
	background: #fff;
	color: #555;
	font-size: 20px;
	cursor: pointer;
	padding: 0;
}

.smart-q-remove:hover {
	background: #fee2e2;
	color: var(--smart-error);
	border-color: var(--smart-error);
}

.smart-q-form h3 {
	margin: 0 0 14px;
}

.smart-q-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
}

.smart-q-wide {
	grid-column: 1 / -1;
}

.smart-q-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
}

.smart-q-field input,
.smart-q-field textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid #c9d1dc;
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
}

.smart-q-field input:focus,
.smart-q-field textarea:focus {
	border-color: var(--smart-main);
	outline: 2px solid rgba(21, 101, 168, 0.25);
	outline-offset: 0;
}

.smart-q-field .is-invalid {
	border-color: var(--smart-error);
}

.smart-q-field-error {
	display: block;
	min-height: 0;
	margin-top: 4px;
	color: var(--smart-error);
	font-size: 13px;
}

/* Honeypot: invisible to people, visible to bots */
.smart-q-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.smart-q-privacy {
	margin: 18px 0 8px;
	font-size: 13px;
	color: #5b6573;
}

.smart-q-status {
	margin: 10px 0 0;
}

.smart-q-status.is-error {
	padding: 10px 14px;
	border-radius: 8px;
	background: #fee2e2;
	color: var(--smart-error);
	font-weight: 600;
}

.smart-q-empty,
.smart-q-thanks {
	padding: 40px 20px;
	text-align: center;
}

.smart-q-thanks {
	border: 2px solid var(--smart-ok);
	border-radius: 12px;
	background: #f0fdf4;
}

.smart-q-ref {
	font-size: 18px;
	font-weight: 700;
}

.smart-q-error {
	color: var(--smart-error);
	font-weight: 600;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	/* Product page: Send an enquiry + Add to Quote share the row equally, and stack full width when the column is narrow. */
	.smart-quote-wrap {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		width: 100%;
		margin: 8px 0 16px;
	}

	.smart-quote-wrap .smart-add-quote,
	.smart-quote-wrap .smart-enquire {
		flex: 1 1 140px !important;
		width: auto !important;
		min-width: 0;
		min-height: 48px;
		margin: 0 0 6px 0 !important;
		padding: 12px 10px !important;
		font-size: 15px !important;
		letter-spacing: 0.2px;
		white-space: normal;
	}

	/* Basket page buttons (Send Quote Request, Browse products) stay full width. */
	.smart-btn {
		display: block;
		width: 100%;
		margin: 8px 0 16px 0 !important;
	}

	.smart-q-grid {
		grid-template-columns: 1fr;
	}

	.smart-q-table thead {
		display: none;
	}

	.smart-q-table,
	.smart-q-table tbody,
	.smart-q-table tr,
	.smart-q-table td {
		display: block;
		width: 100%;
	}

	.smart-q-table tr {
		padding: 10px 0;
		border-bottom: 1px solid var(--smart-line);
	}

	.smart-q-table td {
		border: 0;
		padding: 6px 0;
	}

	.smart-q-col-sku {
		display: none !important;
	}

	.smart-q-col-qty,
	.smart-q-col-rm {
		width: auto;
		text-align: left !important;
	}

	.smart-quote-pill {
		left: 12px;
		bottom: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.smart-add-quote,
	.smart-enquire,
	.smart-btn {
		transition: none;
	}

	.smart-add-quote:hover,
	.smart-enquire:hover,
	.smart-btn:hover {
		transform: none;
	}
}
