/**
 * Storefront: buttons, quote list, request form, quotes in My account.
 *
 * Kept light on purpose: colours, fonts and button shapes are the theme's.
 *
 * @package Vanquish\RequestQuote
 */

/* Buttons ------------------------------------------------------------------ */

.vanqt-add-to-quote.vanqt-busy {
	opacity: 0.6;
	pointer-events: none;
}

/* Next to "Add to cart", where most themes keep the two on one line. A theme
   that gives each button a line of its own is recognised by the script, which
   adds .vanqt-stacked: the gap then goes above instead of beside. */
form.cart .vanqt-add-to-quote {
	margin-top: 0;
	margin-bottom: 0;
	margin-left: 0.5em;
}

form.cart .vanqt-add-to-quote.vanqt-stacked {
	margin-top: 0.5em;
	margin-left: 0;
}

/* The theme's own row keeps its buttons apart (a flex or grid gap): no margin
   of ours on top of it. */
form.cart .vanqt-add-to-quote.vanqt-spaced {
	margin-left: 0;
}

/* Always on a line of its own, under the buttons. "clear" is for the many
   themes that float the quantity field and the buttons: without it the text
   would flow beside them. */
.vanqt-message {
	display: block;
	clear: both;
	width: 100%;
	padding-top: 0.5em;
	font-size: 0.9em;
}

.vanqt-message:empty {
	display: none;
}

.vanqt-quote-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 1.5em;
}

.vanqt-quote-form .vanqt-message {
	flex-basis: 100%;
}

/* A product that can only be quoted: its own "Add to cart" is not offered.
   Hidden with a class, so that taking the class away gives the theme's own
   state back. */
.vanqt-quote-only .single_add_to_cart_button:not(.vanqt-add-to-quote) {
	display: none !important;
}

/* Quote list link and counter ---------------------------------------------- */

.vanqt-count {
	display: inline-block;
	min-width: 1.6em;
	margin-left: 0.35em;
	padding: 0 0.4em;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.8em;
	line-height: 1.5;
	text-align: center;
}

.vanqt-count[hidden] {
	display: none;
}

/* Quote page ---------------------------------------------------------------- */

.vanqt-quote-page__list {
	margin-bottom: 2em;
}

.vanqt-quote-page table.vanqt-list {
	width: 100%;
}

.vanqt-list .vanqt-list__thumb {
	width: 64px;
}

.vanqt-list .vanqt-list__thumb img {
	display: block;
	width: 48px;
	height: auto;
}

.vanqt-list .vanqt-list__sku,
.vanqt-list .vanqt-list__meta {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
}

.vanqt-list .vanqt-list__qty input {
	width: 5em;
}

.vanqt-list .vanqt-list__remove a {
	text-decoration: none;
	font-size: 1.4em;
	line-height: 1;
}

.vanqt-quote-page__update {
	margin-top: 1em;
	text-align: right;
}

.vanqt-form__row {
	margin-bottom: 1em;
}

.vanqt-form__row label {
	display: block;
	margin-bottom: 0.25em;
}

.vanqt-form__row input[type="text"],
.vanqt-form__row input[type="email"],
.vanqt-form__row input[type="tel"],
.vanqt-form__row textarea {
	width: 100%;
	box-sizing: border-box;
}

.vanqt-form__row--acceptance label {
	display: inline;
}

.vanqt-form .required {
	color: #b32d2e;
	text-decoration: none;
}

/* The field people do not see and do not fill in. */
.vanqt-form__trap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Both columns open with a heading of the same kind, so that side by side the
   list and the form start on the same line. */
.vanqt-quote-page__list > h2,
.vanqt-quote-page__form > h2 {
	margin-top: 0;
}

@media (min-width: 900px) {
	.vanqt-layout-side {
		display: grid;
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		gap: 2.5em;
		align-items: start;
	}
}

/* A quote, as the customer sees it ------------------------------------------ */

.vanqt-status {
	display: inline-block;
	padding: 0.15em 0.75em;
	border-radius: 999px;
	background: #f0f0f1;
	color: #2c3338;
	font-size: 0.9em;
}

.vanqt-status--accepted-quote {
	background: #c6e1c6;
	color: #2c4700;
}

.vanqt-status--new-quote,
.vanqt-status--on-hold-quote {
	background: #f8dda7;
	color: #94660c;
}

.vanqt-status--rejected-quote,
.vanqt-status--rejected-quote-2,
.vanqt-status--expired-quote {
	background: #eba3a3;
	color: #761919;
}

.vanqt-view__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	margin: 1.5em 0;
}

/* Request form built with Premium -------------------------------------------- */

@media (min-width: 600px) {
	.vanqt-form {
		display: flex;
		flex-wrap: wrap;
		column-gap: 4%;
	}

	.vanqt-form > * {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.vanqt-form > .vanqt-form__row--half {
		flex-basis: 48%;
		max-width: 48%;
	}
}

.vanqt-form__row select {
	width: 100%;
	box-sizing: border-box;
}

.vanqt-form__choices label {
	display: block;
}

/* Quote details added by Premium ---------------------------------------------- */

.vanqt-view__message {
	margin: 1em 0;
	padding: 0.75em 1em;
	border-left: 3px solid currentColor;
}

.vanqt-reject > summary {
	display: inline-block;
	cursor: pointer;
	list-style: none;
}

.vanqt-reject > summary::-webkit-details-marker {
	display: none;
}

.vanqt-reject form {
	margin-top: 1em;
}

.vanqt-reject textarea {
	width: 100%;
	box-sizing: border-box;
}

.vanqt-cart-quote {
	display: block;
	margin-top: 0.75em;
	text-align: center;
}
