/* "По дням" in the hike planner: sticky day bar, a map that follows the scroll and an
   end-of-day summary. :not(#hf-x) outranks hike-planner-calm.css (.is-hike-mode:not(#hc-unused)). */

.is-hike-mode:not(#hf-x) [data-hike-panel="plan"] { --hf-nav-top: 76px; --hf-nav-h: 64px; }

/* ---------- Day bar pinned under the site navbar ---------- */
.is-hike-mode:not(#hf-x) [data-hike-panel="plan"] .tp-daynav {
    position: sticky; top: var(--hf-nav-top); z-index: 30;
    padding: 4px; border-radius: 14px; overflow-x: auto; scrollbar-width: none;
    background: color-mix(in srgb, var(--hc-paper, #fff) 92%, transparent); backdrop-filter: blur(14px);
    box-shadow: 0 10px 26px rgba(19, 32, 26, .1);
}
.is-hike-mode:not(#hf-x) [data-hike-panel="plan"] .tp-daynav::-webkit-scrollbar { display: none; }
.is-hike-mode:not(#hf-x) [data-hike-panel="plan"] .tp-daynav__item { transition: background .25s, color .25s, transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.is-hike-mode:not(#hf-x) [data-hike-panel="plan"] .tp-daynav__item:active { transform: scale(.97); }
/* "Start of the day" lands just below the pinned bar. */
.is-hike-mode:not(#hf-x) .tp-day { scroll-margin-top: calc(var(--hf-nav-top, 76px) + var(--hf-nav-h, 64px) + 14px); }

/* ---------- Map follows the day (desktop) ---------- */
@media (min-width: 1001px) {
    .is-hike-mode:not(#hf-x) .hc-day-columns { align-items: start; }
    .is-hike-mode:not(#hf-x) .hc-day-aside { position: sticky; top: calc(var(--hf-nav-top) + var(--hf-nav-h) + 12px); }
    .is-hike-mode:not(#hf-x) .hc-day-aside .hike-route-map { height: calc(100vh - var(--hf-nav-top) - var(--hf-nav-h) - 40px); min-height: 380px; max-height: 760px; }
}

/* head of the walked line */
.hc-follow-dot { position: relative; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 5px solid var(--tp-day, #ff6a1a); box-shadow: 0 4px 12px rgba(19, 32, 26, .35); pointer-events: none; }
.hc-follow-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--tp-day, #ff6a1a); opacity: .6; animation: hf-pulse 1.8s ease-out infinite; }

/* stops already "walked" while reading */
.is-hike-mode:not(#hf-x) .tp-day-schedule > ol > li > time { transition: color .3s; }
.is-hike-mode:not(#hf-x) .tp-day-schedule > ol > li.is-walked > time { color: var(--tp-day, #ff6a1a); }

/* ---------- End-of-day summary: details, elevation, surfaces ---------- */
.is-hike-mode:not(#hf-x) .hc-day-summary { margin: 26px 0 8px; padding-top: 20px; border-top: 1px solid var(--hc-line, rgba(19, 32, 26, .1)); }
.is-hike-mode:not(#hf-x) .hc-day-summary > h5 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px !important; font-weight: 800 !important; }
.is-hike-mode:not(#hf-x) .hc-day-summary > h5::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--tp-day, #ff6a1a); }
.is-hike-mode:not(#hf-x) .hc-day-summary__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.is-hike-mode:not(#hf-x) .hc-day-summary__grid > .tp-day-terrain { display: contents; }
.is-hike-mode:not(#hf-x) .hc-day-summary__grid > * > section,
.is-hike-mode:not(#hf-x) .hc-day-summary__grid > details { margin: 0; min-width: 0; }
.is-hike-mode:not(#hf-x) .hc-day-summary__grid > details > summary { cursor: default; }
@media (max-width: 1100px) { .is-hike-mode:not(#hf-x) .hc-day-summary__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
    .is-hike-mode:not(#hf-x) [data-hike-panel="plan"] { --hf-nav-top: 64px; --hf-nav-h: 58px; }
    .is-hike-mode:not(#hf-x) .hc-day-summary__grid { grid-template-columns: 1fr; }
}

@keyframes hf-pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hc-follow-dot::after { animation: none; } }
