/*
 * author Alex
 * 16.11.2026
 *
 * Route page blocks of ai-marketing stage 2 (loaded only when one of switches is on):
 * strip "Ціни на найближчі 7 днів" (2.4), seats label in card (2.2), "оновлено" line (2.3),
 * rating line under H1 (2.6). Figma node 3316:26487 + corrections of mockup 16.11.2026
 * (contrast: date #5F5F5F, labels #4F7A0F / #3F6608 / #A84800, selected 2px #3E4492).
 */

/* ---------- checkout step ---------- */
/* when visitor pressed "Вибрати" the order form replaces the trip list and JS puts
   .seo-checkout-active on body (seo-ai.css hides H1 and SEO blocks the same way):
   strip of days, rating line and deep link note are noise there and the strip
   stood right on top of "Оформлення заказу" */
body.seo-checkout-active .ai-days,
body.seo-checkout-active .ai-rating,
body.seo-checkout-active .ai-dl-note {
    display: none !important;
}

/* ---------- rating line under H1 (2.6) ---------- */

.ai-rating {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: -8px 0 18px;
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 16px;
	line-height: 1.4;
	color: #333;
}
.ai-rating b {
	font-weight: 700;
	color: #000;
}
.ai-rating-star {
	flex: 0 0 auto;
	display: block;
}
.ai-rating .ai-sep {
	color: #6B6B6B;
}
.ai-rating-link,
.ai-rating-link:visited {
	color: #4F7A0F;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.ai-rating-link:hover,
.ai-rating-link:focus {
	color: #3F6608;
}
.ai-rating-link-short {
	display: none;
}

/* ---------- strip of 7 days (2.4) ---------- */

.ai-days {
	margin: 24px 0 4px;
	font-family: 'Roboto Condensed', sans-serif;
}
.ai-days-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.ai-days-title {
	margin: 0;
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: #000;
}
.ai-days-other,
.ai-days-other:visited {
	flex: 0 0 auto;
	font-size: 16px;
	color: #4F7A0F;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.ai-days-other:hover,
.ai-days-other:focus {
	color: #3F6608;
}
.ai-days-list {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 10px;
}
.ai-day {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	min-height: 86px;
	padding: 10px 12px;
	border: 1px solid #DADADA;
	border-radius: 8px;
	background: #fff;
	color: #000;
	text-decoration: none;
	transition: border-color .15s;
}
a.ai-day:hover,
a.ai-day:focus {
	color: #000;
	text-decoration: none;
}
a.ai-day:hover {
	border-color: #3E4492;
}
a.ai-day:focus-visible {
	outline: 2px solid #3E4492;
	outline-offset: 2px;
}
.ai-day-date {
	font-size: 13px;
	line-height: 1.3;
	color: #5F5F5F;
	white-space: nowrap;
}
.ai-day-price {
	font-size: 14px;
	line-height: 1.3;
	color: #000;
	white-space: nowrap;
}
.ai-day-price b {
	font-size: 17px;
	font-weight: 700;
}
.ai-day-note {
	font-size: 13px;
	line-height: 1.3;
	white-space: nowrap;
}
.ai-day-note--ok {
	color: #4F7A0F;
}
.ai-day-note--cheap {
	color: #3F6608;
	font-weight: 700;
}
.ai-day-note--low {
	color: #A84800;
	font-weight: 700;
}
.ai-day-price--check {
	font-size: 14px;
	color: #3E4492;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* D52: day is being asked in background - "перевірити ціну" pulses softly */
.ai-day--busy .ai-day-price--check {
	animation: ai-day-busy 1.2s ease-in-out infinite;
}
@keyframes ai-day-busy {
	0%, 100% { opacity: 1; }
	50% { opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
	.ai-day--busy .ai-day-price--check {
		animation: none;
		opacity: .6;
	}
}

/* cheapest: green frame and fill */
.ai-day--cheap {
	border-color: #A9C95A;
	background: #F5F9EA;
}
/* no trips / sold out: dashed, pale, text still readable */
.ai-day--off {
	border: 1px dashed #D0D0D0;
	background: #FAFAFA;
}
.ai-day--off .ai-day-date,
.ai-day--off .ai-day-price--off {
	color: #6B6B6B;
}
.ai-day-price--off {
	font-size: 15px;
	font-weight: 700;
	white-space: normal;
}
/* selected day = search date: 2px brand frame and fill, label keeps seats state.
   padding is 1px less, so text does not jump */
.ai-day.ai-day--sel,
a.ai-day.ai-day--sel:hover {
	border: 2px solid #3E4492;
	background: #F1F2FA;
	padding: 9px 11px;
}

/* ---------- "оновлено" line under results count (2.3) ---------- */

.ai-updated {
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 14px;
	line-height: 1.3;
	color: #6B6B6B;
}
/* count and line one under other, filter button on the right */
.route-sorting-right:has(> .ai-updated) {
	display: grid !important;
	grid-template-columns: auto auto;
	align-items: center;
	gap: 2px 22px !important;
}
.route-sorting-right:has(> .ai-updated) > .sorting-count {
	grid-column: 1;
	grid-row: 1;
	text-align: right;
	align-self: end;
}
.route-sorting-right:has(> .ai-updated) > .ai-updated {
	grid-column: 1;
	grid-row: 2;
	text-align: right;
	align-self: start;
}
.route-sorting-right:has(> .ai-updated) > .sort {
	grid-column: 2;
	grid-row: 1 / span 2;
}

/* ---------- seats label in card (2.2) ---------- */

.lb-tc3 .tc3-price .tc3-seats {
	display: block;
	margin-top: 6px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	color: #A84800;
	text-align: right;
	white-space: nowrap;
}

/* ---------- phone ---------- */

@media screen and (max-width: 991px) {
	.ai-rating {
		margin: -4px 0 14px;
		font-size: 14px;
		gap: 2px 6px;
	}
	.ai-rating-link-full {
		display: none;
	}
	.ai-rating-link-short {
		display: inline;
	}

	.ai-days {
		margin: 16px 0 0;
	}
	.ai-days-title {
		font-size: 18px;
	}
	.ai-days-other {
		font-size: 14px;
	}
	/* 7 days scroll sideways, cell about 100 x 77 (figma 360) */
	.ai-days-list {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		padding: 0 0 4px;
		scrollbar-width: none;
	}
	.ai-days-list::-webkit-scrollbar {
		display: none;
	}
	.ai-day {
		flex: 0 0 auto;
		width: 108px;
		min-height: 77px;
		padding: 8px 10px;
		gap: 2px;
		scroll-snap-align: start;
	}
	.ai-day.ai-day--sel,
	a.ai-day.ai-day--sel:hover {
		padding: 7px 9px;
	}
	.ai-day-date {
		font-size: 12px;
	}
	.ai-day-price {
		font-size: 13px;
	}
	.ai-day-price b {
		font-size: 15px;
	}
	.ai-day-note,
	.ai-day-price--check {
		font-size: 12px;
	}
	.ai-day-price--off {
		font-size: 13px;
	}

	.ai-updated {
		font-size: 12px;
	}
	.route-sorting-right:has(> .ai-updated) {
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.route-sorting-right:has(> .ai-updated) > .sorting-count,
	.route-sorting-right:has(> .ai-updated) > .ai-updated {
		text-align: left;
	}

	.lb-tc3 .tc3-price .tc3-seats {
		margin-top: 4px;
		font-size: 12px;
		text-align: left;
	}
}

/* ---------- link with chosen trip (Ф5 / 5.1), ai-route-deeplink.js ---------- */
.ai-dl-note {
	margin: 0 0 12px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #FFF4E5;
	color: #7A3500;
	font-size: 14px;
	line-height: 1.4;
}
.ai-dl-note[hidden] {
	display: none;
}
.Trip-box.ai-dl-target .tc3-card,
.Trip-box.ai-dl-target > .Box-main {
	box-shadow: 0 0 0 2px #3E4492;
	border-radius: 12px;
}
