/* Phase 8 — Rolling Quote styles. Per-product Add-to-Quote button,
 * /quote review page, and header chip. Single-site Bricks-only deployment
 * per project memory. Designer can iterate via a Phase 8.x polish phase. */

/* =====================================================================
 * Per-product Add-to-Quote button (D-13 — smaller secondary CTA below
 * Add-to-Cart). Visually subordinate to WC's primary .single_add_to_cart_button
 * so cart conversion stays the primary action.
 * ===================================================================== */
.woodfold-add-to-quote {
	display: inline-block;
	margin-top: 0.5em;
	padding: 0.5em 1em;
	background: transparent;
	color: #333;
	border: 1px solid #ccc;
	font-size: 0.9em;
	cursor: pointer;
	text-decoration: none;
}
.woodfold-add-to-quote:hover {
	background: #f5f5f5;
	border-color: #999;
}
.woodfold-add-to-quote[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* =====================================================================
 * /quote review page layout
 * ===================================================================== */
.woodfold-quote-page {
	max-width: 960px;
	margin: 2em auto;
	padding: 1em;
}

.woodfold-quote-lines {
	display: flex;
	flex-direction: column;
	gap: 1.5em;
}

.woodfold-quote-line {
	padding: 1em;
	border: 1px solid #eee;
	background: #fafafa;
}

.woodfold-quote-line-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1em;
	margin-top: 0.5em;
	padding-top: 0.5em;
	border-top: 1px solid #e0e0e0;
}

.woodfold-quote-line-actions input[type="number"] {
	width: 5em;
}

.woodfold-quote-qty-label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.95em;
}

.woodfold-quote-remove {
	background: transparent;
	color: #c33;
	border: 1px solid #c33;
	padding: 0.4em 0.9em;
	cursor: pointer;
	font-size: 0.9em;
}
.woodfold-quote-remove:hover {
	background: #fdf2f2;
}

.woodfold-quote-move-form {
	display: inline-block;
	margin: 0;
}

.woodfold-quote-move-to-cart {
	background: transparent;
	color: #333;
	border: 1px solid #999;
	padding: 0.4em 0.9em;
	cursor: pointer;
	font-size: 0.9em;
}
.woodfold-quote-move-to-cart:hover {
	background: #f5f5f5;
}

.woodfold-quote-total {
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 2px solid #333;
	font-size: 1.2em;
	text-align: right;
}

.woodfold-quote-submit-trigger {
	margin-top: 1.5em;
	/* Inherit site primary button styling via the .button class on the element */
}

.woodfold-quote-empty {
	text-align: center;
	padding: 3em 1em;
}
.woodfold-quote-empty h2 {
	margin: 0 0 0.5em;
}
.woodfold-quote-empty p {
	margin: 0 0 1.5em;
	color: #666;
}

/* =====================================================================
 * Sticky side tab styles live in assets/css/woodfold-quote-tab.css
 * (loaded on ALL pages). Full quote CSS is only loaded on product +
 * /quote/ pages. See class-woodfold-frontend.php enqueue_quote_tab_css().
 * ===================================================================== */

/* =====================================================================
 * Quote lead-capture modal (BEM pattern from Phase 7 proposal modal)
 * ===================================================================== */
.woodfold-quote-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.woodfold-quote-modal[hidden] {
	display: none !important;
}

.woodfold-quote-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.woodfold-quote-modal__dialog {
	position: relative;
	z-index: 1;
	background: #fff;
	max-width: 480px;
	width: calc(100% - 24px);
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	border-radius: 6px;
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.woodfold-quote-modal__close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: transparent;
	border: 0;
	font-size: 28px;
	cursor: pointer;
	color: #666;
	line-height: 1;
	padding: 0;
}
.woodfold-quote-modal__close:hover,
.woodfold-quote-modal__close:focus {
	color: #000;
}

.woodfold-quote-modal__title {
	margin: 0 0 16px 0;
	font-size: 20px;
	color: #1f5c8b;
}

.woodfold-quote-modal__field {
	margin: 0 0 12px 0;
}
.woodfold-quote-modal__field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	color: #333;
}
.woodfold-quote-modal__field input[type="text"],
.woodfold-quote-modal__field input[type="email"],
.woodfold-quote-modal__field input[type="tel"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	color: #333;
	box-sizing: border-box;
}

.woodfold-quote-modal__error {
	background: #fdecea;
	border: 1px solid #c33;
	color: #900;
	padding: 8px 12px;
	border-radius: 4px;
	margin: 8px 0 12px 0;
	font-size: 14px;
}
.woodfold-quote-modal__error[hidden] {
	display: none !important;
}

.woodfold-quote-modal__submit {
	margin: 16px 0 0 0;
}
.woodfold-quote-modal__submit .button {
	background: #1f5c8b;
	color: #fff;
	padding: 10px 24px;
	font-weight: 600;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}
.woodfold-quote-modal__submit .button:hover,
.woodfold-quote-modal__submit .button:focus {
	background: #174970;
}
.woodfold-quote-modal__submit .button[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.woodfold-quote-modal__success {
	text-align: center;
	padding: 24px 16px;
}
.woodfold-quote-modal__success[hidden] {
	display: none !important;
}
.woodfold-quote-modal__success h3 {
	color: #1f5c8b;
	margin-bottom: 12px;
}
.woodfold-quote-modal__success p {
	color: #555;
	margin-bottom: 16px;
}

.woodfold-quote-modal__view-link {
	display: inline-block;
	background: #1f5c8b;
	color: #fff !important;
	padding: 10px 24px;
	text-decoration: none;
	font-weight: 600;
	border-radius: 4px;
}
.woodfold-quote-modal__view-link:hover {
	background: #174970;
}

/* =====================================================================
 * Mobile responsive (Phase 5 convention — 968px breakpoint)
 * ===================================================================== */
@media (max-width: 968px) {
	.woodfold-quote-line-actions {
		flex-wrap: wrap;
	}
	.woodfold-quote-page {
		margin: 1em auto;
	}
	.woodfold-quote-total {
		text-align: left;
	}
}

@media (max-width: 600px) {
	.woodfold-quote-modal__dialog {
		padding: 16px;
	}
	.woodfold-add-to-quote {
		display: block;
		margin: 8px 0 0 0;
		width: 100%;
	}
}
