/* Request a Quote page ([yayraq_quote]). Colours, fonts and buttons come from the theme. */
.yayraq-quote {
	--yayraq-text: var(--wp--preset--color--contrast, currentColor);
	--yayraq-border: color-mix(in srgb, var(--yayraq-text) 15%, transparent);
	--yayraq-muted: color-mix(in srgb, var(--yayraq-text) 70%, transparent);
	--yayraq-field-border: color-mix(in srgb, var(--yayraq-text) 35%, transparent);
	--yayraq-gap: var(--wp--preset--spacing--40, 1.5rem);
}

/* Safari < 16.2 and Chrome < 111 have no color-mix(); without this, borders vanish there. */
@supports not (color: color-mix(in srgb, red 50%, transparent)) {
	.yayraq-quote {
		--yayraq-border: rgba(128, 128, 128, 0.3);
		--yayraq-muted: inherit;
		--yayraq-field-border: rgba(128, 128, 128, 0.6);
	}
}

.yayraq-quote-heading {
	margin: 0 0 0.75rem;
	font-size: var(--wp--preset--font-size--large, 1.5rem);
}

.yayraq-quote-intro {
	margin: -0.5rem 0 1rem;
	color: var(--yayraq-muted);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.yayraq-quote-items {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--yayraq-border);
}

.yayraq-quote-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0;
	padding: 1rem 0;
	border-bottom: 1px solid var(--yayraq-border);
}

.yayraq-quote-thumb {
	flex: none;
	width: 64px;
}

.yayraq-quote-thumb img {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0;
	object-fit: cover;
	border-radius: 4px;
}

.yayraq-quote-name {
	flex: 1;
	min-width: 0;
}

.yayraq-quote-name a {
	color: inherit;
	font-weight: 500;
	text-decoration: none;
}

.yayraq-quote-name a:hover {
	text-decoration: underline;
}

.yayraq-quote-variation {
	display: block;
	color: var(--yayraq-muted);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.yayraq-quote-qty label {
	margin-inline-end: 0.375rem;
	color: var(--yayraq-muted);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.yayraq-quote .yayraq-quote-qty input {
	width: 5em;
}

.yayraq-quote-remove {
	flex: none;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--yayraq-muted);
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
}

.yayraq-quote-remove:hover,
.yayraq-quote-remove:focus-visible {
	background: var(--yayraq-border);
	color: var(--yayraq-text);
}

.yayraq-quote-actions {
	display: flex;
	justify-content: flex-end;
	margin: 1rem 0 0;
}

.yayraq-quote-list {
	margin-bottom: calc(var(--yayraq-gap) * 1.5);
}

.yayraq-quote .yayraq-quote-secondary {
	border: 1px solid currentColor;
	background: transparent;
	color: var(--yayraq-text);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.yayraq-quote-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
}

.yayraq-quote-field {
	margin: 0 0 1rem;
}

.yayraq-quote-field label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 500;
}

.yayraq-quote-field abbr {
	border: 0;
	text-decoration: none;
	color: #cc1818;
}

.yayraq-quote input[type="text"],
.yayraq-quote input[type="email"],
.yayraq-quote input[type="number"],
.yayraq-quote textarea {
	box-sizing: border-box;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--yayraq-field-border);
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.yayraq-quote-field input,
.yayraq-quote-field textarea {
	width: 100%;
}

.yayraq-quote-field textarea {
	resize: vertical;
}

.yayraq-quote-field.yayraq-quote-privacy label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0;
	font-weight: 400;
}

.yayraq-quote-field.yayraq-quote-privacy input {
	flex: none;
	width: auto;
	margin: 0.2em 0 0;
}

.yayraq-quote .yayraq-quote-submit {
	width: 100%;
}

.yayraq-quote-hint {
	margin-top: -0.5rem;
	color: var(--yayraq-muted);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.yayraq-quote .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (min-width: 600px) {
	.yayraq-quote-qty label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

@media (max-width: 599px) {
	.yayraq-quote-item {
		position: relative;
		flex-wrap: wrap;
		align-items: flex-start;
		padding-inline-end: 2.5rem;
	}

	.yayraq-quote-name {
		flex-basis: calc(100% - 80px);
	}

	.yayraq-quote-qty {
		flex-basis: 100%;
		margin-inline-start: 80px;
		margin-top: -0.5rem;
	}

	.yayraq-quote-remove {
		position: absolute;
		top: 0.75rem;
		inset-inline-end: 0;
	}

	.yayraq-quote .yayraq-quote-secondary {
		width: 100%;
	}

	.yayraq-quote-fields {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 782px) {
	.yayraq-quote--two-column {
		display: grid;
		grid-template-columns: 3fr 2fr;
		gap: 0 var(--yayraq-gap);
		align-items: start;
	}

	.yayraq-quote--two-column > :not(form) {
		grid-column: 1 / -1;
	}

	.yayraq-quote--two-column .yayraq-quote-list {
		margin-bottom: 0;
	}

	.yayraq-quote--two-column .yayraq-quote-fields {
		grid-template-columns: 1fr;
	}
}
