/**
 * Click Shop Core — Quick Order popup (brief §7.2).
 *
 * Styles only the popup-specific content (product summary, totals, coupon row, states). The modal
 * shell (.modal/.modal__card/.modal__head/.modal__body), form fields (.field/.input/.select) and
 * buttons (.btn) come from the theme design system and inherit the --cs-* tokens, so the popup
 * re-themes with every skin / dark-mode change automatically.
 */

.cs-quick-order-modal .modal__card {
	width: min(520px, 96vw);
}

.cs-quick-order-modal .modal__body {
	display: flex;
	flex-direction: column;
}

.cs-qo-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cs-qo-form .field {
	margin-bottom: 0;
}

/* The form uses a <span class="cs-field__label"> inside each label-wrapped .field. */
.cs-field__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--cs-heading);
}

.cs-req {
	color: var(--cs-accent);
}

/* Product summary header */
.cs-qo-summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--cs-line);
}

.cs-qo-summary__img {
	width: 64px;
	height: 64px;
	border-radius: var(--r-sm);
	border: 1px solid var(--cs-line);
	object-fit: cover;
	flex: 0 0 auto;
}

.cs-qo-summary__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.cs-qo-summary__name {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--cs-heading);
}

.cs-qo-summary__price {
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--cs-heading);
}

/* Variations + qty layout */
.cs-qo-variations {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cs-qo-row--qty .input {
	max-width: 120px;
}

/* Coupon */
.cs-qo-coupon__row {
	display: flex;
	gap: 8px;
}

.cs-qo-coupon__row .input {
	flex: 1 1 auto;
	min-width: 0;
}

.cs-qo-coupon__msg {
	margin: 6px 0 0;
	font-size: 13px;
	min-height: 1em;
}

.cs-qo-coupon__msg.is-valid {
	color: var(--cs-primary);
}

.cs-qo-coupon__msg.is-invalid {
	color: var(--cs-accent);
}

/* Totals */
.cs-qo-totals {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 0;
	border-top: 1px solid var(--cs-line);
}

.cs-qo-totals__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	color: var(--cs-muted);
}

.cs-qo-totals__row--discount {
	color: var(--cs-primary);
}

.cs-qo-totals__row--total {
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1px dashed var(--cs-line);
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 700;
	color: var(--cs-heading);
}

/* States */
.cs-qo-loading {
	padding: 28px 0;
	text-align: center;
	color: var(--cs-muted);
}

.cs-qo-error {
	margin: 0;
	min-height: 1em;
	color: var(--cs-accent);
	font-size: 13.5px;
}

.cs-qo-error:empty {
	display: none;
}

.cs-qo-submit[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.cs-qo-privacy {
	margin: 0;
	font-size: 12px;
	color: var(--cs-faint);
	text-align: center;
}
