/**
 * Season Content → Отправления → стили.
 * 1) Карточки виджетов (в 3-й колонке тура и в превью-шорткоде).
 * 2) Всплывающее окно места: ПК — диалог по центру, мобайл — шторка снизу.
 *
 * Переменные с фолбэками — чтобы блок жил и вне темы (в превью).
 */

.season-dep {
	--dep-radius: 16px;
	--dep-border: #e6e6e6;
	--dep-bg: #fff;
	--dep-ink: #1a1a1a;
	--dep-muted: #6b7280;
	--dep-accent: #2563eb;
	font-family: inherit;
	color: var(--dep-ink);
}

.season-dep__heading {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 16px;
}

.season-dep__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ---- Группа виджета (без внешней рамки — на чистом фоне) ---- */
.season-dep__group {
	border: 0;
	border-radius: 0;
	padding: 0;
	background: transparent;
}

.season-dep__group-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 14px;
	line-height: 1.3;
}
/* Иконка-пин перед заголовком (как в старом виджете) */
.season-dep__group-title::before {
	content: "";
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2316140f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---- Мини-карточки мест ---- */
.season-dep__cards {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Карточка в стиле блока «Акции»: фото слева во всю высоту, белый фон,
   тонкая рамка, «Подробнее ›» оранжевой ссылкой со стрелкой. */
.season-dep__card {
	display: flex;
	gap: 0;
	width: 100%;
	text-align: left;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 16px;
	padding: 0;
	margin: 0;
	overflow: hidden;           /* фото прижато к скруглённому краю */
	align-items: stretch;       /* фото на всю высоту карточки */
	min-height: 132px;
	cursor: pointer;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.season-dep__card:hover,
.season-dep__card:focus-visible,
.season-dep__card:active {
	/* Перекрываем глобальное button:hover{background:#E86B18} из header.css —
	   фон остаётся белым, только добавляется лёгкая тень. */
	background: #fff;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
	outline: none;
}

.season-dep__card-thumb {
	position: relative;
	flex: 0 0 168px;
	align-self: stretch;        /* во всю высоту карточки, до краёв */
	background: #e4e6e9;
	overflow: hidden;
}

/* Номер + бейдж «Основная посадка» — в ряд, поверх фото слева-сверху */
.season-dep__card-overlay {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 6px;
}

.season-dep__card-num {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

/* Бейдж «Основная посадка» — фон как у иконок «Включено в стоимость» */
.season-dep__card-badge {
	padding: 4px 10px;
	border-radius: 999px;
	background: #ffffffba;
	color: #161410;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}
.season-dep__card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.season-dep__card-thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9aa1a9;
}

.season-dep__card-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 7px;
	min-width: 0;
	flex: 1 1 auto;
	padding: 16px 20px;
}

.season-dep__card-title {
	font-size: 18px;           /* как #tour-tabs .tour-akcii__name */
	font-weight: 600;
	line-height: 1.2;
	color: #16140f;
}

.season-dep__card-excerpt {
	color: var(--dep-muted);
	font-size: 14px;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* «Подробнее» — тёмный, со стрелкой, текст с пунктирным подчёркиванием */
.season-dep__card-more {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	align-self: flex-start;
	margin-top: 3px;
	font-size: 14px;
	font-weight: 600;
	color: #16140f;
}
.season-dep__card-more > span {
	text-decoration: underline dashed;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}
.season-dep__card-more::after {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2316140f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") no-repeat center / contain;
}

@media (max-width: 560px) {
	.season-dep__card-thumb { flex-basis: 120px; }
	.season-dep__card-body { padding: 14px 16px; }
}

/* ---- Заметка ---- */
.season-dep__note {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--dep-border);
	color: var(--dep-muted);
	font-style: italic;
	font-size: .92rem;
	line-height: 1.5;
}
.season-dep__note p { margin: 0 0 .4em; }
.season-dep__note p:last-child { margin-bottom: 0; }

/* Живая карта Яндекса вверху страницы места отправления */
.season-dep-place-map {
	width: 100%;
	height: 420px;
	margin-bottom: 16px;
	border-radius: 14px;
	overflow: hidden;
	background: #eef0f2;
}
@media (max-width: 768px) {
	.season-dep-place-map { height: 300px; }
}

/* Строка «Адрес: …» над описанием на странице места */
.op-entry__address { margin: 0 0 12px; }

/* «места посадки: …» в шапке тура — цвет/шрифт как у значений шапки, но подчёркнуты */
.season-dep-boarding__list a {
	color: inherit;
	font: inherit;
	text-decoration: underline dashed;   /* пунктир */
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	cursor: pointer;
}

/* Одна строка + чип «+N» (как «+192 дат»); клик — разворачивает все */
.tour-header__depart.season-dep-boarding { align-items: baseline; }
.season-dep-boarding__list {
	flex: 0 1 auto;        /* по ширине контента, чтобы чип шёл сразу после текста */
	min-width: 0;
	white-space: nowrap;   /* в свёрнутом виде — одна строка */
	overflow: hidden;
}
.season-dep-boarding.is-expanded .season-dep-boarding__list {
	white-space: normal;   /* развёрнуто — можно в несколько строк */
	overflow: visible;
}

/* Запятые между местами (после каждого, кроме структурно последнего
   и кроме последнего видимого в свёрнутом виде) */
.season-dep-boarding__item:not(:last-child)::after { content: ", "; }
.season-dep-boarding__item.is-last-visible::after { content: none; }
.season-dep-boarding__item.is-hidden { display: none; }

/* Чип «+N» — как «+192 дат» (.tour-single__next-more) */
.season-dep-boarding__more {
	flex: 0 0 auto;
	align-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	padding: 0 8px;
	border: 0;
	border-radius: 999px;
	background: #dcdcdc;
	color: #111;
	font-size: 14px;
	line-height: 1;
	font-weight: 300;
	cursor: pointer;
}
.season-dep-boarding__more[hidden] { display: none; }
.season-dep-boarding__more:hover { background: #dcdcdc; }   /* перебивает глобальный button:hover */

/* =========================================================================
 * Всплывающее окно
 * ====================================================================== */

html.season-dep-lock { overflow: hidden; }

.season-dep-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.season-dep-modal[hidden] { display: none; }

.season-dep-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	opacity: 0;
	transition: opacity .25s ease;
}
.season-dep-modal.is-open .season-dep-modal__overlay { opacity: 1; }

.season-dep-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(560px, calc(100vw - 32px));
	max-height: min(88vh, 900px);
	background: #fff;
	color: #1a1a1a;
	border-radius: 18px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
	overflow: hidden;
	transform: translateY(16px) scale(.98);
	opacity: 0;
	transition: transform .28s cubic-bezier(.22,.61,.36,1), opacity .28s ease;
	outline: none;
}
.season-dep-modal.is-open .season-dep-modal__dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.season-dep-modal__scroll {
	max-height: min(88vh, 900px);
	overflow-y: auto;
	padding: 0 0 20px;
	-webkit-overflow-scrolling: touch;
}

.season-dep-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
	padding: 0;                 /* перебиваем глобальный padding у button темы */
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	transition: background-color .15s ease;
}
/* Крестик рисуем через CSS — не зависит от SVG/kses/темы. */
.season-dep-modal__close::before,
.season-dep-modal__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: var(--color-primary, #E86B18);   /* фирменный цвет */
}
.season-dep-modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.season-dep-modal__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.season-dep-modal__close:hover { background: #f2f2f2; }

.season-dep-modal__photo {
	position: relative;
	margin: 0;
	line-height: 0;
	background: #f1f1f1;
}
.season-dep-modal__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	padding: 6px 12px;
	border-radius: 999px;
	background: #ffffffe6;
	color: #161410;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.season-dep-modal__badge[hidden] { display: none; }
.season-dep-modal__photo img {
	width: 100%;
	height: auto;
	max-height: 300px;
	object-fit: cover;
	display: block;
}

.season-dep-modal__title {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 18px 22px 10px;
	line-height: 1.25;
}

.season-dep-modal__short {
	margin: 0 22px 16px;
	color: #374151;
	font-size: 1rem;
	line-height: 1.55;
}
.season-dep-modal__short p { margin: 0 0 .6em; }
.season-dep-modal__short p:last-child { margin-bottom: 0; }

.season-dep-modal__map {
	margin: 0 22px 18px;
	height: 260px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef0f2;
}
.season-dep-modal__map[hidden] { display: none; }

.season-dep-modal__btn {
	display: none;   /* временно скрыто — вернуть inline-flex, чтобы показать «Открыть страницу» */
	align-items: center;
	justify-content: center;
	margin: 0 22px;
	padding: 13px 22px;
	background: #f60;
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	border-radius: 12px;
	transition: filter .15s ease;
}
.season-dep-modal__btn:hover { filter: brightness(.94); color: #fff; }
.season-dep-modal__btn[hidden] { display: none; }

/* ---- Мобайл: шторка снизу ---- */
@media (max-width: 768px) {
	.season-dep-modal {
		align-items: flex-end;
		justify-content: stretch;
	}
	.season-dep-modal__dialog {
		width: 100%;
		max-height: 75vh;   /* не выше ~75% — сверху остаётся зазор, крестик всегда виден */
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
	}
	.season-dep-modal.is-open .season-dep-modal__dialog {
		transform: translateY(0);
	}
	.season-dep-modal__scroll { max-height: 75vh; }
}

@media (prefers-reduced-motion: reduce) {
	.season-dep-modal__overlay,
	.season-dep-modal__dialog { transition: opacity .01s linear; }
}
