/**
 * NicLen Portfolio – truck list [nl_truck] / widget "nl-truck".
 *
 * Breakpoint template: Elementor replaces the placeholders in the media queries with the breakpoints
 * of the site and serves the result from uploads/elementor/css/custom-nl-truck.css.
 */

.nl-portfolio.nl-truck {
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 100%;
}

/* Head: icon, title, "17 products in 5 items". */
.nl-portfolio .nl-truck__head {
	display: flex;
	align-items: center;
	gap: 16px;
}

.nl-portfolio .nl-truck__icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: var(--nl-r-pill);
	background: var(--nl-chip);
	color: var(--nl-action);
}

.nl-portfolio .nl-truck__icon svg {
	width: 32px;
	height: 32px;
}

.nl-portfolio .nl-truck__title {
	font-family: var(--nl-font-heading);
	font-size: 40px;
	font-weight: 900;
	line-height: 1.15;
	color: var(--nl-heading);
}

.nl-portfolio .nl-truck__summary {
	margin-top: 4px;
	font-size: 15px;
	color: var(--nl-text-muted);
}

.nl-portfolio .nl-truck__group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nl-portfolio .nl-truck__group-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.nl-portfolio .nl-truck__group-title {
	font-family: var(--nl-font-heading);
	font-size: 22px;
	font-weight: 900;
	line-height: 1.3;
	color: var(--nl-heading);
}

.nl-portfolio .nl-truck__group-sum {
	font-size: 14px;
	color: var(--nl-text-muted);
}

/* Product row. */
.nl-portfolio .nl-truck__item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 20px;
	padding: 16px;
	border: 1px solid var(--nl-line);
	border-radius: var(--nl-r-m);
	transition: opacity 0.2s ease;
}

.nl-portfolio .nl-truck__item.is-busy {
	opacity: 0.6;
}

.nl-portfolio .nl-truck__media {
	display: block;
	width: 88px;
	height: 88px;
	overflow: hidden;
	border-radius: var(--nl-r-s);
	background: var(--nl-surface);
}

.nl-portfolio .nl-truck__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nl-portfolio .nl-truck__name {
	font-family: var(--nl-font-heading);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.nl-portfolio .nl-truck__name a {
	color: var(--nl-action);
	text-decoration: none;
}

.nl-portfolio .nl-truck__name a:hover {
	color: var(--nl-navy);
	text-decoration: underline;
}

.nl-portfolio .nl-truck__category {
	margin-top: 4px;
	font-size: 14px;
	color: var(--nl-text-muted);
}

.nl-portfolio .nl-truck__controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

/* Stepper: − quantity + in a neutral pill. */
.nl-portfolio .nl-truck__stepper {
	display: flex;
	align-items: center;
	width: 124px;
	height: 44px;
	border: 1px solid var(--nl-field);
	border-radius: var(--nl-r-pill);
}

/*
 * Repeated for :hover, :focus and :active, so global button styles of the site
 * (theme, Elementor kit) cannot change the shape in any state.
 */
.nl-portfolio .nl-truck__step,
.nl-portfolio .nl-truck__step:is(:hover, :focus, :active),
.nl-portfolio .nl-truck__remove,
.nl-portfolio .nl-truck__remove:is(:hover, :focus, :active) {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--nl-r-pill);
	box-shadow: none;
	transform: none;
	color: var(--nl-navy);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.nl-portfolio .nl-truck__step,
.nl-portfolio .nl-truck__step:is(:hover, :focus, :active) {
	width: 40px;
	height: 42px;
	background: transparent;
}

.nl-portfolio .nl-truck__step:hover {
	background: var(--nl-surface);
	color: var(--nl-navy);
}

.nl-portfolio .nl-truck__step:disabled {
	color: var(--nl-field);
	background: transparent;
	cursor: default;
}

.nl-portfolio .nl-truck__step svg {
	width: 16px;
	height: 16px;
}

.nl-portfolio .nl-truck__quantity {
	flex: 1;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	color: var(--nl-navy);
}

.nl-portfolio .nl-truck__remove,
.nl-portfolio .nl-truck__remove:is(:hover, :focus, :active) {
	width: 44px;
	height: 44px;
	background: var(--nl-surface);
}

.nl-portfolio .nl-truck__remove:hover {
	background: var(--nl-line);
	color: var(--nl-navy);
}

.nl-portfolio .nl-truck__remove svg {
	width: 20px;
	height: 20px;
}

.nl-portfolio .nl-truck__status:empty {
	display: none;
}

.nl-portfolio .nl-truck__status {
	font-size: 15px;
	font-weight: 600;
	color: var(--nl-navy);
}

/* Empty truck: only shown with .is-empty. */
.nl-portfolio .nl-truck__empty {
	display: none;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 32px;
	border-radius: var(--nl-r-l);
	background: var(--nl-surface);
	font-size: 16px;
	color: var(--nl-navy);
}

.nl-portfolio.nl-truck.is-empty .nl-truck__empty {
	display: flex;
}

.nl-portfolio.nl-truck.is-empty .nl-truck__summary {
	display: none;
}

/* The link to the request page in "How it works" and other Elementor elements next to the widget that only
   make sense with products in the truck (e.g. the note on quantities: CSS class "nl-truck-hide-empty"). */
body:has(.nl-truck.is-empty) .nl-truck-request-link,
body:has(.nl-truck.is-empty) .nl-truck-hide-empty {
	display: none;
}

.nl-portfolio .nl-truck__cta,
.nl-portfolio .nl-truck__cta:visited {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 52px;
	padding: 0 32px;
	border-radius: var(--nl-r-pill);
	background: var(--nl-action);
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.nl-portfolio .nl-truck__cta:hover {
	background: var(--nl-navy);
	color: #fff;
}

.nl-portfolio .nl-truck__cta svg {
	width: 18px;
	height: 18px;
}

@media (max-width: 1024px) {
	.nl-portfolio .nl-truck__title {
		font-size: 34px;
	}
}

@media (max-width: 767px) {
	.nl-portfolio .nl-truck__icon {
		width: 52px;
		height: 52px;
	}

	.nl-portfolio .nl-truck__icon svg {
		width: 26px;
		height: 26px;
	}

	.nl-portfolio .nl-truck__title {
		font-size: 28px;
	}

	.nl-portfolio .nl-truck__group-title {
		font-size: 20px;
	}

	.nl-portfolio .nl-truck__item {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 12px;
		padding: 12px;
	}

	.nl-portfolio .nl-truck__media {
		width: 72px;
		height: 72px;
	}

	.nl-portfolio .nl-truck__name {
		font-size: 16px;
	}

	.nl-portfolio .nl-truck__controls {
		grid-column: 1 / -1;
		justify-content: space-between;
	}

	.nl-portfolio .nl-truck__empty {
		padding: 24px;
	}
}
