/* Laguna Quotes: the YITH quote list in the staging cart's look.
 *
 * Styling only: YITH's own markup, quantity inputs and "Send the request"
 * form are untouched and still do all the work. Every rule is scoped to a
 * quote list that has items (the empty list and every other page keep the
 * theme's look). The artwork panel under each product is added by
 * laguna-quote.js as tr.lq-files-row.
 */

body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 28px;
	align-items: start;
}
body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) > * {
	width: auto;
	max-width: none;
	float: none;
	margin: 0;
}
body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) .ywraq-before-form:empty {
	display: none;
}

/* The list: one bordered card, one block per product. */
body.yith-request-a-quote-page #yith-ywrq-table-list {
	display: block;
	width: 100%;
	margin: 0;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	background: #fff;
	border-collapse: separate;
}
body.yith-request-a-quote-page #yith-ywrq-table-list thead {
	display: none;
}
body.yith-request-a-quote-page #yith-ywrq-table-list tbody {
	display: block;
}
body.yith-request-a-quote-page #yith-ywrq-table-list tr.cart_item {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr) auto;
	grid-template-areas:
		"thumb name remove"
		"thumb name qty";
	grid-template-rows: auto 1fr;
	gap: 0 16px;
	padding: 18px 18px 14px;
	border: 0;
	border-top: 1px solid #e5e7eb;
	background: none;
}
body.yith-request-a-quote-page #yith-ywrq-table-list tbody tr.cart_item:first-child {
	border-top: 0;
}
body.yith-request-a-quote-page #yith-ywrq-table-list tr.cart_item > td {
	display: block;
	width: auto;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
}
body.yith-request-a-quote-page #yith-ywrq-table-list tr.cart_item > td::before {
	/* YITH's phone layout labels each cell; the card does not need them. */
	content: none;
	display: none;
}

body.yith-request-a-quote-page #yith-ywrq-table-list td.product-thumbnail {
	grid-area: thumb;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-thumbnail img {
	display: block;
	width: 92px;
	height: 92px;
	max-width: none;
	object-fit: cover;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	background: #f9fafb;
}

body.yith-request-a-quote-page #yith-ywrq-table-list td.product-name {
	grid-area: name;
	min-width: 0;
	font-size: 14px;
	line-height: 1.5;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-name > a {
	font-size: 16px;
	font-weight: 700;
	color: #111827;
	text-decoration: none;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-name br {
	display: none;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-name ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 4px 16px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 12.5px;
	color: #6b7280;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-name li {
	margin: 0;
	padding: 0;
	list-style: none;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-name li strong {
	font-weight: 400;
	color: #6b7280;
}

body.yith-request-a-quote-page #yith-ywrq-table-list td.product-remove {
	grid-area: remove;
	justify-self: end;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-remove a.remove {
	display: inline;
	width: auto;
	height: auto;
	font-size: 0;
	line-height: 1;
	color: #2088c8;
	background: none;
	border: 0;
	text-decoration: underline;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-remove a.remove::after {
	content: "Remove";
	font-size: 13px;
	font-weight: 600;
}
body.yith-request-a-quote-page #yith-ywrq-table-list td.product-quantity {
	grid-area: qty;
	justify-self: end;
	align-self: end;
	margin-top: 10px;
}

/* The artwork panel row the script adds under each product. */
body.yith-request-a-quote-page #yith-ywrq-table-list tr.lq-files-row {
	display: block;
	padding: 0 18px 18px;
	border: 0;
	background: none;
}
body.yith-request-a-quote-page #yith-ywrq-table-list tr.lq-files-row > td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
}

/* Under the list: "update list" and the other YITH actions. */
body.yith-request-a-quote-page #yith-ywraq-form .update-list-wrapper,
body.yith-request-a-quote-page #yith-ywraq-form .after-table-right {
	margin-top: 12px;
}

/* The request form: the staging cart's summary card. */
body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) .yith-ywraq-mail-form-wrapper {
	position: sticky;
	top: 16px;
	padding: 18px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	background: #fff;
}
body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) .yith-ywraq-mail-form-wrapper > h3 {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #111827;
}
body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) .yith-ywraq-mail-form-wrapper .form-row {
	width: 100%;
	float: none;
	margin: 0 0 12px;
	padding: 0;
}
body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) .yith-ywraq-mail-form-wrapper :is(input[type="submit"], button[type="submit"], .button.raq-send-request) {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 13px 16px;
	border: 0;
	border-radius: 4px;
	background: #2088c8;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
}
body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) .yith-ywraq-mail-form-wrapper :is(input[type="submit"], button[type="submit"], .button.raq-send-request):hover {
	background: #186a9d;
}

@media (max-width: 900px) {
	body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) {
		grid-template-columns: minmax(0, 1fr);
	}
	body.yith-request-a-quote-page .ywraq-form-table-wrapper:has(#yith-ywrq-table-list) .yith-ywraq-mail-form-wrapper {
		position: static;
	}
}
@media (max-width: 560px) {
	body.yith-request-a-quote-page #yith-ywrq-table-list tr.cart_item {
		grid-template-columns: 64px minmax(0, 1fr);
		grid-template-areas:
			"thumb name"
			"remove qty";
		padding: 14px 14px 10px;
	}
	body.yith-request-a-quote-page #yith-ywrq-table-list td.product-thumbnail img {
		width: 64px;
		height: 64px;
	}
	body.yith-request-a-quote-page #yith-ywrq-table-list td.product-remove {
		justify-self: start;
		align-self: end;
	}
	body.yith-request-a-quote-page #yith-ywrq-table-list tr.lq-files-row {
		padding: 0 14px 14px;
	}
}
