/*
 * Land Transport Guru — Route viewer styles.
 *
 * Ported out of the WordPress theme so the [route] shortcode is self-contained
 * and survives theme changes. Styles BOTH the OMNI-rendered fragment and the
 * legacy routeinfo.php fallback (they share the same markup vocabulary).
 *
 * NOTE: remove the equivalent rules from the theme stylesheet to avoid
 * duplicate/conflicting declarations.
 */

/* ── Header ─────────────────────────────────────────────────────────────── */
.RouteHeader {
	display: flex;
	position: sticky;
	top: 0;
	background-color: #FFF;
	z-index: 10;
	flex-wrap: wrap;
}
.RouteNumber {
	flex: 0 0 auto;
	align-items: center;
	font-size: 24px;
	font-family: Arial;
	font-weight: 700;
	border-radius: 10%;
	color: #000;
	background-color: #97D700;
	height: fit-content;
	width: fit-content;
	min-width: 68px;
	text-align: center;
}
.RouteName {
	height: fit-content;
	font-weight: bold;
	font-size: 150%;
	border: 1px groove #999;
	border-radius: 5px;
	padding: 0px 10px;
}
.RouteContainer {
	height: 400px;
	width: 100%;
	overflow-y: scroll;
}
.RouteNav {
	margin-left: 10px;
}
.RouteNumber, .RouteNav, .RouteDesti, .navdir1, .navdir2 {
	display: inline-block;
	font-weight: bold;
}
.navswitch {
	flex: 0 1 30px;
	color: #f7f7f7;
	background-color: #c1c1c1;
	border: 1px solid #e5e5e5;
	width: 30px;
	height: 30px;
	display: inline-block;
	text-align: center;
	cursor: pointer;
	float: right;
}

/* ── Route viewer (node list) ───────────────────────────────────────────── */
node {
	font-family: 'Exo 2';
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	position: relative;
	cursor: pointer;
	padding: 0px 8px;
}
node::after {
	background: #EEEEEE;
	bottom: 0;
	content: '';
	display: block;
	height: 1px;
	position: absolute;
	width: calc(100% - 76px);
	left: 38px;
	z-index: 0;
}
node:last-child::after {
	height: 0px;
}
.nodewrap {
	order: 2;
	flex: 0 0 calc(100% - 78px);
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	padding: 10px 0px;
}
.nodewrap::before {
	background: #289dcc;
	content: '';
	height: 100%;
	position: absolute;
	left: 18px;
	bottom: 0;
	width: 4px;
	z-index: 1;
}
node:first-child .nodewrap::before {
	height: calc(100% - 26px);
	bottom: 0px;
}
node:last-child .nodewrap::before {
	height: 26px;
	top: 0px;
}
marker { /* Round marker */
	content: '';
	background: #FFF;
	border: 4px solid #289dcc;
	border-radius: 16px;
	flex: 0 0 16px;
	position: relative;
	order: 0;
	height: 16px;
	width: 16px;
	line-height: 16px;
	font-size: 8px;
	text-align: center;
	margin-left: 0px;
	margin-right: 8px;
	font-stretch: condensed;
	z-index: 2;
}
marker:empty {
	flex: 0 0 8px;
	height: 8px;
	width: 8px;
	margin-left: 4px;
	box-shadow: -2px -1px 8px -4px #289dcc;
}
nodename {
	font-size: 15px;
	font-weight: 500;
	color: #444444;
	flex: 1 0 100%;
	order: 1;
}
nodename mrt {
	display: inline-block;
	font-size: 12px;
}
berth {
	background-color: #289dcc;
	color: #FFF;
	padding: 0px 5px;
	border-radius: 2px 10px 2px 5px;
	font-weight: bold;
	box-shadow: 0px 8px 6px -6px black;
}
nodecode:not(:empty) {
	display: inline-block;
	position: relative;
	font-size: 10px;
	font-weight: 700;
	line-height: 14px;
	color: #289dcc;
	padding-left: 4px;
	padding-right: 2px;
	margin-right: 5px;
	box-shadow: 1px 1px 3px #999;
	border-radius: 7px 2px 5px 3px;
	height: 14px;
	vertical-align: text-bottom;
	order: 2;
}
road {
	display: inline-block;
	font-size: 11px;
	line-height: 14px;
	position: relative;
	left: 0px;
	color: #555555;
	order: 3;
}
controls {
	display: inline;
	flex: 0 0 50px;
	order: 3;
}

/* ── MRT line-code chips (rendered when a node maps to a rail station) ───── */
.mrt.station {
	display: inline-block;
	text-align: center;
	line-height: 18px;
	border-radius: 9px;
	color: #ffffff;
	font-weight: bold;
	padding-left: 6px;
	padding-right: 6px;
}
.mrt.station.left   { border-radius: 9px 0 0 9px; padding-right: 4px; }
.mrt.station.right  { border-radius: 0 9px 9px 0; padding-left: 4px; }
.mrt.station.center { border-radius: 0; padding-left: 4px; padding-right: 4px; }
.mrt.station.nsl { background-color: #da291c; }
.mrt.station.ewl { background-color: #009639; }
.mrt.station.nel { background-color: #9B26B6; }
.mrt.station.ccl { background-color: #FF931B; }
.mrt.station.dtl { background-color: #0057B8; }
.mrt.station.tel { background-color: #9E652E; }
.mrt.station.jrl { background-color: #02aebc; }
.mrt.station.crl { background-color: #93d500; }
.mrt.station.lrt { background-color: #708573; }
.mrt.station.rts { background-color: #87cefa; }

/* ── Service list widget ([routelist]) ────────────────────────────────────── */
/* Self-contained styling under unique `ltg-` classes so nothing collides with
   the theme. Layout mirrors the legacy routelist-beta: a service-number badge
   on the SAME row as a two-line origin / destination block. The frame height is
   set inline by the shortcode (viewport-fit, or a fixed override). */
.ltg-routelist {
	max-width: 600px;
	font-family: 'Exo 2', Arial, sans-serif;
}
.ltg-routelist-search {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 15px;
	border: 1px solid #ccc;
	border-radius: 8px;
	margin-bottom: 10px;
}
.ltg-routelist-results {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #eee;
	border-radius: 8px;
}
.ltg-routelist .ltg-line {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	border-bottom: 1px solid #eee;
	cursor: pointer;
}
.ltg-routelist .ltg-line:last-child { border-bottom: 0; }
.ltg-routelist .ltg-line:hover { background: #f3f8e6; }
.ltg-routelist .ltg-num {
	flex: 0 0 auto;
	min-width: 56px;
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	color: #000;
	background: #97D700;
	border-radius: 6px;
	padding: 4px 8px;
}
.ltg-routelist .ltg-detail {
	display: flex;
	flex-direction: column;
	min-width: 0;          /* allow the text to truncate instead of overflowing */
	line-height: 1.3;
}
.ltg-routelist .ltg-origin,
.ltg-routelist .ltg-dest {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ltg-routelist .ltg-origin { font-weight: 600; font-size: 14px; color: #222; }
.ltg-routelist .ltg-dest   { font-size: 13px; color: #666; }
.ltg-routelist .ltg-upcoming {
	font-size: 10px;
	font-weight: 600;
	background: #0057B8;
	color: #fff;
	border-radius: 4px;
	padding: 1px 5px;
	margin-left: 6px;
	white-space: nowrap;
}
.ltg-routelist-status {
	padding: 12px;
	color: #888;
	text-align: center;
}
