/**
 * Mervia Group Quote — front-end styles.
 *
 * Only what the site's component library does not already provide. The buttons,
 * tables and callouts here are the theme's; these rules cover the two states
 * the basket adds and one small input variant.
 */

/* The add form wraps a button and must not introduce layout of its own —
   it sits inside card footers and table cells that already position it. */
.c-addform {
	display: contents;
}

/* A product already in the enquiry. Reads as a state, not as a disabled
   control: clicking again removes it, so it must still look pressable. */
[data-mv-in-basket="true"] {
	border-color: var(--co-color-success);
	color: var(--co-color-success);
}

[data-mv-in-basket="true"]:hover {
	background: var(--co-color-success-bg);
	border-color: var(--co-color-success);
	color: var(--co-color-success);
}

[data-mv-busy="true"] {
	opacity: 0.55;
	pointer-events: none;
}

.c-basket-link {
	position: relative;
}

.c-input--sm {
	min-height: var(--co-control-height-sm);
	padding-block: var(--co-space-2);
	font-size: var(--co-text-xs);
	min-width: 11rem;
}

.c-basket .c-data-table td {
	white-space: normal;
	vertical-align: top;
}

/* ----------------------------------------------------------------------
   Quote form
   The wrapper for the full form on /request-a-quote/ and the enquiry page.
   Width is capped independently of the page container: a two-column field
   grid stretched to a wide template gives inputs that are 500px long for a
   six-character postcode, which reads as a mistake even though it is not.
   ---------------------------------------------------------------------- */

.c-quoteform {
	max-width: 46rem;
}

.c-quoteform > .c-notice {
	margin-block-end: var(--co-space-6);
}

.c-quoteform .c-check {
	margin-block-start: var(--co-space-5);
}

/* The consent line and the send button belong to each other. Anything that
   separates them invites a submit before the box is ticked, and the only
   feedback then is a validation message on a control the eye has left. */
.c-quoteform .c-check + .c-btn {
	margin-block-start: var(--co-space-5);
}

@media (min-width: 60em) {
	.c-quoteform--sidebar {
		max-width: none;
	}
}
