/* Delivery dates in the cart / checkout order summary (markup: modules/delivery_dates_display.php,
   popover: assets/js/delivery-dates.js). The line shows a link "👁 20 дни · 26.11 – 15.12"; the
   calendar panel next to it stays hidden in the line and is shown in a popover on <body>. */

/* ── The link in the order line ── */
.fp-dd__link {
	align-items: center;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: #2a5446 !important;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	gap: 6px;
	letter-spacing: normal;
	line-height: inherit;
	margin: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	text-align: left;
	text-decoration: underline dotted;
	text-transform: none;
	text-underline-offset: 3px;
	white-space: normal;
}

.fp-dd__link:hover,
.fp-dd__link[aria-expanded="true"] {
	text-decoration-style: solid;
}

.fp-dd__link:focus-visible {
	outline: 2px solid #2a5446;
	outline-offset: 2px;
}

/* eye icon: tells the customer the dates can be opened */
.fp-dd__link::before {
	background: currentColor;
	content: "";
	flex: none;
	height: 16px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 16px;
}

/* the panel lives in the line only as a source for the popover */
.fp-dd .fp-dd__panel {
	display: none !important;
}

/* ── The popover (moved to <body> while open) ── */
.fp-dd-pop {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(20, 40, 32, .22), 0 0 0 1px rgba(20, 40, 32, .08);
	box-sizing: border-box;
	color: #1d2a24;
	font-family: inherit;
	max-height: calc(100vh - 24px);
	max-width: calc(100vw - 24px);
	overflow: auto;
	padding: 14px 16px 12px;
	position: fixed;
	width: max-content;
	z-index: 100000;
}

.fp-dd-pop[hidden] {
	display: none;
}

.fp-dd-pop__arrow {
	background: #fff;
	box-shadow: -1px -1px 0 rgba(20, 40, 32, .08);
	height: 12px;
	position: absolute;
	transform: rotate(45deg);
	width: 12px;
}

.fp-dd-pop.is-above .fp-dd-pop__arrow {
	box-shadow: 1px 1px 0 rgba(20, 40, 32, .08);
}

.fp-dd-pop.is-centered .fp-dd-pop__arrow {
	display: none;
}

.fp-dd-pop .fp-dd__panel {
	display: block;
}

.fp-dd__head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	margin-bottom: 10px;
	padding-right: 28px;
	position: relative;
}

.fp-dd__head-title {
	font-size: 15px;
	font-weight: 700;
}

.fp-dd__head-sum {
	color: #2a5446;
	font-size: 13px;
	font-weight: 600;
}

.fp-dd__close {
	background: none !important;
	border: 0 !important;
	color: #5c6d64 !important;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	min-height: 0 !important;
	padding: 0 4px !important;
	position: absolute;
	right: -6px;
	top: -4px;
}

.fp-dd__months {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 22px;
}

.fp-dd__month {
	display: block;
	width: 224px;
}

.fp-dd__title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 6px;
	text-align: center;
}

.fp-dd__title::first-letter {
	text-transform: uppercase;
}

.fp-dd__grid {
	display: grid;
	gap: 3px;
	grid-template-columns: repeat(7, 1fr);
}

.fp-dd__wd {
	color: #7c8a83;
	font-size: 11px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
}

.fp-dd__day {
	align-items: center;
	aspect-ratio: 1;
	border: 1.5px solid transparent;
	border-radius: 50%;
	box-sizing: border-box;
	color: #4d5a54;
	display: flex;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	justify-content: center;
	line-height: 1;
}

/* a delivery day: same filled circle as the product-page calendar */
.fp-dd__day.is-on {
	background: #2a5446;
	color: #fff;
	font-weight: 700;
}

/* a weekday inside the period without delivery */
.fp-dd__day.is-gap {
	border-color: #d64545;
	color: #d64545;
	font-weight: 700;
}

.fp-dd__day.is-off {
	text-decoration: line-through;
}

/* before the first or after the last delivery */
.fp-dd__day.is-out {
	color: #c4ccc8;
}

.fp-dd__day.is-blank {
	visibility: hidden;
}

.fp-dd__legend {
	border-top: 1px solid #e3e9e5;
	color: #5c6d64;
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	gap: 6px 16px;
	margin-top: 12px;
	padding-top: 10px;
}

.fp-dd__key {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}

.fp-dd__key .fp-dd__day {
	aspect-ratio: auto;
	font-size: 9px;
	height: 18px;
	width: 18px;
}

/* Phone: the popover is centred on screen, so are the month blocks in it */
@media (max-width: 599px) {
	.fp-dd__months {
		justify-content: center;
	}
}

/* ── "Менюта: 👁 6 - степенно меню" — the chosen components (render_meals()) ── */
.fp-dd__meals {
	display: grid;
	gap: 8px 22px;
	grid-template-columns: repeat(2, max-content);
}

.fp-dd__meal {
	align-items: center;
	display: flex;
	font-size: 14px;
	font-weight: 600;
	gap: 8px;
}

.fp-dd__meal::before {
	color: #2a5446;
	content: "✓";
	font-weight: 700;
}

@media (max-width: 420px) {
	.fp-dd__meals {
		grid-template-columns: 1fr;
	}
}

/* ── Open in place, no link / popover: the admin order screen (admin_calendar()) ── */
.fp-dd-inline {
	background: #f6f8f7;
	border: 1px solid #e3e9e5;
	border-radius: 12px;
	box-sizing: border-box;
	color: #1d2a24;
	display: inline-block;
	max-width: 100%;
	padding: 12px 14px 10px;
}

.fp-dd-inline .fp-dd__link,
.fp-dd-inline .fp-dd__close {
	display: none !important;
}

.fp-dd-inline .fp-dd .fp-dd__panel {
	display: block !important;
}

.fp-dd-inline .fp-dd__head {
	padding-right: 0;
}

.fp-dd-inline .fp-dd__day.is-on.is-past {
	background: #9db5ab;
}

.fp-dd-inline .fp-dd__day.is-today {
	box-shadow: 0 0 0 2px #e8b931;
}
