/* Route picker (stop editor > Add to a Route) - route-picker.js */

/* stop editor: Route section (existing stops only) */

.stopEditor:not(.editing) .stopRouteSection {
	display: none;
}

.stopRouteCurrent {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 2px 0 12px;
	font-size: 16px;
	font-weight: 600;
}

.stopRouteSection.noRoute .stopRouteName {
	font-weight: 500;
	opacity: .55;
}

.stopRouteMeta {
	font-size: 13px;
	font-weight: 500;
	opacity: .55;
}

.stopRouteSection.pickerUnavailable .stopRoutePickerBtn {
	display: none;
}

/* picker - UI elements follow the stops map page (css/map.css): teardrop pins, the tech
   legend's cards (.focusFilter) and its square action button (.soloBtn) */

.routePicker .routePickerTitle {
	margin-bottom: 4px;
}

.routePickerStop {
	display: flex;
	flex-direction: column;
	margin-bottom: 16px;
}

.routePickerStopName {
	font-size: 20px;
}

.routePickerStopRoute {
	font-size: 13px;
	opacity: .6;
}

/* map + pins: the shared route view frame (.routeMapContainer) and pins (js/maps.js .fssPin) */

/* the selected route's pins grow; every other route's pins grey out, like the stops map's
   map_marker0 */
.routePickerPin.focused {
	transform: scale(1.3);
}

.routePickerPin.dimmed .fssPinShape {
	fill: rgb(138, 138, 138) !important;
}

/* the stop being placed: the large dark pin */
.routePickerStopPin {
	cursor: default;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

/* a pin's info card (Google InfoWindow) - text inherits the window's own light/dark color */
.routePickerInfo {
	font-family: 'Montserrat', sans-serif;
	min-width: 190px;
	padding: 2px 4px 4px 2px;
}

.routePickerInfoName {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 2px;
}

.routePickerInfoAddress {
	font-size: 13px;
	opacity: .7;
	margin-bottom: 8px;
}

.routePickerInfoRoute {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
}

.routePickerInfoPin {
	flex: none;
	width: 14px;
	height: 20px;
}

.routePickerInfoPin svg {
	display: block;
	width: 100%;
	height: 100%;
}

.routePickerInfoMeta {
	font-size: 12px;
	opacity: .65;
	margin-top: 3px;
}

/* same look as the cards' + (the stops map's .soloBtn) */
.routePickerInfoAdd {
	margin-top: 10px;
	padding: 9px 12px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	color: rgb(34, 136, 224);
	background: rgba(34, 136, 224, 0.08);
	border: 1px solid rgba(34, 136, 224, 0.35);
	border-radius: 5px;
	cursor: pointer;
}

.routePickerInfoAdd:active {
	background: rgba(34, 136, 224, 0.16);
}

.routePickerSearchHolder {
	position: relative;
	margin-bottom: 20px;
}

.routePickerSearchHolder i {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	opacity: .45;
	pointer-events: none;
}

.routePicker input.routePickerSearch {
	margin: 0;
	padding-left: 40px;
}

/* route cards: the stops map legend's .focusFilter */
.routePickerRow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	padding: 15px;
	background: white;
	box-shadow: 0px 0px 20px rgba(0, 0, 0, .1);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	cursor: pointer;
	transition: box-shadow .3s, border .3s, opacity .3s;
}

.routePickerRow.focused {
	box-shadow: 0px 0px 20px rgba(34, 136, 224, 0.638);
	border: 1px solid rgb(34, 136, 224);
}

.routePickerRow.defocused {
	opacity: .5;
}

.routePickerMarker {
	flex: none;
	width: 30px;
	height: 30px;
}

.routePickerMarker svg {
	display: block;
	width: 100%;
	height: 100%;
}

.routePickerText {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.routePickerName {
	font-size: 20px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.routePickerMeta {
	font-size: 13px;
	opacity: .6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.routePickerDistance {
	flex: none;
	font-size: 13px;
	opacity: .7;
}

/* the legend's .soloBtn */
.routePickerGo {
	flex: none;
	width: 40px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	color: rgb(34, 136, 224);
	background: rgb(248, 248, 248);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	cursor: pointer;
	transition: background .15s, border-color .15s, transform .15s;
}

/* the only control that adds the stop to the route */
.routePickerGo:hover {
	border-color: rgb(34, 136, 224);
}

.routePickerGo:active {
	transform: scale(.92);
}

.routePickerTag {
	flex: none;
	padding: 0 12px;
	height: 40px;
	line-height: 40px;
	font-size: 13px;
	color: rgb(34, 136, 224);
	background: rgb(248, 248, 248);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 5px;
}

.routePickerEmpty {
	padding: 20px 0;
	text-align: center;
	opacity: .6;
}

/* route editor opened from the picker: the stop editor is already open underneath, so a
   second one (Edit Stop / Add a Stop) can't be stacked */
.routeEditor.fromRoutePicker .addNewStop,
.routeEditor.fromRoutePicker .editableStops .editBtn {
	display: none !important;
}

.routeEditor.fromRoutePicker .editableStops .deleteBtn {
	width: 100%;
}

/* where the new stop was placed, above the route editor's stop list */
.routePickerPlacement {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin: 0 0 15px;
	padding: 12px 15px;
	font-size: 14px;
	line-height: 1.45;
	background: white;
	border: 1px solid rgb(34, 136, 224);
	border-radius: 5px;
	box-shadow: 0px 0px 20px rgba(34, 136, 224, 0.25);
}

.routePickerPlacement > i {
	flex: none;
	margin-top: 3px;
	color: rgb(34, 136, 224);
}

.routePickerPlacement > span:not(.routePickerPlacementEnd) {
	flex: 1;
	min-width: 0;
}

/* existing stops named in the note: semibold - stands out without the weight of <b> (700) */
.routePickerPlacementStop {
	font-weight: 600;
}

.routePickerPlacementEnd {
	flex: none;
	margin-left: auto;
	padding: 6px 10px;
	font-size: 13px;
	font-weight: 600;
	color: rgb(34, 136, 224);
	background: rgb(248, 248, 248);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	cursor: pointer;
}

/* route editor map (route-map.js): the shared route view frame and numbered pins - blue = saved
   on the route, orange = added since opening */
.routeEditorMapLegend {
	display: flex;
	gap: 16px;
	margin: 10px 0 20px;
	font-size: 13px;
	opacity: .75;
}

.routeEditorMapKey::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 6px;
	border-radius: 50%;
	vertical-align: -1px;
}

/* the color code: green (first stop) through blue to purple (last) - fssRouteOrderColor */
.routeOrderScale {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.routeOrderBar {
	display: inline-block;
	width: 70px;
	height: 8px;
	border-radius: 100px;
	background: linear-gradient(to right, hsl(150, 62%, 44%), hsl(215, 62%, 44%), hsl(280, 62%, 44%));
}

.routeEditorMapKey.added::before {
	background: transparent;
	box-shadow: inset 0 0 0 2px rgb(245, 140, 30);
}

/* each stop row's colored left border by its place in the route, matching its map pin (route
   editors: route-map.js; route viewer: buildTechStopsView). !important beats dark-mode.css's border */
.contentListing.routeOrdered {
	border-left: 5px solid var(--routeOrderColor) !important;
	transition: border-color .2s;
}

/* the just-added stop keeps its tint and "New" tag; the left border is now the order color */
.editableStops .contentListing.routeOrdered.routePickerAdded {
	box-shadow: none;
}

/* the stop just added */
.editableStops .contentListing.routePickerAdded {
	box-shadow: inset 4px 0 0 rgb(34, 136, 224);
	background: rgba(34, 136, 224, 0.07);
}

.editableStops .contentListing.routePickerAdded .stopName::after {
	content: "New";
	display: inline-block;
	margin-left: 8px;
	padding: 1px 7px;
	border-radius: 100px;
	font-size: 11px;
	font-weight: 700;
	vertical-align: 2px;
	color: rgb(255, 255, 255);
	background: rgb(34, 136, 224);
}

/* dark mode - the stops map's dark palette (css/map.css) */
@media (prefers-color-scheme: dark) {

	.routePickerRow {
		background: rgb(24, 25, 29);
		border: 1px solid rgba(134, 134, 134, 0.2);
		box-shadow: 0px 0px 20px rgba(0, 0, 0, .4);
		color: #fff;
	}

	.routePickerRow.focused {
		box-shadow: 0px 0px 20px rgba(34, 136, 224, 0.5);
		border: 1px solid rgb(34, 136, 224);
	}

	/* the placed stop's dark pin flips to white on the dark map */
	.routePickerStopPin .fssPinShape {
		fill: rgb(255, 255, 255) !important;
	}

	.routePickerStopPin circle {
		fill: rgb(20, 24, 31);
	}

	.routePickerGo,
	.routePickerTag {
		background: rgb(37, 39, 45);
		border: 1px solid rgba(134, 134, 134, 0.2);
	}

	.editableStops .contentListing.routePickerAdded {
		background: rgba(34, 136, 224, 0.16);
	}

	.routePickerPlacement {
		background: rgb(24, 25, 29);
		box-shadow: 0px 0px 20px rgba(34, 136, 224, 0.2);
		color: #fff;
	}

	.routePickerPlacementEnd {
		background: rgb(37, 39, 45);
		border: 1px solid rgba(134, 134, 134, 0.2);
	}

}

/* the route viewer's copy of the legend, at the top of its content under the map */
.routeEditorMapLegend.routeViewLegend {
	margin: 0 0 14px;
}

/* the route editors' stop order number, styled like the route viewer's "1.  Name" */
.routeOrderNum {
	margin-right: 8px;
	opacity: .65;
}

/* route editors' stop rows: room between the stop name and its ID */
.editableStops .contentListing .contentListingHeader span.stopID {
	flex: none;
	margin-left: 8px;
}
