/*
 * Deliberately light-touch: the plugin drops into an existing client theme,
 * so it inherits fonts and colours and only sets structure. Override the
 * variables below in the theme to match the brand.
 */
.nxl {
	--nxl-line: rgba( 0, 0, 0, 0.14 );
	--nxl-muted: rgba( 0, 0, 0, 0.6 );
	--nxl-accent: currentColor;
	--nxl-radius: 4px;
	--nxl-gap: 0.75rem;
	font: inherit;
	color: inherit;
	margin-block: 1.5rem;
}

.nxl-heading {
	margin: 0 0 1rem;
	font-size: 1.25em;
}

.nxl-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var( --nxl-gap );
}

.nxl-row-end {
	justify-content: flex-end;
	margin-top: var( --nxl-gap );
}

.nxl-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 180px, 1fr ) );
	gap: var( --nxl-gap );
}

.nxl-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.nxl-grow {
	flex: 1 1 220px;
}

.nxl-label {
	font-size: 0.8125em;
	color: var( --nxl-muted );
}

.nxl input,
.nxl select {
	font: inherit;
	color: inherit;
	padding: 0.55em 0.7em;
	border: 1px solid var( --nxl-line );
	border-radius: var( --nxl-radius );
	background: transparent;
	width: 100%;
	box-sizing: border-box;
}

.nxl input:focus-visible,
.nxl select:focus-visible,
.nxl button:focus-visible {
	outline: 2px solid var( --nxl-accent );
	outline-offset: 2px;
}

.nxl-button {
	font: inherit;
	padding: 0.6em 1.4em;
	border: 1px solid currentColor;
	border-radius: var( --nxl-radius );
	background: transparent;
	cursor: pointer;
}

.nxl-button[disabled] {
	opacity: 0.55;
	cursor: progress;
}

.nxl-link {
	font: inherit;
	background: none;
	border: 0;
	padding: 0;
	margin-right: auto;
	text-decoration: underline;
	cursor: pointer;
	color: inherit;
}

.nxl-package {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 110px, 1fr ) ) auto;
	gap: var( --nxl-gap );
	align-items: end;
	padding: var( --nxl-gap ) 0;
	border-top: 1px solid var( --nxl-line );
	margin-top: var( --nxl-gap );
}

.nxl-remove {
	font: inherit;
	line-height: 1;
	border: 1px solid var( --nxl-line );
	border-radius: var( --nxl-radius );
	background: transparent;
	padding: 0.5em 0.7em;
	cursor: pointer;
}

.nxl-packages [data-package]:first-child .nxl-remove {
	visibility: hidden;
}

.nxl-declared {
	max-width: 160px;
}

.nxl-message {
	margin: 1rem 0 0;
}

.nxl-message.is-error {
	color: #b3261e;
}

.nxl-result {
	margin-top: 1.25rem;
}

.nxl-summary {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 160px, 1fr ) );
	gap: var( --nxl-gap );
	padding-bottom: 1rem;
	border-bottom: 1px solid var( --nxl-line );
}

.nxl-summary-key {
	display: block;
	font-size: 0.8125em;
	color: var( --nxl-muted );
}

.nxl-summary-value {
	display: block;
}

.nxl-events {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.nxl-event {
	display: grid;
	grid-template-columns: minmax( 8rem, auto ) 1fr auto;
	gap: var( --nxl-gap );
	padding: 0.65rem 0;
	border-bottom: 1px solid var( --nxl-line );
}

.nxl-event-date,
.nxl-event-place {
	color: var( --nxl-muted );
	font-size: 0.9em;
}

.nxl-quote-card {
	border: 1px solid var( --nxl-line );
	border-radius: var( --nxl-radius );
	padding: 1rem 1.1rem;
	margin-bottom: 0.9rem;
}

.nxl-quote-head {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: baseline;
	justify-content: space-between;
}

.nxl-quote-service {
	font-size: 1.05em;
}

.nxl-quote-total {
	font-size: 1.35em;
	white-space: nowrap;
}

.nxl-quote-lane {
	margin: 0.35rem 0 0;
	color: var( --nxl-muted );
	font-size: 0.9em;
}

.nxl-quote-lines {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.3rem 1rem;
	margin: 0.9rem 0 0;
	padding-top: 0.9rem;
	border-top: 1px solid var( --nxl-line );
	font-size: 0.925em;
}

.nxl-quote-lines dt {
	color: var( --nxl-muted );
}

.nxl-quote-lines dd {
	margin: 0;
	text-align: right;
}

.nxl-quote-note {
	margin: 0.75rem 0 0;
	font-size: 0.9em;
	color: var( --nxl-muted );
}

.nxl-raw {
	margin-top: 1rem;
	font-size: 0.85em;
}

.nxl-raw pre {
	overflow: auto;
	max-height: 420px;
	padding: 0.75rem;
	border: 1px solid var( --nxl-line );
	border-radius: var( --nxl-radius );
}

@media ( max-width: 600px ) {
	.nxl-event {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}
}
