/* Restyles the WPC Request a Quote plugin's quote review page
   ([wpcrq_quote_page] shortcode) to match the Playing Kit mockup's design
   system - same tokens as goal-circle-product-cards/assets/css/product-cards.css.
   The mockup itself has no basket/cart screen to copy pixel-for-pixel, so this
   extends the same type/color language consistently instead. */

#wpcrq-quote-page {
	--qp-plum: #2A1633;
	--qp-chalk: #FBF7F1;
	--qp-aqua: #12B3A6;
	--qp-aqua-deep: #0B7F76;
	--qp-ink-70: rgba(42, 22, 51, .72);
	--qp-line: rgba(42, 22, 51, .12);
	--qp-disp: 'Josefin Sans', sans-serif;
	--qp-ui: 'Jost', sans-serif;

	font-family: var(--qp-ui) !important;
	color: var(--qp-plum);
	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 48px) 20px;
}

#wpcrq-quote-page h3 {
	font-family: var(--qp-disp) !important;
	font-size: clamp(20px, 2vw, 26px) !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: var(--qp-plum) !important;
	margin: 0 0 20px !important;
}

#wpcrq-quote-page .wpcrq-quote-page.wpcrq-layout-right {
	gap: clamp(20px, 3vw, 40px);
	align-items: flex-start;
}

/* Table + form panels - same card language as the product cards (white,
   rounded, thin plum-tinted border) instead of the plugin's flat grey box. */
#wpcrq-quote-page .wpcrq-quote-table-wrapper,
#wpcrq-quote-page .wpcrq-quote-form-wrapper {
	background: #fff !important;
	border: 1px solid var(--qp-line);
	border-radius: 12px;
	padding: clamp(18px, 2.5vw, 28px);
}

#wpcrq-quote-page table.wpcrq-quote-table {
	width: 100%;
	border-collapse: collapse;
}

#wpcrq-quote-page table.wpcrq-quote-table thead th {
	font-family: var(--qp-ui) !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--qp-aqua-deep);
	text-align: left;
	padding: 0 10px 14px;
	border-bottom: 1px solid var(--qp-line);
}

#wpcrq-quote-page table.wpcrq-quote-table tbody tr.wpcrq-quote-item {
	border-bottom: 1px solid var(--qp-line);
}

#wpcrq-quote-page table.wpcrq-quote-table td {
	padding: 16px 10px;
	vertical-align: middle;
	font-family: var(--qp-ui) !important;
	font-size: 14.5px !important;
	color: var(--qp-plum);
}

#wpcrq-quote-page td.product-thumbnail img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	background: #E7DCF8;
	border-radius: 8px;
	display: block;
}

#wpcrq-quote-page td.product-name a {
	color: var(--qp-plum);
	font-weight: 600;
	text-decoration: none;
}

#wpcrq-quote-page td.product-name a:hover {
	color: var(--qp-aqua-deep);
}

#wpcrq-quote-page td.product-name .wc-item-meta,
#wpcrq-quote-page td.product-name dl.variation {
	font-size: 12.5px;
	color: var(--qp-ink-70);
	margin-top: 4px;
}

#wpcrq-quote-page td.product-quantity .quantity input.qty {
	width: 64px;
	height: 38px;
	border: 1.5px solid var(--qp-line);
	border-radius: 5px;
	text-align: center;
	font-family: var(--qp-ui) !important;
	font-size: 14px !important;
	color: var(--qp-plum);
}

#wpcrq-quote-page td.product-quantity .quantity input.qty:focus {
	outline: none;
	border-color: var(--qp-aqua);
}

#wpcrq-quote-page td.product-subtotal .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--qp-plum);
}

/* Same outline-to-fill color pattern as the product card's Add to Quote
   button (.gpc-foot .button in product-cards.css): transparent with a plum
   border at rest, solid plum with chalk text on hover. !important throughout
   because WooCommerce's own a.remove styling (red, no border) otherwise wins. */
#wpcrq-quote-page td.product-remove a.remove {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1.5px solid var(--qp-plum) !important;
	color: var(--qp-plum) !important;
	background: transparent !important;
	font-size: 16px;
	line-height: 1;
	text-decoration: none !important;
	transition: background .15s, color .15s;
}

#wpcrq-quote-page td.product-remove a.remove:hover {
	background: var(--qp-plum) !important;
	color: var(--qp-chalk) !important;
}

#wpcrq-quote-page td.actions {
	padding-top: 20px;
	text-align: right;
}

/* Buttons - same outline style as the product card's Add to Quote button. */
#wpcrq-quote-page .button.wpcrq-update-quote-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 20px;
	border-radius: 5px;
	border: 1.5px solid var(--qp-plum) !important;
	background: transparent !important;
	color: var(--qp-plum) !important;
	font-family: var(--qp-ui) !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s, color .15s, opacity .15s;
}

#wpcrq-quote-page .button.wpcrq-update-quote-btn:hover:not(:disabled) {
	background: var(--qp-plum) !important;
	color: var(--qp-chalk) !important;
}

#wpcrq-quote-page .button.wpcrq-update-quote-btn:disabled {
	opacity: .4;
	cursor: not-allowed;
}

/* Submit-quote form */
#wpcrq-quote-page .wpcrq-quote-form .form-row label {
	display: block;
	font-family: var(--qp-ui) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--qp-aqua-deep);
	margin-bottom: 6px;
}

#wpcrq-quote-page .wpcrq-quote-form .required {
	color: var(--qp-aqua-deep);
}

#wpcrq-quote-page .wpcrq-quote-form .input-text {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border: 1.5px solid var(--qp-line);
	border-radius: 5px;
	font-family: var(--qp-ui) !important;
	font-size: 14px !important;
	color: var(--qp-plum);
	background: #fff;
	box-sizing: border-box;
}

#wpcrq-quote-page .wpcrq-quote-form textarea.input-text {
	height: auto;
	padding: 12px 14px;
}

#wpcrq-quote-page .wpcrq-quote-form .input-text:focus {
	outline: none;
	border-color: var(--qp-aqua);
}

#wpcrq-quote-page .wpcrq-quote-form .form-row {
	margin-bottom: 16px;
}

#wpcrq-quote-page .wpcrq-quote-form .form-row-first,
#wpcrq-quote-page .wpcrq-quote-form .form-row-last {
	width: 48%;
}

/* Same outline-to-fill color pattern as the product card's Add to Quote
   button: transparent with a plum border at rest, solid plum with chalk
   text on hover - identical colors/hover behavior across both pages. */
#wpcrq-quote-page #wpcrq_submit_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	border: 1.5px solid var(--qp-plum) !important;
	border-radius: 5px;
	background: transparent !important;
	color: var(--qp-plum) !important;
	font-family: var(--qp-ui) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: .1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s, color .15s;
}

#wpcrq-quote-page #wpcrq_submit_button:hover {
	background: var(--qp-plum) !important;
	color: var(--qp-chalk) !important;
}

#wpcrq-quote-page #wpcrq_submit_button.loading {
	opacity: .7;
	pointer-events: none;
}

#wpcrq-quote-page .wpcrq-form-response {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 6px;
	font-family: var(--qp-ui) !important;
	font-size: 13.5px !important;
}

#wpcrq-quote-page .wpcrq-form-response.success {
	background: rgba(18, 179, 166, .12);
	color: var(--qp-aqua-deep);
	border: 1px solid rgba(18, 179, 166, .3);
}

#wpcrq-quote-page .wpcrq-form-response.error {
	background: rgba(191, 44, 44, .08);
	color: #8a2323;
	border: 1px solid rgba(191, 44, 44, .25);
}

/* Responsive: below 820px, stack the table and form panels (plugin already
   does this for .wpcrq-layout-right at 768px - this just keeps our own
   spacing/typography consistent at the same breakpoint). */
@media (max-width: 820px) {
	#wpcrq-quote-page .wpcrq-quote-table-wrapper,
	#wpcrq-quote-page .wpcrq-quote-form-wrapper {
		width: 100%;
	}
}

/* Responsive: below 680px, flip the table into stacked "cards" per row -
   each <td> becomes a labeled block using its own data-title attribute
   (already rendered by the plugin for exactly this purpose), instead of a
   cramped horizontally-scrolling table. */
@media (max-width: 680px) {
	#wpcrq-quote-page table.wpcrq-quote-table thead {
		display: none;
	}

	#wpcrq-quote-page table.wpcrq-quote-table,
	#wpcrq-quote-page table.wpcrq-quote-table tbody,
	#wpcrq-quote-page table.wpcrq-quote-table tr,
	#wpcrq-quote-page table.wpcrq-quote-table td {
		display: block;
		width: 100% !important;
	}

	#wpcrq-quote-page table.wpcrq-quote-table tr.wpcrq-quote-item {
		position: relative;
		padding: 16px 0;
	}

	#wpcrq-quote-page table.wpcrq-quote-table td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 6px 0;
		border: none !important;
	}

	#wpcrq-quote-page table.wpcrq-quote-table td[data-title]::before {
		content: attr(data-title);
		font-family: var(--qp-ui) !important;
		font-size: 11px !important;
		font-weight: 600 !important;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: var(--qp-aqua-deep);
		flex: none;
	}

	#wpcrq-quote-page td.product-thumbnail {
		justify-content: flex-start;
	}

	#wpcrq-quote-page td.product-remove {
		position: absolute;
		top: 16px;
		right: 0;
		padding: 0;
	}

	#wpcrq-quote-page td.actions {
		text-align: left;
	}

	#wpcrq-quote-page .button.wpcrq-update-quote-btn {
		width: 100%;
	}

	#wpcrq-quote-page .wpcrq-quote-form .form-row-first,
	#wpcrq-quote-page .wpcrq-quote-form .form-row-last {
		width: 100%;
		float: none;
	}
}
