/* =========================================================
   Request a Quote — frontend styles
   Uses Woodmart's --wd-primary-color when available.
   ========================================================= */

:root {
	--raq-accent: var(--wd-primary-color, #83b735);
	--raq-border: #e6e6e6;
	--raq-radius: 12px;
	--raq-text-muted: #8a8a8a;
}

/* ---------- Add-to-quote button (product page) ---------- */

.raq-button-wrapper {
	display: inline-block;
	vertical-align: middle;
}

.raq-add-to-quote {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none;
}

.raq-add-to-quote.loading {
	opacity: 0.6;
	pointer-events: none;
}

.raq-add-to-quote.loading .raq-btn-label::after {
	content: "…";
}

.raq-feedback {
	display: none;
	margin-top: 8px;
	font-size: 14px;
	color: #0f834d;
}

.raq-feedback a {
	text-decoration: underline;
}

.raq-feedback-error {
	color: #d63638;
}

/* ---------- Quote count (header) ---------- */

.raq-count-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
}

.raq-count-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 50%;
	background: var(--raq-accent);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

/* =========================================================
   Quote page — two-column layout
   ========================================================= */

.raq-quote-page {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 48px;
	align-items: start;
}

.raq-section-title {
	margin: 0 0 20px;
	font-size: 20px;
	line-height: 1.3;
}

/* ---------- Sidebar summary card ---------- */

.raq-sidebar {
	position: sticky;
	top: 32px;
}

.raq-summary-card {
	background: #fafafa;
	border: 1px solid var(--raq-border);
	border-radius: var(--raq-radius);
	padding: 28px;
}

.raq-summary-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.raq-summary-head .raq-section-title {
	margin: 0;
	font-size: 18px;
}

.raq-summary-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 8px;
	border-radius: 13px;
	background: var(--raq-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.raq-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.raq-items .raq-item {
	display: flex;
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid var(--raq-border);
}

.raq-items .raq-item:last-child {
	border-bottom: none;
}

.raq-item-thumb {
	flex: 0 0 64px;
}

.raq-item-thumb img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--raq-border);
	border-radius: 8px;
	padding: 4px;
	display: block;
}

.raq-item-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.raq-item-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	color: inherit;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.raq-item-name:hover {
	color: var(--raq-accent);
}

.raq-sku {
	font-size: 12px;
	color: var(--raq-text-muted);
}

.raq-item-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 8px;
}

/* Quantity stepper */

.raq-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--raq-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.raq-stepper .raq-step {
	width: 30px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	color: #555;
	padding: 0;
	transition: background 0.15s ease;
}

.raq-stepper .raq-step:hover {
	background: #f0f0f0;
}

.raq-stepper .raq-qty {
	width: 42px;
	height: 32px;
	border: none;
	border-left: 1px solid var(--raq-border);
	border-right: 1px solid var(--raq-border);
	text-align: center;
	font-size: 14px;
	background: #fff;
	padding: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.raq-stepper .raq-qty::-webkit-outer-spin-button,
.raq-stepper .raq-qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.raq-stepper .raq-qty:focus {
	outline: none;
}

/* Remove button */

.raq-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: #b5b5b5 !important;
	transition: all 0.2s ease;
}

.raq-remove:hover {
	background: #fdecec;
	color: #d63638 !important;
}

.raq-summary-note {
	margin: 18px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--raq-border);
	font-size: 13px;
	line-height: 1.6;
	color: var(--raq-text-muted);
}

/* ---------- Form ---------- */

.raq-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px 20px;
}

.raq-field {
	margin: 0;
	display: block;
}

.raq-field-full {
	grid-column: 1 / -1;
}

.raq-form label {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 500;
}

.raq-form .required {
	color: #d63638;
	text-decoration: none;
	border: none;
	margin-left: 2px;
}

.raq-form input.input-text,
.raq-form textarea.input-text {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--raq-border);
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
	font-size: 15px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.raq-form input.input-text:focus,
.raq-form textarea.input-text:focus {
	outline: none;
	border-color: var(--raq-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--raq-accent) 15%, transparent);
}

.raq-form textarea.input-text {
	min-height: 110px;
	resize: vertical;
}

.raq-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 0;
	overflow: hidden;
}

.raq-submit-row {
	margin: 28px 0 0;
}

.raq-submit {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	padding: 14px 32px !important;
}

/* ---------- Notices / empty state ---------- */

.raq-notice {
	margin-bottom: 30px;
}

.raq-notice ul {
	margin: 0;
	list-style: none;
}

.raq-empty {
	text-align: center;
	padding: 60px 0;
	color: var(--raq-text-muted);
}

.raq-empty svg {
	margin-bottom: 14px;
	opacity: 0.4;
}

.raq-empty p {
	margin-bottom: 22px;
	font-size: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
	.raq-quote-page {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	/* Summary first on mobile, form below (like mobile checkouts) */
	.raq-sidebar {
		order: -1;
		position: static;
	}
}

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

	.raq-summary-card {
		padding: 20px;
	}
}
