.sm {
	box-sizing: border-box;
	position: relative;
	max-height: 75vh; /* TODO dynamic height - needs js ? */
	overflow-y: auto;
	z-index: 1900;
}

.sm,.sm ul,.sm li {
	display: block;
	list-style: none;
	margin: 0;
	padding: 0;
	line-height: normal;
	direction: ltr;
	text-align: left;
}

.sm-rtl,.sm-rtl ul,.sm-rtl li {
	direction: rtl;
	text-align: right;
}

.sm ul {
	display: none;
}

.sm li,.sm a {
	position: relative;
}

.sm a {
	display: block;
}

.sm .disabled {
	cursor: default;
}
/*
.sm::after {
	content: '';
	display: block;
	height: 0;
	overflow: hidden;
}
*/
.sm-etc {
	border: 1px solid #aaabb8;
	border-radius: 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.sm-etc a {
	padding: 0.4em;
	padding-right: 1em; /* extra for arrow */
	color: #1b1b98;
	font-family: Roboto, Arial, Helvetica, sans-serif;
	font-size: 1.05em;
	font-weight: bold;
	text-decoration: none;
	background-color: #cdd6ff;
}

.sm-etc a:hover, .sm-etc a:focus, .sm-etc a:active,
.sm-etc a.current:hover, .sm-etc a.current:focus, .sm-etc a.current:active {
	color: #1b1b98;
	text-decoration: none;
	background-color: #99acff;
}

.sm-etc a.current {
	background-color: #ffe066;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.sm-etc a.disabled {
	background-color: #52677a;
	color: #e0e6eb;
}

.sm-etc a .sub-arrow {
	position: absolute;
	top: 50%;
	right: 0.2em;
/*	bottom: auto;
	left: auto; */
	margin-top: -0.6em;
/*	margin-left: 1em; */
	font-size: 0.8em;
}

.sm-etc a .sub-arrow::before {
	content: '\25bc';
}

.sm-etc a.highlighted .sub-arrow::before {
	content: '';
}
/*
.sm-etc > li:first-child > a {
	border-radius: 5px 5px 0 0;
}

.sm-etc > li:first-child > a.highlighted {
	border-radius: 0;
}

.sm-etc > li:first-child > :not(ul) a {
	border-radius: 5px 5px 0 0;
}

.sm-etc > li:last-child > a {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > a.highlighted {
	border-radius: 0;
}

.sm-etc > li:last-child > ul {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > ul > li:last-child > a {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > ul > li:last-child > a.highlighted {
	border-radius: 0;
}

.sm-etc > li:last-child > ul > li:last-child > ul {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > a {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted {
	border-radius: 0;
}

.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > ul {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
	border-radius: 0;
}

.sm-etc > li:last-child > ul > li:last-child > *:not(ul) a {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
	border-radius: 0;
}

.sm-etc > li:last-child > *:not(ul) a {
	border-radius: 0 0 5px 5px;
}

.sm-etc > li:last-child > *:not(ul) a.highlighted {
	border-radius: 0;
}
*/

.sm-etc ul a {
	border-left: 0.8em solid transparent;
}

.sm-etc ul a:hover, .sm-etc ul a:focus, .sm-etc ul a:active {
	background-color: #99acff;
}

.sm-etc ul ul a {
	border-left: 1.6em solid transparent;
}

.sm-etc ul ul a:hover {
	border-left: 1.6em solid transparent;
}

.sm-etc ul ul a:focus {
	border-left: 1.6em solid transparent;
}

.sm-etc ul ul a:active {
	border-left: 1.6em solid transparent;
}

.sm-etc ul ul ul a {
	border-left: 2.4em solid transparent;
}

.sm-etc ul ul ul a:hover {
	border-left: 2.4em solid transparent;
}

.sm-etc ul ul ul a:focus {
	border-left: 2.4em solid transparent;
}

.sm-etc ul ul ul a:active {
	border-left: 2.4em solid transparent;
}

.sm-etc ul li {
	border-top: 1px solid #aaabb8;
}

.sm-etc ul li:first-child {
	border-top: 0;
}

.sm-etc li:first-child:last-child > a {
	border-radius: 5px;
}

.sm-etc li:first-child:last-child > :not(ul) a {
	border-radius: 5px;
}

@media (min-width: 52rem) {
	.sm {
		max-height: 100%; /* no limit */
		max-height: unset;
		overflow-y: visible;
		overflow-y: unset;
	}

	.sm-etc {
		border-radius: 5px;
	}

	.sm-etc li {
		float: left;
	}

	.sm-etc > li:first-child > a {
		border-radius: 5px 5px 0 0;
	}

	.sm-etc > li:first-child > a.highlighted {
		border-radius: 0;
	}

	.sm-etc > li:first-child > :not(ul) a {
		border-radius: 5px 5px 0 0;
	}

	.sm-etc > li:last-child > a {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > a.highlighted {
		border-radius: 0;
	}

	.sm-etc > li:last-child > ul {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > ul > li:last-child > a {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > ul > li:last-child > a.highlighted {
		border-radius: 0;
	}

	.sm-etc > li:last-child > ul > li:last-child > ul {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > a {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted {
		border-radius: 0;
	}

	.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > ul {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
		border-radius: 0;
	}

	.sm-etc > li:last-child > ul > li:last-child > *:not(ul) a {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
		border-radius: 0;
	}

	.sm-etc > li:last-child > *:not(ul) a {
		border-radius: 0 0 5px 5px;
	}

	.sm-etc > li:last-child > *:not(ul) a.highlighted {
		border-radius: 0;
	}

	.sm-etc ul {
		position: absolute;
		border: 1px solid #aaabb8;
		border-radius: 0 0 3px 3px !important;
		box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
	}

	.sm-etc ul li {
		float: none;
		border: 0;
	}

	.sm-etc ul a {
		margin-left: 0;
		border: 0 !important;
		color: #1b1b98;
		border-radius: 0 !important;
	}
/* dup
	.sm-etc ul a:hover, .sm-etc ul a:focus, .sm-etc ul a:active, .sm-etc ul a.highlighted {
		color: #1b1b98;
		background-color: #99acff;
	}
*/
	.sm-etc ul >li >a .sub-arrow {
		top: 50%;
		right: 0.2em;
		bottom: auto;
		left: auto;
		margin-top: -0.7em;
		margin-left: 1em;
		font-size: 0.7em;
	}

	.sm-etc ul >li >a .sub-arrow::before {
		content: '\25b6'; /* right-arrow CHANGE */
	}
/*
	.sm-etc >li:last-child >ul >li >a .sub-arrow::before {
		content: '\25C0'; /* left-arrow CHANGE * /
	}

	.sm-etc >li:last-child >ul >li >a.highlighted .sub-arrow::before {
		content: '';
	}
*/
	.sm-etc ul ul {
		border-radius: 3px !important;
	}

	.sm-etc.sm-rtl li {
		float: right;
	}

	.sm-etc.sm-rtl ul li {
		float: none;
	}

	.sm-etc.sm-rtl ul >li >a .sub-arrow {
		right: auto;
		left: 0.2em;
		margin-right: 1em;
	}
	
	.sm-etc.sm-rtl ul >li >a .sub-arrow::before {
		content: '\25C0'; /* left-arrow CHANGE */
	}

	.sm-etc.sm-rtl >li:last-child >ul >li >a .sub-arrow::before {
		content: '\25b6'; /* right-arrow CHANGE */
	}

	.sm-etc.sm-rtl > li:first-child {
		border-left: 1px solid #cdd6ff;
	}

	.sm-etc.sm-rtl > li:first-child > a {
		border-radius: 0 5px 5px 0;
	}

	.sm-etc.sm-rtl > li:first-child > :not(ul) a {
		border-radius: 0 5px 5px 0;
	}

	.sm-etc.sm-rtl > li:last-child {
		border-left: 0;
	}

	.sm-etc.sm-rtl > li:last-child > a {
		border-radius: 5px 0 0 5px !important;
	}

	.sm-etc.sm-rtl > li:last-child > :not(ul) a {
		border-radius: 5px 0 0 5px !important;
	}

	.sm-etc.sm-rtl.sm-vertical a .sub-arrow {
		right: auto;
		left: 10px;
	}

	.sm-etc.sm-vertical {
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	}

	.sm-etc.sm-vertical a {
		margin-left: 0;
		padding: 0.4em 0.8em;
	}

	.sm-etc.sm-vertical a .sub-arrow {
		top: 50%;
		margin-top: -0.6em;
		bottom: auto;
		left: auto;
		margin-left: 0;
		right: 10px;
	}

	.sm-etc.sm-vertical li {
		float: none;
	}

	.sm-etc.sm-vertical > li {
		border-left: 0 !important;
	}

	.sm-etc.sm-vertical > li:first-child > a {
		border-radius: 5px 5px 0 0;
	}

	.sm-etc.sm-vertical > li:first-child > :not(ul) a {
		border-radius: 5px 5px 0 0;
	}

	.sm-etc.sm-vertical > li:last-child > a {
		border-radius: 0 0 5px 5px !important;
	}

	.sm-etc.sm-vertical > li:last-child > :not(ul) a {
		border-radius: 0 0 5px 5px !important;
	}

	.sm-etc.sm-vertical ul {
		border-radius: 3px !important;
	}

	.sm-etc.sm-vertical ul a {
		padding: 0.6em 0.8em;
	}

	.sm-etc a {
		padding-right: 0.4em;
		white-space: nowrap;
	}

	.sm-etc a:hover, .sm-etc a:focus, .sm-etc a:active, .sm-etc a.highlighted {
		color: #1b1b98;
		background-color: #99acff;
	}

	.sm-etc a .sub-arrow {
		top: 2.3em;
		left: 50%;
/*		margin-top: 0; */
		margin-left: -0.5em;
	}

	.sm-etc > li {
		border-left: 1px solid #cdd6ff;
	}

	.sm-etc > li:first-child {
		border-left: 0;
	}

	.sm-etc > li:first-child > a {
		border-radius: 5px 0 0 5px;
	}

	.sm-etc > li:first-child:last-child > a {
		border-radius: 5px !important;
	}

	.sm-etc > li:first-child:last-child > :not(ul) a {
		border-radius: 5px !important;
	}

	.sm-etc > li:first-child > :not(ul) a {
		border-radius: 5px 0 0 5px;
	}

	.sm-etc > li:last-child > a {
		border-radius: 0 5px 5px 0 !important;
	}

	.sm-etc > li:last-child > :not(ul) a {
		border-radius: 0 5px 5px 0 !important;
	}

	.sm-etc .scroll-up {
		position: absolute;
		display: none;
		visibility: hidden;
		overflow: hidden;
		background-color: YellowGreen;
		height: 20px;
	}

	.sm-etc .scroll-down {
		position: absolute;
		display: none;
		visibility: hidden;
		overflow: hidden;
		background-color: YellowGreen;
		height: 20px;
	}

	.sm-etc .scroll-up-arrow {
		position: absolute;
		top: -2px;
		left: 50%;
		margin-left: -8px;
		width: 0;
		height: 0;
		overflow: hidden;
		border-width: 8px;
		border-style: dashed dashed solid dashed;
		border-color: transparent transparent #aaabb8 transparent;
	}

	.sm-etc .scroll-down-arrow {
		position: absolute;
		top: -2px;
		left: 50%;
		margin-left: -8px;
		width: 0;
		height: 0;
		overflow: hidden;
		border-width: 8px;
		border-style: dashed dashed solid dashed;
		border-color: transparent transparent #aaabb8 transparent;
		top: 6px;
		border-style: solid dashed dashed dashed;
		border-color: #aaabb8 transparent transparent transparent;
	}

	.sm-etc .sm-nowrap > li > a {
		white-space: nowrap;
	}

	.sm-etc .sm-nowrap > li > :not(ul) a {
		white-space: nowrap;
	}
}
