/* [fp_weekly_menus] — the weekly menu page (FP_CRM\WeeklyMenuPage, modules/views/parts/weekly-menus.php) */
.fp-wk {
	--fp-wk-green: #2a5446;
	--fp-wk-soft: #ddeae1;
	--fp-wk-line: #dfe6e2;
	color: #1f2124;
	margin: 0 auto;
	max-width: 1180px;
	scroll-margin-top: 160px; /* clear of the sticky header */
}

.fp-wk [hidden] {
	display: none !important;
}

.fp-wk button {
	font-family: inherit;
}

/* Menu tabs */
.fp-wk__menus {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	margin-bottom: 18px;
}

.fp-wk__menu {
	align-items: center;
	background: #fff !important;
	border: 2px solid transparent !important;
	border-radius: 16px !important;
	box-shadow: 0 2px 10px rgba(31, 33, 36, .06);
	color: #1f2124 !important;
	cursor: pointer;
	display: flex;
	gap: 10px;
	min-width: 0;
	padding: 8px 12px 8px 8px !important;
	text-align: left;
	transition: border-color .15s, background-color .15s;
}

.fp-wk__menu:hover {
	border-color: var(--fp-wk-soft) !important;
}

.fp-wk__menu.is-active {
	background: var(--fp-wk-green) !important;
	border-color: var(--fp-wk-green) !important;
	color: #fff !important;
}

.fp-wk__menu-image {
	background: var(--fp-wk-soft);
	border-radius: 12px;
	flex: none;
	height: 46px;
	overflow: hidden;
	width: 46px;
}

.fp-wk__menu-image img {
	display: block;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	width: 100% !important;
}

.fp-wk__menu-name {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	min-width: 0;
	overflow-wrap: anywhere;
}

/* Panel */
.fp-wk__panel {
	background: #fff;
	border-radius: 22px;
	box-shadow: 0 6px 26px rgba(31, 33, 36, .07);
	padding: 22px 24px 26px;
	scroll-margin-top: 170px;
}

.fp-wk__head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	justify-content: space-between;
	margin-bottom: 14px;
}

.fp-wk__title {
	font-size: clamp(24px, 3vw, 34px) !important;
	line-height: 1.15 !important;
	margin: 0 !important;
}

.fp-wk a.fp-wk__order {
	background: linear-gradient(90deg, #2a5446, #2f9e44);
	border-radius: 999px;
	color: #fff !important;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 10px 26px;
	text-decoration: none !important;
	text-transform: uppercase;
}

.fp-wk__weeks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.fp-wk__week-btn {
	background: #fff !important;
	border: 2px solid var(--fp-wk-line) !important;
	border-radius: 999px !important;
	color: #1f2124 !important;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	padding: 7px 16px !important;
}

.fp-wk__week-btn.is-active {
	background: var(--fp-wk-soft) !important;
	border-color: var(--fp-wk-green) !important;
	color: var(--fp-wk-green) !important;
}

.fp-wk__week-label {
	color: #4a4f4c;
	font-weight: 700;
	margin: 0 0 12px !important;
	padding: 0 !important;
}

/* Day tabs */
.fp-wk__days {
	display: grid;
	gap: 6px;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	margin-bottom: 14px;
}

.fp-wk__day-btn {
	align-items: center;
	background: #f3f6f4 !important;
	border: 0 !important;
	border-radius: 14px !important;
	color: #1f2124 !important;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font-size: 15px;
	font-weight: 700;
	gap: 1px;
	line-height: 1.2;
	padding: 9px 4px !important;
}

.fp-wk__day-btn small {
	font-size: 12px;
	font-weight: 500;
	opacity: .75;
}

.fp-wk__day-btn.is-active {
	background: var(--fp-wk-green) !important;
	color: #fff !important;
}

/* Dishes */
.fp-wk__dish {
	align-items: flex-start;
	border-bottom: 1px solid var(--fp-wk-line);
	display: grid;
	gap: 6px 18px;
	grid-template-columns: 210px minmax(0, 1fr);
	padding: 14px 2px;
}

.fp-wk__meal {
	background: var(--fp-wk-soft);
	border-radius: 999px;
	color: var(--fp-wk-green);
	font-size: 13px;
	font-weight: 700;
	justify-self: start;
	letter-spacing: .03em;
	line-height: 1.3;
	padding: 5px 14px;
	text-transform: uppercase;
	white-space: nowrap;
}

.fp-wk__dish-title {
	font-family: inherit !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	line-height: 1.3 !important;
	margin: 0 0 6px !important;
	text-transform: none !important;
}

.fp-wk__numbers {
	align-items: baseline;
	color: #4a4f4c;
	display: flex;
	flex-wrap: wrap;
	font-size: 13.5px;
	gap: 2px 14px;
	line-height: 1.5;
	margin: 0 !important;
	padding: 0 !important;
}

.fp-wk__sex {
	color: #1f2124;
	font-weight: 700;
	min-width: 62px;
}

.fp-wk__num strong {
	color: #1f2124;
}

.fp-wk__total {
	background: #f3f6f4;
	border-radius: 14px;
	margin-top: 14px;
	padding: 12px 16px;
}

.fp-wk__total-title {
	display: block;
	margin-bottom: 4px;
}

.fp-wk__empty {
	color: #4a4f4c;
	margin: 0 !important;
}

@media (max-width: 1024px) {
	.fp-wk__menus {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	/* One swipeable row of menu tabs */
	.fp-wk__menus {
		display: flex;
		gap: 8px;
		margin: 0 -16px 14px;
		overflow-x: auto;
		padding: 4px 16px 8px;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	.fp-wk__menus::-webkit-scrollbar {
		display: none;
	}

	.fp-wk__menu {
		flex: none;
		max-width: 190px;
		scroll-snap-align: center;
	}

	.fp-wk__menu-image {
		height: 38px;
		width: 38px;
	}

	.fp-wk__menu-name {
		font-size: 14px;
	}

	.fp-wk__panel {
		border-radius: 18px;
		padding: 16px 14px 18px;
	}

	.fp-wk__days {
		gap: 4px;
	}

	.fp-wk__day-btn {
		border-radius: 10px !important;
		font-size: 13px;
		padding: 8px 2px !important;
	}

	.fp-wk__day-btn small {
		font-size: 10.5px;
	}

	.fp-wk__dish {
		grid-template-columns: minmax(0, 1fr);
		padding: 12px 0;
	}

	.fp-wk__dish-title {
		font-size: 16px !important;
	}

	.fp-wk__numbers {
		font-size: 13px;
		gap: 0 10px;
	}

	.fp-wk__sex {
		min-width: 100%;
	}
}

/* The "kitchen may change the menu" line under the allergens (moved there by WeeklyMenuPage) */
.fp-wk-note {
	color: #4a4f4c;
	font-size: 15px;
	margin: 0 !important;
	padding: 0 !important;
}

/* ── One portion size only (product page / popup, after the customer picks men's or women's) ── */
.fp-wk[data-fp-wk-sex="w"] .fp-wk__numbers--m,
.fp-wk[data-fp-wk-sex="m"] .fp-wk__numbers--w,
.fp-wk[data-fp-wk-sex] .fp-wk__sex {
	display: none;
}

.fp-wk[data-fp-wk-sex] .fp-wk__total .fp-wk__sex {
	display: none;
}

/* ── Single menu on the product page / in the popup (WeeklyMenuPage::render_for_product()) ── */
.fp-wk--single {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 4px 18px rgba(31, 33, 36, .06);
	box-sizing: border-box;
	max-width: none;
	padding: 16px 16px 18px;
	text-align: left;
}

.fp-wk--side {
	margin-top: 22px;
}

.fp-wk__single-title {
	font-size: 22px !important;
	line-height: 1.2 !important;
	margin: 0 0 10px !important;
}

.fp-wk--single .fp-wk__weeks {
	margin-bottom: 10px;
}

.fp-wk--single .fp-wk__week-btn {
	font-size: 13px;
	padding: 5px 12px !important;
}

.fp-wk--single .fp-wk__days {
	gap: 4px;
	margin-bottom: 6px;
}

.fp-wk--single .fp-wk__day-btn {
	border-radius: 10px !important;
	font-size: 13px;
	padding: 7px 2px !important;
}

.fp-wk--single .fp-wk__day-btn small {
	font-size: 10.5px;
}

.fp-wk--single .fp-wk__dish {
	gap: 6px;
	grid-template-columns: minmax(0, 1fr);
	padding: 10px 0;
}

.fp-wk--single .fp-wk__meal {
	font-size: 11.5px;
	padding: 3px 10px;
}

.fp-wk--single .fp-wk__dish-title {
	font-size: 15px !important;
	margin-bottom: 3px !important;
}

.fp-wk--single .fp-wk__numbers {
	font-size: 12.5px;
	gap: 0 10px;
}

.fp-wk--single .fp-wk__total {
	margin-top: 10px;
	padding: 10px 12px;
}

/* Named week buttons ("Текуща седмица" + dates), as on the admin screen */
.fp-wk .fp-wk__week-btn--named {
	align-items: flex-start;
	border-radius: 12px !important;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 1px;
	line-height: 1.2;
	min-width: 0;
	padding: 8px 12px !important;
	text-align: left;
}

.fp-wk .fp-wk__week-btn--named strong {
	font-size: 14px;
}

.fp-wk .fp-wk__week-btn--named small {
	font-size: 12px;
	font-weight: 500;
	opacity: .8;
}

.fp-wk .fp-wk__week-btn--named.is-active {
	background: var(--fp-wk-green) !important;
	border-color: var(--fp-wk-green) !important;
	color: #fff !important;
}

.fp-wk--single .fp-wk__weeks {
	flex-wrap: nowrap;
}

/* No portion size chosen yet: dishes only, no numbers */
.fp-wk[data-fp-wk-sex="none"] .fp-wk__numbers,
.fp-wk[data-fp-wk-sex="none"] .fp-wk__total {
	display: none;
}
