/* Trail map maker (/gifts/trail/): on top of the shared maker look (/gifts/globes/maker.css). */

.tr [hidden] { display: none !important; }
.tr .wm-seg button { padding: 6px 8px; white-space: normal; line-height: 1.25; }
.tr-label { margin: 14px 0 6px; font-size: 0.8rem; color: var(--muted); }
.tr .wm-sec > .wm-seg + .wm-seg { margin-top: 8px; }

/* the presets: activities as icon tiles, colour themes as swatch chips */
.tr-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.tr .tr-act {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px 8px; border-radius: 10px; border: 0; cursor: pointer;
    background: var(--field); color: var(--muted); font: inherit; font-size: 0.74rem; line-height: 1.15; text-align: center; min-width: 0;
}
.tr .tr-act i { font-size: 1.35rem; color: var(--ink); }
.tr .tr-act:hover { background: #262b29; color: var(--ink); }
.tr .tr-act[aria-pressed="true"] { background: rgba(47, 165, 150, 0.16); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.tr-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tr .tr-theme {
    display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; border: 0; cursor: pointer;
    background: var(--field); color: var(--ink); font: inherit; font-size: 0.8rem; text-align: left; min-width: 0;
}
.tr .tr-theme:hover { background: #262b29; }
.tr .tr-theme[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tr-theme b { display: grid; grid-template-columns: repeat(2, 9px); grid-template-rows: repeat(2, 9px); gap: 1px; flex: none; border-radius: 4px; overflow: hidden; }
.tr-theme b i { display: block; }

/* the route */
.tr-tabs { margin-bottom: 10px; }
.tr-tabs button[aria-selected="true"] { background: var(--accent); color: #04201c; }
.tr-file {
    display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; cursor: pointer; position: relative;
    border: 1.5px dashed rgba(236, 238, 233, 0.25); background: var(--field); transition: border-color 0.15s;
}
.tr-file:hover, .tr-file:focus-within { border-color: var(--accent); }
.tr-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tr-file i { font-size: 1.6rem; color: var(--accent); }
.tr-file span { display: flex; flex-direction: column; gap: 2px; }
.tr-file small { color: var(--muted); font-size: 0.78rem; }
.tr-files, .tr-wps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-files:empty, .tr-wps:empty { display: none; }
.tr-files li, .tr-wps li { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; background: var(--field); border-radius: 8px; padding: 5px 6px 5px 9px; }
.tr-files li > i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.tr-files li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-files li small, .tr-wps li small { color: var(--muted); white-space: nowrap; }
.tr-files button, .tr-wps button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; font-size: 1rem; line-height: 1; }
.tr-files button:hover, .tr-wps button:hover { color: var(--ink); }
.tr-wps input { flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.25); color: var(--ink); border: 1px solid transparent; border-radius: 6px; padding: 4px 7px; font: inherit; font-size: 0.82rem; }
.tr-wps input:focus { outline: none; border-color: var(--accent); }
.tr-wps li > b { font-weight: 600; color: var(--muted); font-size: 0.75rem; width: 1.4em; text-align: center; }

.tr-drop {
    position: absolute; inset: 12px; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 10px;
    border: 2px dashed var(--accent); border-radius: 16px; background: rgba(20, 23, 22, 0.84); color: var(--ink); font-size: 1.1rem; pointer-events: none;
}
.tr-drop i { font-size: 1.8rem; color: var(--accent); }

.tr-drawbar, .tr-turn { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tr-drawbar .wm-btn, .tr-turn .wm-btn { flex: 1 1 0; justify-content: center; }
.tr-turn .wm-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tr-chips .wm-chip { font-size: 0.78rem; padding: 5px 10px; }
.tr-inline { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 0.86rem; cursor: pointer; }
.tr-inline input { accent-color: var(--accent); }
.tr-privacy { align-items: flex-start; line-height: 1.35; }
.tr-privacy input { margin-top: 2px; }

.tr .tr-mapwrap { max-width: none; position: relative; margin-top: 10px; }
.tr .tr-map { aspect-ratio: 1 / 0.92; }
.tr-map.is-drawing .maplibregl-canvas, .tr-map.is-pinning .maplibregl-canvas { cursor: crosshair; }
.tr-map.is-dragging .maplibregl-canvas { cursor: grabbing; }
.tr-wpbtn { position: absolute; left: 8px; top: 8px; z-index: 2; background: rgba(20, 23, 22, 0.88); }
.tr-wpbtn[aria-pressed="true"] { background: var(--accent); color: #04201c; }
.tr-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45); }
.tr-dot.is-start { background: #2fa596; }
.tr-dot.is-finish { background: repeating-conic-gradient(#111 0 25%, #fff 0 50%) 50% / 6px 6px; }
.tr-wp { background: #fff; color: #1d2320; font: 700 10px/1 'Schibsted Grotesk', system-ui, sans-serif; padding: 3px 5px; border-radius: 9px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); white-space: nowrap; }

/* the model, the words */
.tr-shapes { flex-wrap: wrap; }
.tr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tr-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.tr-grid2 .wm-field, .tr-grid3 .wm-field { margin-top: 10px; }
.tr .wm-field select { width: 100%; }
.tr-ss .wm-chip { font-size: 0.78rem; padding: 5px 11px; }
.tr-ss .wm-chip[aria-pressed="true"] { background: rgba(47, 165, 150, 0.18); box-shadow: inset 0 0 0 1.5px var(--accent); }
.tr-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tr .tr-row .wm-seg { display: inline-flex; }
.tr-rc { margin-top: 10px; }
.tr-rc .wm-chip, .tr-mono .wm-chip { font-size: 0.76rem; padding: 5px 10px; }
.tr-rc .wm-chip i, .tr-mono .wm-chip i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin: 0 2px 0 0; vertical-align: -1px; background: var(--c); }
.tr-mono { margin-top: 10px; }

/* the "more options" sections */
.tr-more > summary { cursor: pointer; font-size: 1rem; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.tr-more > summary::-webkit-details-marker { display: none; }
.tr-more > summary::before { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--field); color: var(--muted); font-weight: 600; }
.tr-more[open] > summary::before { content: '−'; }
.tr-more[open] > summary { margin-bottom: 12px; }

/* the download */
.tr-swatches { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.78rem; color: var(--muted); }
.tr-swatches li { display: flex; align-items: center; gap: 6px; }
.tr-swatches i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.tr-warn { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tr-warn:empty { display: none; }
.tr-warn li { font-size: 0.78rem; line-height: 1.4; color: #f3d38a; background: rgba(217, 177, 74, 0.1); border-radius: 8px; padding: 7px 9px; }
.tr-stagebar-on { background: var(--ink) !important; color: #141716 !important; }

@media (max-width: 560px) {
    .tr .wm-stagebar .wm-btn span { display: none; }
    .tr-grid2, .tr-grid3 { grid-template-columns: 1fr; }
    .tr-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the map's hover labels */
.tr .maplibregl-popup-content { color: #1d2320; font: 600 0.78rem/1.3 'Schibsted Grotesk', system-ui, sans-serif; padding: 6px 9px; border-radius: 7px; }

/* the frame */
.tr-frame { margin-top: 4px; }
.tr .tr-frame .wm-seg { margin-top: 8px; }
.tr-frame .wm-range { margin-top: 10px; }
