/**
 * Nidora B2B Quote Lists for WooCommerce.
 *
 * Low specificity, no font declarations and no colour beyond the status
 * badges, so it inherits the theme. A B2B shop usually has a bought theme
 * and a plugin that fights it is a plugin that gets a support ticket.
 */

.wcraq-button-wrap {
	margin: 1em 0;
}

.wcraq-form-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: flex-end;
}

.wcraq-qty-label {
	display: block;
	width: 100%;
	font-size: 0.85em;
	margin-bottom: 0.2em;
}

.wcraq-qty {
	width: 6em;
	box-sizing: border-box;
}

.wcraq-hint,
.wcraq-in-list {
	font-size: 0.9em;
	opacity: 0.8;
	margin: 0.4em 0;
}

.wcraq-price-on-request {
	font-style: italic;
	opacity: 0.85;
}

/* ---------- The list ---------- */

.wcraq-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5em;
}

.wcraq-table th,
.wcraq-table td {
	padding: 0.7em 0.5em;
	text-align: left;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	vertical-align: middle;
}

.wcraq-table th {
	font-weight: 600;
}

.wcraq-cell-qty input {
	width: 6em;
	box-sizing: border-box;
}

.wcraq-cell-note input {
	width: 100%;
	max-width: 22em;
	box-sizing: border-box;
}

.wcraq-cell-remove {
	width: 2.5em;
	text-align: center;
}

.wcraq-remove {
	display: inline-block;
	width: 1.8em;
	height: 1.8em;
	line-height: 1.7em;
	text-align: center;
	border-radius: 50%;
	text-decoration: none;
	font-size: 1.1em;
	background: rgba(0, 0, 0, 0.06);
}

.wcraq-remove:hover,
.wcraq-remove:focus {
	background: rgba(179, 45, 46, 0.15);
}

.wcraq-sku {
	opacity: 0.7;
}

.wcraq-list-actions {
	margin-bottom: 2em;
}

.wcraq-empty {
	padding: 1em;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.04);
}

/* ---------- The form ---------- */

.wcraq-quote-form {
	margin-top: 2em;
	padding-top: 1.5em;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.wcraq-form-heading {
	margin-top: 0;
}

.wcraq-form-row {
	margin-bottom: 1em;
	max-width: 32em;
}

.wcraq-form-row-wide {
	max-width: 44em;
}

.wcraq-form-row label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 600;
}

.wcraq-form-row input,
.wcraq-form-row textarea {
	width: 100%;
	box-sizing: border-box;
}

.wcraq-form-row .required {
	color: #b32d2e;
	border: 0;
}

.wcraq-form-privacy {
	font-size: 0.85em;
	opacity: 0.8;
}

/*
 * The honeypot. Kept out of sight without display:none, which some bots
 * check for, and out of the tab order via tabindex in the markup.
 */

.wcraq-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- A single quote ---------- */

.wcraq-single-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8em;
	align-items: center;
	margin-bottom: 1.2em;
}

.wcraq-status {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 3px;
	font-size: 0.85em;
	font-weight: 600;
	white-space: nowrap;
}

.wcraq-status-new {
	background: #fff3cd;
	color: #7a5c00;
}

.wcraq-status-quoted {
	background: #cfe9ff;
	color: #0a4b75;
}

.wcraq-status-accepted {
	background: #e3f5e8;
	color: #14562a;
}

.wcraq-status-declined {
	background: #fcf0f1;
	color: #8a2122;
}

.wcraq-status-expired {
	background: rgba(0, 0, 0, 0.08);
	opacity: 0.9;
}

.wcraq-note,
.wcraq-error,
.wcraq-login-required {
	padding: 0.9em 1em;
	border-left: 4px solid rgba(0, 0, 0, 0.2);
	border-radius: 0 4px 4px 0;
	background: rgba(0, 0, 0, 0.04);
}

.wcraq-error {
	border-left-color: #b32d2e;
}

.wcraq-total-row td {
	font-weight: 700;
}

.wcraq-pay {
	margin-top: 1.5em;
}

.wcraq-count {
	white-space: nowrap;
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
	.wcraq-table thead {
		display: none;
	}

	.wcraq-table tr {
		display: block;
		padding: 0.6em 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	}

	.wcraq-table td {
		display: block;
		border: 0;
		padding: 0.25em 0;
	}

	.wcraq-cell-remove {
		text-align: left;
		width: auto;
	}

	.wcraq-cell-note input {
		max-width: 100%;
	}
}

/* ---------- Dark themes ---------- */

@media (prefers-color-scheme: dark) {
	.wcraq-table th,
	.wcraq-table td,
	.wcraq-quote-form {
		border-color: rgba(255, 255, 255, 0.18);
	}

	.wcraq-empty,
	.wcraq-note,
	.wcraq-error,
	.wcraq-login-required,
	.wcraq-remove {
		background: rgba(255, 255, 255, 0.07);
	}

	.wcraq-status-new,
	.wcraq-status-quoted,
	.wcraq-status-accepted,
	.wcraq-status-declined {
		background: rgba(255, 255, 255, 0.12);
		color: inherit;
	}
}
