/**
 * "Request a trade quote" — the modal and its form.
 *
 * Shared by the cart and the product page, so it cannot live in either one's
 * stylesheet: the product page never loads cart-page.css, which is why the form
 * arrived there unstyled. Enqueued from inc/trade-quote.php on both.
 */

/* The basket, restated inside the popup so the request is unambiguous. */
.adorno-trade-modal__pieces {
	margin: 0 0 16px;
	padding: 0 0 16px;
	list-style: none;
	border-bottom: 1px solid #e7e9ec;
}

.adorno-trade-modal__pieces li {
	display: flex;
	gap: 8px;
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 1.45;
	color: #000;
}

.adorno-trade-modal__pieces li:last-child {
	margin-bottom: 0;
}

.adorno-trade-modal__qty {
	flex: 0 0 auto;
	color: #767676;
	white-space: nowrap;
}

.adorno-trade-modal__known {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.5;
	color: #767676;
}

@media screen and (max-width: 600px) {
	.adorno-cart .adorno-cart-trade {
		margin-left: 0;
		width: 100%;
		text-align: left;
	}
}

/* ------------------------------------------------- the trade quote form */

/* The rows, the labels and the fields themselves are the shared popup set —
   see assets/css/popup-forms.css. Only what is particular to this form is here. */

.adorno-trade-form__hint {
	display: block;
	margin: 5px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: #767676;
}

.adorno-trade-form__error {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.45;
	color: #c0392b;
}

.adorno-trade-form__submit {
	display: block;
	width: 100%;
}

.adorno-trade-form__done p {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.55;
	color: #000;
}

.adorno-trade-form__done p:last-child {
	margin-bottom: 0;
	color: #767676;
}

/*
 * The modal places itself.
 *
 * The theme's .modal-box is position:fixed and left where centerPopup() in
 * custom.js puts it — which only runs for the modals it knows about, so this
 * one opened at top:1595px on a 943px viewport: in the DOM, painted, and
 * entirely below the window. Nothing appeared to happen when you clicked.
 */
.modal-box.adorno-trade-modal {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	right: auto !important;
	bottom: auto !important;
	transform: translate(-50%, -50%) !important;
	width: min(520px, calc(100vw - 32px));
	max-height: 86vh;
	overflow-y: auto;
	margin: 0 !important;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	z-index: 100000;
}

.modal-box.adorno-trade-modal .modal-body {
	padding: 0 28px 28px;
}

.modal-box.adorno-trade-modal header {
	display: flex;
	justify-content: flex-end;
	padding: 14px 18px 0;
}

.modal-box.adorno-trade-modal h3 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.3;
	color: #000;
}
