/* Meal & Add-on card styles — shared across meal picker and addon picker */

/* Meal picker grid */
.dtec-meals-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-l);
}

/* --- Meal cards (Figma-matched) --- */

.dtec-meal-card {
	border: 1px solid var(--dtec-primary-dark);
	border-radius: 24px;
	overflow: hidden;
	background: var(--dtec-white);
	transition: transform var(--dtec-duration-fast), opacity 300ms ease;
	display: flex;
	flex-direction: column;
}

/* Fade unselected cards when day quota is full */
.dtec-meals--at-capacity .dtec-meal-card:not(.dtec-meal-card--selected) {
	opacity: 0.4;
}

.dtec-meals--at-capacity .dtec-meal-card:not(.dtec-meal-card--selected):hover {
	opacity: 0.85;
}

.dtec-meal-card--selected {
	border-color: var(--dtec-cta);
	box-shadow: 0 0 0 1px var(--dtec-cta);
}

.dtec-meal-card:hover {
	transform: translateY(-2px);
}

.dtec-meal-card__img-wrap {
	position: relative;
	background: var(--dtec-primary-light);
	height: 300px;
	min-height: 300px;
	border-bottom: 1px solid var(--dtec-primary-dark);
}

.dtec-meal-card__img {
	width: 100%;
	height: 300px;
	object-fit: cover;
	display: block;
	background: var(--dtec-border);
	border-radius: 24px 24px 0 0;
}

/* Organic badge — overlays bottom of image */
.dtec-meal-card__badge {
	position: absolute;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	background: rgba(255, 255, 255, 0.13);
	padding: var(--space-2xs) var(--space-xs);
	border-top-right-radius: 5px;
	color: var(--dtec-white);
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.96px;
	line-height: normal;
}

.dtec-meal-card__badge svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.dtec-meal-card__price-overlay {
	position: absolute;
	top: 0;
	left: 0;
	background: var(--dtec-cta);
	color: var(--dtec-white);
	padding: var(--space-2xs) var(--space-s);
	border-radius: 0 0 5px 0;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.5px;
	z-index: 1;
}

/* Dietary tag dots below image */

.dtec-meal-card__content {
	padding: var(--space-2xl);
	display: flex;
	flex-direction: column;
	flex: 1;
}

.dtec-meal-card__tags {
	display: flex;
	gap: 8px;
	min-height: 32px;
	flex-wrap: wrap;
	margin-bottom: var(--space-3xs);
}

/* Shared dietary tag pill — used by both card tags and legend items */
.dtec-tag-pill,
.dtec-meal-card__tag,
.dtec-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border-radius: 5px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 1;
	white-space: nowrap;
	background: rgba(160, 186, 24, 0.1);
	color: var(--dtec-text);
}


.dtec-meal-card__tag svg,
.dtec-meal-card__tag-icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.dtec-meal-card__name {
	font-size: 26px;
	font-weight: 600;
	line-height: normal;
	color: var(--dtec-text);
	margin: 0 0 var(--space-3xs);
	padding: 0;
	text-align: left;
}

.dtec-meal-card__desc {
	font-size: 0.8125rem;
	color: var(--dtec-text-muted-75, rgba(46, 40, 38, 0.75));
	line-height: 1.45;
	padding: 0;
	margin: 0;
	text-align: left;
}

/* Qty controls — Figma: rounded square aubergine buttons */
/* Shared qty controls */
.dtec-qty {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.dtec-meal-card__qty {
	margin-top: auto;
	padding-top: var(--space-s);
}

.dtec-addon-card__recurring {
	display: flex;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transform: translateY(-6px);
	padding-top: 0;
	pointer-events: none;
	transition:
		max-height 220ms ease,
		opacity 180ms ease,
		transform 220ms ease,
		padding-top 220ms ease;
}

.dtec-addon-card__recurring--visible {
	max-height: 56px;
	opacity: 1;
	transform: translateY(0);
	padding-top: var(--space-s);
	pointer-events: auto;
}

.dtec-addon-card__recurring-label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	color: var(--dtec-text-muted-75, rgba(46, 40, 38, 0.75));
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	background: #e9e0e45e;
	border-radius: 8px;
	padding: 10px;
	width: 100%;
}

.dtec-addon-card__recurring-label span {
	position: relative;
	top: 1px;
}

.dtec-addon-card__recurring-input {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid rgba(46, 40, 38, 0.2);
	border-radius: 4px;
	background: var(--dtec-white);
	flex-shrink: 0;
	position: relative;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dtec-addon-card__recurring-input:checked {
	border-color: var(--dtec-cta);
	background: var(--dtec-cta);
}

.dtec-addon-card__recurring-input:checked::after {
	content: '';
	position: absolute;
	inset: 2px;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12.5L9.5 18L20 6' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.dtec-qty__btn {
	width: 50px;
	height: 50px;
	border-radius: 5px;
	border: none;
	background: var(--dtec-primary-light);
	color: var(--dtec-text);
	cursor: pointer;
	font-size: 20px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--dtec-duration-fast);
	line-height: normal;
	padding: 0;
}

.dtec-qty__btn:hover {
	background: var(--dtec-primary);
	color: var(--dtec-white);
}

.dtec-qty__btn:active {
	background: var(--dtec-primary-dark);
	color: var(--dtec-white);
}

.dtec-qty__val {
	height: 50px;
	padding: 0 var(--space-xl);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	color: var(--dtec-text);
	letter-spacing: 0.96px;
	text-transform: uppercase;
	border: 1px solid rgba(46, 40, 38, 0.15);
	border-radius: 5px;
}

.dtec-meals__counter {
	font-weight: var(--dtec-font-semibold);
	color: var(--dtec-text-muted-75, rgba(46, 40, 38, 0.75));
	margin-bottom: var(--space-2xs);
	font-size: var(--text-m);
}

/* Filter pills */
.dtec-filters {
	display: flex;
	justify-content: center;
	gap: var(--space-xs);
	margin-bottom: var(--space-l);
	flex-wrap: wrap;
}

.dtec-filter {
	position: relative;
}

.dtec-filter__btn {
	display: flex;
	height: 64px;
	padding: 20px 25px;
	align-items: center;
	gap: 10px;
	border-radius: 5px;
	border: 1px solid rgba(46, 40, 38, 0.75);
	background: var(--dtec-white);
	color: var(--dtec-text);
	font-size: var(--text-m);
	font-weight: 700;
	line-height: normal;
	cursor: pointer;
	transition: all var(--dtec-duration-fast);
}

.dtec-filter__btn:hover {
	background: var(--dtec-primary);
	color: var(--dtec-bg);
}

.dtec-filter__btn--active {
	background: var(--dtec-primary);
	color: var(--dtec-bg);
}

.dtec-filter__arrow {
	margin-left: 2px;
	display: inline-block;
	width: 11.001px;
	height: 6.001px;
	aspect-ratio: 11 / 6;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask-image: url('/wp-content/uploads/2026/04/dropdown-chevron-icon.svg');
	mask-image: url('/wp-content/uploads/2026/04/dropdown-chevron-icon.svg');
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	transition: transform var(--dtec-duration-fast);
}

.dtec-filter:has(.dtec-filter__dropdown--open) .dtec-filter__arrow {
	transform: rotate(180deg);
}

.dtec-filter__dropdown {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: var(--dtec-white);
	border: 1px solid rgba(46, 40, 38, 0.15);
	border-radius: 10px;
	padding: 12px;
	min-width: 240px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	z-index: 10;
	display: none;
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.dtec-filter__dropdown--open {
	display: block;
	opacity: 1;
	transform: translateX(-50%) translateY(8px);
}

.dtec-filter__option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	cursor: pointer;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	color: var(--dtec-text);
	transition: background 0.1s ease;
}

.dtec-filter__option input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(46, 40, 38, 0.2);
	border-radius: 4px;
	cursor: pointer;
	flex-shrink: 0;
	position: relative;
	background: var(--dtec-white);
	transition: border-color 0.15s ease;
}

.dtec-filter__option input[type="checkbox"]:checked {
	border-color: transparent;
	background: transparent;
}

.dtec-filter__option input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	inset: -2px;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12.5L9.5 18L20 6' stroke='%23A0BA18' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.dtec-filter__option:hover {
	background: rgba(160, 186, 24, 0.08);
}

/* Date sections — bordered card wrappers per Figma */
.dtec-date-section {
	margin-bottom: var(--space-l);
	border: 1px solid rgba(46, 40, 38, 0.30);
	border-radius: 30px;
	overflow: hidden;
	background: var(--dtec-white);
	box-shadow: 0 0 40px 0 rgba(161, 161, 161, 0.25);
}

.dtec-date-section__header {
	display: flex;
	align-items: center;
	gap: var(--space-3xl);
	padding: var(--space-3xl);
	background: var(--dtec-white);
	flex-wrap: wrap;
}

.dtec-date-section__left {
	display: flex;
	align-items: center;
	gap: var(--space-l);
}

.dtec-date-section__title {
	font-family: var(--heading-3-family, var(--dtec-font-family));
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	font-weight: var(--heading-3-weight, var(--dtec-font-semibold));
	margin: 0;
	color: var(--dtec-text);
	white-space: nowrap;
	padding-right: var(--space-l);
	border-right: 2px solid var(--dtec-border);
}


/* Grid inside date section card */
.dtec-date-section .dtec-meals-grid {
	padding: 0 var(--space-3xl) var(--space-3xl);
}

/* Dietary legend — inline row */
.dtec-legend {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	flex-wrap: wrap;
	margin-left: auto;
}

.dtec-legend__label {
	font-size: 11px;
	font-weight: var(--dtec-font-bold);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--dtec-text-muted);
}

/* Legend items inherit from shared .dtec-tag-pill above */

.dtec-legend__icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

/* Add-ons step */
.dtec-addons__subtitle {
	color: var(--dtec-text-muted);
	margin-bottom: var(--space-l);
}

.dtec-addons__sections {
	display: flex;
	flex-direction: column;
	gap: var(--space-xl);
	margin-bottom: var(--space-xl);
}

.dtec-addons__section {
	border: 1px solid rgba(46, 40, 38, 0.30);
	border-radius: 30px;
	padding: var(--space-l);
	background: var(--dtec-white);
	box-shadow: 0 0 40px 0 rgba(161, 161, 161, 0.25);
}

.dtec-addons__section-title {
	font-family: var(--heading-3-family, var(--dtec-font-family));
	font-size: 1.5rem;
	font-weight: var(--heading-3-weight, var(--dtec-font-semibold));
	margin: 0 0 var(--space-l);
	text-align: left;
}

.dtec-addons-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-l);
}

.dtec-addons-grid .dtec-meal-card__badge {
	display: none;
}

.dtec-addons__continue {
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
	display: block;
}

/* --- Add-on cards (Figma-matched) --- */

.dtec-addon-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--dtec-border-200);
	border-radius: var(--dtec-radius-xl);
	background: var(--dtec-white);
	overflow: hidden;
}

.dtec-addon-card__img-wrap {
	position: relative;
	aspect-ratio: 1;
	background: var(--dtec-neutral-100);
}

.dtec-addon-card__price {
	position: absolute;
	top: var(--space-s);
	left: var(--space-s);
	padding: var(--space-3xs) var(--space-s);
	background: var(--dtec-primary-light);
	color: var(--dtec-primary);
	font-size: var(--text-s);
	font-weight: var(--dtec-font-bold);
	border-radius: var(--dtec-radius-full);
	z-index: 1;
}

.dtec-addon-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dtec-addon-card__img-placeholder {
	width: 100%;
	height: 100%;
	background: var(--dtec-neutral-200);
}

.dtec-addon-card__body {
	padding: var(--space-l);
	flex: 1;
}

.dtec-addon-card__name {
	font-size: var(--text-l);
	font-weight: var(--dtec-font-bold);
	color: var(--dtec-text);
	margin: 0 0 var(--space-2xs);
}

.dtec-addon-card__desc {
	font-size: var(--text-s);
	color: rgba(46, 40, 38, 0.75);
	line-height: 1.5;
	margin: 0;
}

.dtec-addon-card__qty {
	display: flex;
	border-top: 1px solid var(--dtec-border-200);
}

.dtec-addon-card__qty-btn {
	flex: 1;
	height: 48px;
	background: var(--dtec-white);
	border: none;
	font-size: var(--text-l);
	color: var(--dtec-text);
	cursor: pointer;
	transition: background var(--dtec-duration-fast) var(--dtec-ease-default);
}

.dtec-addon-card__qty-btn:hover {
	background: var(--dtec-neutral-100);
}

.dtec-addon-card__qty-val {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	font-size: var(--text-m);
	font-weight: var(--dtec-font-semibold);
	color: var(--dtec-text);
	border-left: 1px solid var(--dtec-border-200);
	border-right: 1px solid var(--dtec-border-200);
}

/* Countdown inside date section headers — value above, unit below */
.dtec-date-section__countdown .dtec-countdown {
	flex-direction: row;
	gap: var(--space-s);
	align-items: center;
}

.dtec-date-section__countdown .dtec-countdown__label {
	font-size: 21px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--dtec-text);
	margin: 0;
}

.dtec-date-section__countdown .dtec-countdown__boxes {
	gap: var(--space-2xs);
}

.dtec-date-section__countdown .dtec-countdown__box {
	flex-direction: column;
	align-items: center;
	gap: 0;
	padding: 0;
	min-width: auto;
	background: none;
	border-radius: 0;
}

.dtec-date-section__countdown .dtec-countdown__value {
	font-size: 32px;
	font-weight: 600;
	color: var(--dtec-primary-dark);
	line-height: normal;
}

.dtec-date-section__countdown .dtec-countdown__unit {
	font-size: 14px;
	font-weight: 700;
	color: var(--dtec-text);
	text-transform: uppercase;
	letter-spacing: 0.84px;
}

/* Responsive */
@media (max-width: 1200px) {
	.dtec-meals-grid,
	.dtec-addons-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
	.dtec-date-section__header {
		gap: var(--space-l);
		padding: var(--space-xl);
	}

	.dtec-date-section__left {
		flex-wrap: wrap;
		gap: var(--space-s);
	}

	.dtec-date-section__title {
		font-size: 1.25rem;
	}

	.dtec-date-section__countdown .dtec-countdown__label {
		font-size: 16px;
	}

	.dtec-date-section__countdown .dtec-countdown__value {
		font-size: 24px;
	}
}

@media (max-width: 768px) {
	.dtec-meals-grid,
	.dtec-addons-grid { grid-template-columns: repeat(2, 1fr); }

	.dtec-date-section__header {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-m);
		padding: var(--space-l);
	}

	.dtec-date-section__left {
		flex-direction: column;
		align-items: flex-start;
		width: 100%;
	}

	.dtec-date-section__title {
		border-right: none;
		padding-right: 0;
		border-bottom: 2px solid var(--dtec-border);
		padding-bottom: var(--space-2xs);
		width: 100%;
	}

	.dtec-legend {
		margin-left: 0;
		width: 100%;
	}
}

@media (max-width: 480px) {
	.dtec-meals-grid,
	.dtec-addons-grid { grid-template-columns: 1fr; }

	.dtec-date-section .dtec-meals-grid {
		padding: var(--space-s);
	}
}
