/* CSS rules for TUMvCard and TUM MemberList elements */

/*
 * TUMvCard
 */

/* Layout */

	/* Use flex, wrap when text column is < 210px */
html.flexbox .content .vcard {
	display: -webkit-flex;
	display: flex;
	-webkit-flex-flow: row-reverse wrap;
	flex-flow: row-reverse wrap;
	-webkit-justify-content: flex-end; /* Right-align image */
	justify-content: flex-end; /* Right-align image */

}
html.flexbox .content .vc_imagecol { -webkit-flex: 0 1 auto; flex: 0 1 auto; }
html.flexbox .content .vc_textcol  { -webkit-flex: 1 1 210px; flex: 1 1 210px; }

	/* Fallback (no flex or no JS):
	 * Image beside text
	 * - in mobile or tablet view > 400px
	 * - in desktop view without right column > 800px
	 * - in desktop view with right col > 870px
	 *
	 * Disable again for 2 content columns < 1200px, 3 content columns always
	 */
@media (min-width: 401px) and (max-width:800px) {
	html:not(.flexbox):not(.flexwrap) .content .vc_imagecol { float: right; }
	html:not(.flexbox):not(.flexwrap) .content .vcard.has_image.tumvcard_default .vc_textcol { margin-right: 145px; }
	html:not(.flexbox):not(.flexwrap) .content .vcard.has_image.tumvcard_small .vc_textcol { margin-right: 75px; }
}

@media (min-width: 801px) {
	html:not(.flexbox):not(.flexwrap) .cols-normal .content .vc_imagecol { float: right; }
	html:not(.flexbox):not(.flexwrap) .cols-normal .content .vcard.has_image.tumvcard_default .vc_textcol { margin-right: 145px; }
	html:not(.flexbox):not(.flexwrap) .cols-normal .content .vcard.has_image.tumvcard_small .vc_textcol { margin-right: 75px; }
}
@media (min-width: 871px) {
	html:not(.flexbox):not(.flexwrap) .content .vc_imagecol { float: right; }
	html:not(.flexbox):not(.flexwrap) .content .vcard.has_image.tumvcard_default .vc_textcol { margin-right: 145px; }
	html:not(.flexbox):not(.flexwrap) .content .vcard.has_image.tumvcard_small .vc_textcol { margin-right: 75px; }
}

@media (min-width: 800px) and (max-width: 1200px) {
	html:not(.flexbox):not(.flexwrap) .content .cols-2 .vc_imagecol { float: none; }
	html:not(.flexbox):not(.flexwrap) .content .cols-2 .vcard.has_image.tumvcard_default .vc_textcol { margin-right: 0; }
	html:not(.flexbox):not(.flexwrap) .content .cols-2 .vcard.has_image.tumvcard_small .vc_textcol { margin-right: 0; }
}

@media (min-width: 900px) {
	html:not(.flexbox):not(.flexwrap) .content .cols-3 .vc_imagecol { float: none; }
	html:not(.flexbox):not(.flexwrap) .content .cols-3 .vcard.has_image.tumvcard_default .vc_textcol { margin-right: 0; }
	html:not(.flexbox):not(.flexwrap) .content .cols-3 .vcard.has_image.tumvcard_small .vc_textcol { margin-right: 0; }
}

.content .vcard {
	padding: .5em 0;
}

.vc_imagecol { text-align: left; }

.tumvcard_default .vc_imagecol img { width: 140px; height: auto; }

.tumvcard_small   .vc_imagecol img { width:  70px; height: auto; }

/* Text column styles */
.vcard h3 {
	margin-top: 0;
	border: none;
	text-transform: none;
}

.vcard h6 {
	color: #7f7f7f;
	font-size: 85%;
	font-style: normal;
	font-weight: normal;
	margin-top: 1em;
	margin-bottom: 0;
}

#sidebar .vcard h3 { border-style: none; }

#sidebar .vcard h6 {
	border-style: none;
	margin-top: 1em;
	margin-bottom: 0;
}

.vcard p { margin: 0 0 .2em 0; }

.vcard ul {
	list-style-type: none;
	padding: 0;
}

.vcard li {
	padding-left: 0;
	margin-left: 1em;
	text-indent: -1em;
}

.vcard li.vc_mail { font-weight: bold; }

a.callable br { display: none; }
a.callable.additional.baseplusextension:before { content: "; "; }
a.callable.additional.extension:before { content: ", -"; }

/* "No image" */
.vcard div.noimage {
	width: 140px;
	height: 180px;
	border: solid 1px #999;
	background: white url(https://www.sfb.tum.de/typo3/ext/tumtheme/Resources/Public/Icons/person.svg) center no-repeat;
	/* background-size: 80% auto */
}
.vcard.tumvcard_small div.noimage {
	width: 70px;
	height: 90px;
}
.vcard div.noimage div {
	text-align: center;
	margin-top: 30px;
	color: #A4A4A4;
}

html.svg.images .vcard div.noimage div { text-indent: -9999px; }

/* Class name clash */
#page-body .vcard .org { display: block; border-style: none; }

/*
 * TUM Memberlist
 */

/* Common */
.tummemberlist td.ml_ph { display: none; }

.tummemberlist .has-images td.ml_ph {
	display: table-cell;
	min-width: 40px;
	text-align: right;
}

.tummemberlist .legend { clear: both; }

/*.tummemberlist .simple.has-images .member.noimage img.ml_icon,
.tummemberlist .simple.has-images .member.noimage img.ml_icon
	{width: auto; height: auto; border: 0; }
*/
.tummemberlist td.ml_em img { max-width: none;}

	/* "no image" */
.tummemberlist .has-images td.ml_ph.noimage img:not(.ml_icon),
.tummemberlist .simple.has-images .member.noimage img:not(.ml_icon)
 {
	width: 28px;
	height: 39px;
	border: 1px solid #999;
	text-align: center;
	font-size: 10px;
	line-height: 1;
	padding: 5px;
}
.tummemberlist .simple.has-images .member.noimage img:not(.ml_icon) {
	width: 38px;
	height: 52px;
}

.tummemberlist a.imagelink { border: 0;}

.tummemberlist .phonebasetag,
.tummemberlist .shortroom { border-bottom: 1px dotted #333; }

.tummemberlist th.member {
	border-bottom-width: 1px;
	background-color: transparent;
	font-weight: normal;
	font-size: .93em;
	text-align: left;
	color: #333;
}

.tummemberlist a[href^="mailto:"] {
	background-image: none;
	padding-left: 0;
}

	/* Block separator */
.tummemberlist tr.sep {
	height: 3em;
	border-bottom: none;
}

	/* Flexing */
.tummemberlist table.ce-table--flex td::before,
.tummemberlist table.ce-table--flex th::before { display: none; }
.tummemberlist table.ce-table--flex .sep { visibility: hidden; }
.tummemberlist table.ce-table--flex td,
.tummemberlist table.ce-table--flex th { padding: 0; border-bottom-style: none; }
.tummemberlist table.ce-table--flex th.rowgroup { background-color: #eee; }

/* "Gitternetz" */
.tummemberlist.gitternetz,
.tummemberlist table.gitternetz,
.tummemberlist table.gitternetz tr.sep td { border: none; }


/* "Ohne Tabelle" & "Spalten" */
.tummemberlist.minimalist { max-width: 30em; }

.content .tummemberlist.gitternetz .simple h3 { text-transform: uppercase; }

.tummemberlist .simple .member {
	clear: both;
	margin-top: 1.7em;
	margin-bottom: 1em;
}

.tummemberlist .simple.has-images .member { min-height: 70px; }

.content .tummemberlist .simple .ml_imagecol {
	float: right;
	margin-bottom: .5em;
}

.tummemberlist .simple.no-images .ml_imagecol { display: none; }

.content .tummemberlist .simple .ml_textcol { margin-right: 60px; /* Adjust this to image dimension from template */ }

.tummemberlist .simple .ml_textcol {
	overflow: hidden;
	text-overflow: ellipsis;
}

.side .tummemberlist .simple.has-images .member.noimage .ml_imagecol { display: none; }

.side .tummemberlist .simple.has-images .member.noimage { min-height: auto; }

div.member { margin: .85em 0; }

/* "Zwei Spalten" (extra) */
@media (min-width: 400px) {
	.tummemberlist.columns .simple .member { width: 47%; }

	.tummemberlist.columns .simple .member.odd {  clear: both; float: left;  }
	.tummemberlist.columns .simple .member.even { clear: none; float: right; }

	.tummemberlist.columns h3 { clear: both; }
}

/* "Galerie" */
.tummemberlist.gallery { text-align: center; overflow: hidden; }

.tummemberlist.gallery h3 { clear: both; }

.tummemberlist.gallery ul {
	position: relative;
	left: 50%;
	margin: auto;
	list-style: none;
	padding: 0;
}

.tummemberlist.gallery ul li {
	display: inline-block;
	position: relative;
	left: -50%;
	width: 112px;  /* Adjust this to image dimension from template */
	padding: 5px;
	margin: 5px;
	vertical-align: top;
}

.tummemberlist.gallery  ul li img,
.tummemberlist.gallery div.noimage {
	padding: 5px;
	margin: 0 2px;
}
.tummemberlist.gallery .name {
	padding: 2px 6px 0 6px;
	font-size: 10px;
	line-height: normal;
}

	/* No image */
.tummemberlist.gallery div.noimage div {
	width: 98px; height: 126px; /* Adjust this to image dimension from template */
	border: solid 1px #999;
	text-align: center;
	color: #A4A4A4;
}

html.svg .tummemberlist.gallery div.noimage div {
	background: white url(https://www.sfb.tum.de/typo3/ext/tumtheme/Resources/Public/Icons/person.svg) center no-repeat;
	background-size: 80% auto;
	text-indent: -9999px;
}

.tummemberlist.gallery a.imagelink:after {
	bottom: 10px;
	right: 10px;
}
