/* 3.9.96: shared surfaces and scoped component refinements. */
body { --tk-design-panel: #f4f7fb; --tk-design-card: #fff; --tk-design-line: #e6e8ec; }
body.dark { --tk-design-panel: #0e2028; --tk-design-card: #173741; --tk-design-line: #315d6b; }
body.dark .tekeregj-header-categories__toggle,
body.dark .tekeregj-header-search__query,
body .tekeregj-header-categories__toggle,
body .tekeregj-header-search__query { border-color: var(--tk-design-line); }
body .tekeregj-header-categories__toggle { border-right: 0; }
body .tekeregj-header-categories__toggle:hover,
body .tekeregj-header-categories__toggle[aria-expanded="true"] { border-color: var(--tk-design-line); }

/* No transparent seam above the full-height filter surface. */
body.page-template-pagetemplate-tour-search-map .map-search-wrapper,
body.page-template-pagetemplate-tour-search-map .map-search-wrapper .main-wrapper,
body.page-template-pagetemplate-tour-search-map .map-search-wrapper .main,
body.page-template-pagetemplate-tour-search-map .map-search-wrapper .main-inner { margin-top: 0; padding-top: 0; border-top: 0; }
body.page-template-pagetemplate-tour-search-map .map-search-wrapper .main { margin-bottom: 0; }
body.page-template-pagetemplate-tour-search-map .map-search-wrapper .page-title { display: none; }
body.page-template-pagetemplate-tour-search-map .tekeregj-site-header { margin-bottom: 0; box-shadow: none; }
body.page-template-pagetemplate-tour-search-map .map-search-wrapper .sidebar-wrapper-col .sidebar.tk-map-filter-card {
    box-shadow: none;
    background: var(--tk-design-panel); margin-top: -1px; padding-top: 23px;
    height: calc(100dvh - var(--tk-map-header-height, 80px) + 1px) !important;
}
body .trp-app .trp-analysis,
body .trp-public-explorer .trp-public-route-sidebar,
body .trp-public-explorer .trp-public-sidebar-head { background: var(--tk-design-panel); }
body .trp-app .trp-elevation { background: var(--tk-design-card); }
/* Both searches use one visible outer focus indicator, never an input box. */
body .trp-app .trp-search,
body .trp-app .trp-public-search {
    background: var(--tk-design-card); border: 1px solid var(--trp-border);
    border-radius: 12px; color: var(--trp-text);
}
body .trp-app .trp-search input,
body .trp-app .trp-public-search input {
    background: transparent !important; border: 0 !important; box-shadow: none !important;
    color: var(--trp-text); caret-color: var(--trp-blue);
}
body .trp-app .trp-search input::placeholder,
body .trp-app .trp-public-search input::placeholder { color: #687789; opacity: 1; }
body.dark .trp-app .trp-search input::placeholder,
body.dark .trp-app .trp-public-search input::placeholder { color: #b8c8d2; }
body .trp-app .trp-search input:focus,
body .trp-app .trp-search input:focus-visible,
body .trp-app .trp-public-search input:focus,
body .trp-app .trp-public-search input:focus-visible { outline: 0 !important; box-shadow: none !important; }
body .trp-app .trp-search:focus-within,
body .trp-app .trp-public-search:focus-within {
    border-color: var(--trp-blue); box-shadow: none !important;
    outline: 2px solid var(--trp-blue); outline-offset: 0;
}

/* Real monochrome SVG masks also cover dynamically loaded route cards. */
body [data-trp-component="public-routes"] .trp-route-card__actions :is([data-card-share="facebook"],[data-card-share="url"]) { font-size: 0; gap: 0; }
body [data-trp-component="public-routes"] .trp-route-card__actions :is([data-card-share="facebook"],[data-card-share="url"])::before {
    content: ""; display: block; width: 17px; height: 17px; background: currentColor;
    -webkit-mask: var(--tk-share-icon) center/contain no-repeat; mask: var(--tk-share-icon) center/contain no-repeat;
}
body [data-trp-component="public-routes"] [data-card-share="facebook"] { --tk-share-icon: url("../../img/facebook-mark.svg"); }
body [data-trp-component="public-routes"] [data-card-share="url"] { --tk-share-icon: url("../../img/link-chain.svg"); }
body [data-trp-component="public-routes"] .trp-card-share:hover { color: #fff; background: #006887; border-color: #006887; }
body .trp-public-explorer { --tk-public-edge: 24px; }
body .trp-public-explorer .trp-public-map-controls { left: var(--tk-public-edge); }
body .trp-public-explorer .trp-public-plan { right: var(--tk-public-edge); }

/* Fleet's overflow:hidden ancestor otherwise captures sticky positioning. */
body.single-tour .outer { overflow: clip; }
body.single-tour .outer__inner { overflow: visible; }
body.admin-bar .tk-tour .tt-tabs,
body .tk-tour .tt-tabs { top: var(--tk-tour-nav-top, 8px); z-index: 30; background: var(--tt-card); }
body .tk-tour .tt-section { scroll-margin-top: var(--tk-tour-anchor-offset, 110px); }

body .tkn-list .tkn-item,
body header .header-notification .header__notification { position: relative; border: 0; border-radius: 0; box-shadow: none; }
body .tkn-list .tkn-item:not(:last-child)::after,
body header .header-notification .header__notification:not(:last-child)::after {
    content: ""; position: absolute; left: 62px; bottom: 0; width: 64px; height: 1px;
    background: var(--tk-design-line); border: 0; border-radius: 0; box-shadow: none;
}
body header .header-notification .header__notification:not(:last-child)::after { left: 50px; }
@media (max-width: 767px) {
    body .trp-public-explorer { --tk-public-edge: 10px; }
    body .trp-public-explorer .trp-public-map-controls { right: var(--tk-public-edge); }
    body .tk-tour .tt-tabs { gap: 3px; }
    body .tk-tour .tt-tabs a, body .tk-tour .tt-tabs button { padding: 10px; }
    body .tkn-list .tkn-item:not(:last-child)::after { left: 0; }
}

/* Give accented glyphs room and keep fractional line boxes off clip edges. */
body header .header-notification .header__notifications {
    padding-block: 3px; scroll-padding-block: 3px;
}
body header .header-notification .header__details { overflow: visible; min-width: 0; }
body header .header-notification .header__subtitle,
body header .header-notification .header__content {
    display: block; height: auto; max-height: none; overflow: visible;
    white-space: normal; overflow-wrap: anywhere; padding-block: 2px;
    line-height: 20px;
}


/* 3.9.98: one search format and inset planner separators. */
body .trp-app .trp-public-sidebar-head .trp-public-search {
    height: 43px; width: 100%; padding: 0; margin: 0; box-sizing: border-box;
}
body .trp-app .trp-public-sidebar-head .trp-public-search input {
    font-size: 11px; flex: 1 1 auto; width: 0; min-width: 0; height: 100%; padding: 0;
}
body .trp-app .trp-public-sidebar-head .trp-public-search > svg {
    flex: 0 0 18px; width: 18px; height: 18px; margin: 0 9px 0 15px;
}
body .trp-app .trp-public-sidebar-head .trp-public-search > button {
    flex: 0 0 auto; align-self: stretch; margin: 0; padding: 0 10px;
    background: transparent; border: 0; border-radius: 0 12px 12px 0;
    color: var(--trp-blue); cursor: pointer; font-size: 11px; font-weight: 600;
}
body .trp-app .trp-public-sidebar-head .trp-public-search > button:hover { color: var(--trp-blue-dark); }
body .trp-app .trp-public-sidebar-head .trp-public-search > button:focus-visible {
    outline: 2px solid var(--trp-blue) !important; outline-offset: -4px;
}
/* The analysis owns the sole border at the map/sidebar bottom edge. */
body .trp-planner > .trp-layout { border-top: 0; border-bottom: 0; }
body .trp-planner > .trp-analysis { border-top: 1px solid var(--trp-border); }
body .trp-planner .trp-sidebar-head { margin-inline: 0; padding-inline: 0; }
body .trp-planner .trp-sidebar > .trp-panel { padding-inline: 0; }
body .trp-planner .trp-sidebar-head,
body .trp-planner .trp-sidebar > .trp-panel { border-bottom: 1px solid var(--tk-design-line); }
body .trp-planner .trp-sidebar > .trp-panel:last-child { border-bottom: 0; }
body .trp-planner .trp-sidebar > .trp-panel > summary { padding-inline: 0; }

/* Avoid transformed/fading text over detailed map tiles. */
body :is(.trp-planner,.trp-public-explorer) .trp-map-wheel-hint {
    inset: 0; width: max-content; height: max-content; margin: auto;
    max-width: calc(100% - 32px); box-sizing: border-box;
    transform: none; filter: none; backdrop-filter: none;
    background: #23262f; color: #fff; opacity: 1; transition: none;
    font-size: 13px; line-height: 20px; text-shadow: none; white-space: normal;
}

/* Difficulty uses the same 18px petrol ring as distance and ascent. */
body [data-trp-component="public-routes"] input[name="trp-difficulty-max"] {
    appearance: none; -webkit-appearance: none; background: transparent;
    height: 24px; margin: 0; padding: 0; border: 0; cursor: pointer;
}
body [data-trp-component="public-routes"] input[name="trp-difficulty-max"]::-webkit-slider-runnable-track {
    height: 5px; border: 0; border-radius: 999px;
    background: linear-gradient(to right, var(--trp-blue) 0 var(--tk-difficulty-progress,100%), var(--trp-border) var(--tk-difficulty-progress,100%) 100%);
}
body [data-trp-component="public-routes"] input[name="trp-difficulty-max"]::-moz-range-track {
    height: 5px; border: 0; border-radius: 999px;
    background: linear-gradient(to right, var(--trp-blue) 0 var(--tk-difficulty-progress,100%), var(--trp-border) var(--tk-difficulty-progress,100%) 100%);
}
body [data-trp-component="public-routes"] .trp-dual-range input[type="range"]::-webkit-slider-thumb,
body [data-trp-component="public-routes"] input[name="trp-difficulty-max"]::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none; box-sizing: border-box;
    width: 18px; height: 18px; margin-top: -6px; border: 3px solid var(--trp-blue);
    border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(20,28,42,.2); cursor: grab;
}
body [data-trp-component="public-routes"] .trp-dual-range input[type="range"]::-moz-range-thumb,
body [data-trp-component="public-routes"] input[name="trp-difficulty-max"]::-moz-range-thumb {
    box-sizing: border-box; width: 18px; height: 18px; border: 3px solid var(--trp-blue);
    border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(20,28,42,.2); cursor: grab;
}
