/* «Моя поездка»: кнопка в углу и боковая панель; на телефоне — плашка внизу и шторка.
   Кнопка жёлтая (дизайн D): на тёмно-синей странице её должно быть видно. */

.fj-trip[hidden], .fj-trip [hidden] { display: none !important; }
/* У сайта section { padding-top: 76px } — в панели это лишний отступ. */
.fj-trip section { padding-top: 0; }
.fj-trip-pill {
  position: fixed; z-index: 40; right: 20px; bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 18px;
  border: 0; border-radius: 999px; background: #FFC83D; color: #0B1A2A; font: inherit; font-size: 14px; font-weight: 800;
  box-shadow: 0 16px 36px -14px rgba(21, 44, 64, .6); cursor: pointer;
}
.fj-trip-pill b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #0B1A2A; color: #FFC83D; font-size: 13px; }
.fj-trip-pill small { font-weight: 500; opacity: .8; }
.fj-trip-pill__icon { font-size: 16px; }
.fj-trip-pill.is-bump { animation: fj-trip-bump .5s cubic-bezier(.2, .7, .2, 1); }
/* Пока открыто окно рейса, отеля или тура, кнопка видна сквозь затемнение, но нажатие попадает
   на затемнение и закрывает окно — прячем её; поездку открывает «Открыть «Мою поездку»» в окне. */
body:has(dialog[open]) .fj-trip-pill { display: none; }
@keyframes fj-trip-bump { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }

.fj-trip-drawer {
  position: fixed; z-index: 45; top: 16px; right: 16px; bottom: 84px; width: min(400px, calc(100% - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper, #faf8f3); color: var(--ink, #1e2a3a); border: 1px solid var(--line, #e7e3da); border-radius: 22px;
  box-shadow: 0 30px 60px -24px rgba(21, 44, 64, .45); animation: fj-trip-in .3s cubic-bezier(.2, .7, .2, 1);
}
@keyframes fj-trip-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.fj-trip__top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.fj-trip__top h2 { margin: 0; font-size: 24px; }
.fj-trip__body { display: grid; gap: 14px; align-content: start; padding: 10px 20px 20px; overflow-y: auto; }

.fj-trip__steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.fj-trip__steps li { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line, #e7e3da); color: var(--muted, #6b6f7a); }
.fj-trip__steps li.is-done { background: #e5f4e4; border-color: #cfe8cd; color: #24683a; font-weight: 600; }

.fj-trip__items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fj-trip__item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line, #e7e3da); border-radius: 14px; background: #fff; }
.fj-trip__item > div:first-child { display: grid; gap: 2px; min-width: 0; }
.fj-trip__item small { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b6f7a); }
.fj-trip__item strong { font-size: 15px; overflow-wrap: anywhere; }
.fj-trip__item span { font-size: 13px; color: var(--muted, #6b6f7a); }
.fj-trip__side { display: grid; justify-items: end; align-content: space-between; gap: 6px; white-space: nowrap; }
.fj-trip__remove { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted, #6b6f7a); cursor: pointer; }
.fj-trip__remove:hover { background: #fbebeb; color: #8a1f1f; }

.fj-trip__next { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: var(--lilac, #eeeaf8); }
.fj-trip__next span { font-size: 13px; color: var(--muted, #6b6f7a); }
.fj-trip__next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.fj-trip__skip, .fj-trip__clear { border: 0; background: none; padding: 0; color: var(--muted, #6b6f7a); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.fj-trip__clear { justify-self: center; }
.fj-trip__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line, #e7e3da); }
.fj-trip__total strong { font-size: 22px; color: var(--blue, #1f4e79); }
.fj-trip__body .fj-note { margin: -6px 0 0; font-size: 12px; }
.fj-trip__order { width: 100%; }

/* Кнопка в окнах выбора */
.fj-trip-add.is-added { border-color: #cfe8cd; background: #e5f4e4; color: #24683a; }
.fj-trip-add-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: inherit; gap: 8px 14px; }
.fj-trip-open { padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fj-trip-open[hidden] { display: none; }

@media (max-width: 600px) {
  .fj-trip-pill { left: 12px; right: 12px; bottom: 12px; justify-content: center; }
  /* Место под плашкой, чтобы она не закрывала конец страницы. */
  body:has(.fj-trip:not([hidden])) { padding-bottom: 76px; }
  .fj-trip-drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 85vh; border-radius: 22px 22px 0 0; animation-name: fj-trip-up; }
  @keyframes fj-trip-up { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .fj-trip-pill.is-bump, .fj-trip-drawer { animation: none; } }

/* Пока виден баннер про cookie, кнопка поездки поднимается над ним. */
body:has(.cookie-bar:not([hidden])) .fj-trip-pill { bottom: 132px; }
@media (max-width: 600px) { body:has(.cookie-bar:not([hidden])) .fj-trip-pill { bottom: 190px; } }

/* --- Схема маршрута и «Поездка по дням» --- */
.fj-trip__journey { display: grid; gap: 10px; align-content: start; }
.fj-trip__map { border-radius: 14px; background: linear-gradient(160deg, #eef1fb, #f6f2e9); border: 1px solid var(--line, #e7e3da); overflow: hidden; }
.fj-map { display: block; width: 100%; height: auto; }
.fj-map__leg { fill: none; stroke: var(--blue, #1f4e79); stroke-width: 2; stroke-dasharray: .02 .015; stroke-linecap: round; animation: fj-map-draw 1s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fj-map-draw { from { stroke-dashoffset: 1; opacity: .2; } to { stroke-dashoffset: 0; opacity: 1; } }
.fj-map__dot { fill: #fff; stroke: var(--blue, #1f4e79); stroke-width: 2.5; }
.fj-map__label { font: 600 11px Inter, system-ui, sans-serif; fill: var(--ink, #1e2a3a); paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 3px; }
.fj-map__mode, .fj-map__hotel { font-size: 14px; text-anchor: middle; }
.fj-trip__days summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.fj-timeline { margin: 10px 0 0; padding: 0 0 0 4px; list-style: none; border-left: 2px dashed var(--line, #e7e3da); }
.fj-timeline__item { position: relative; padding: 0 0 10px 16px; }
.fj-timeline__date { display: block; margin: 4px 0 6px -16px; padding-left: 16px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #6b6f7a); }
.fj-timeline__row { display: flex; gap: 10px; align-items: flex-start; }
.fj-timeline__icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-left: -30px; border-radius: 50%; background: #fff; border: 1px solid var(--line, #e7e3da); font-size: 13px; }
.fj-timeline__row strong { display: block; font-size: 14px; }
.fj-timeline__row small { display: block; color: var(--muted, #6b6f7a); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .fj-map__leg { animation: none; } }

/* Настоящая карта (Яндекс Карты) */
.fj-trip__map.is-live { height: 210px; background: #e9eef3; }
.fj-map-city { position: relative; display: inline-flex; align-items: center; gap: 4px; transform: translate(-7px, -7px); white-space: nowrap;
  font: 600 11px Inter, system-ui, sans-serif; color: #1e2a3a; }
.fj-map-city i { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2.5px solid #1f4e79; box-sizing: border-box; flex: none; }
.fj-map-city i + * , .fj-map-city { text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.fj-map-icon { display: grid; place-items: center; width: 26px; height: 26px; transform: translate(-13px, -13px); border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); font-size: 14px; }
.fj-trip__map { position: relative; }
.fj-trip__map-open { position: absolute; right: 10px; bottom: 10px; padding: 7px 12px; border: 1px solid var(--line, #e7e3da); border-radius: 999px;
  background: #fff; color: var(--ink, #1e2a3a); font: 600 12px Inter, system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.fj-trip__map-open:hover { border-color: var(--blue, #1f4e79); }
.fj-trip__extras { display: grid; gap: 10px; }
.fj-trip__extras h3 { margin: 0; font-size: 15px; }
.fj-trip__extras ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fj-trip__extras li { display: flex; flex-direction: column; gap: 4px; }
.fj-trip__extras a { display: grid; flex: 1; align-content: start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, #e3e4ea); color: inherit; text-decoration: none; }
.fj-trip__extras a:hover { border-color: currentColor; }
.fj-trip__extras strong { font-size: 13px; }
.fj-trip__extras small { font-size: 12px; color: var(--muted, #6b6f7a); }
.fj-trip__ad { margin: 0; font-size: 10px; line-height: 1.3; color: var(--muted, #6b6f7a); }
