/* FMG Termine: compact table, event cards and single view */

/* Pages with event lists use the full content width instead of
   Twenty Seventeen's two-column page layout (title left, content right). */
@media screen and (min-width: 48em) {
	body.fmg-termine-breit.page-two-column:not(.archive) #primary .entry-header,
	body.fmg-termine-breit.page-two-column:not(.archive) #primary .entry-content {
		float: none;
		width: 100%;
	}

	body.fmg-termine-breit.page-two-column:not(.archive) #primary .entry-header {
		margin-bottom: 0.5em;
		padding-bottom: 0.5em;
	}

	/* Twenty Seventeen puts 5.5em above the page title; halve it on event pages. */
	body.fmg-termine-breit .site-content {
		padding-top: 2.75em;
	}
}

@media screen and (max-width: 47.99em) {
	body.fmg-termine-breit .site-content {
		padding-top: 1.25em;
	}
}

/* A blog post that only carries an event list (the unlisted compact page) is not an
   article: hide the publishing line, the category footer and the previous/next
   links to unrelated blog posts. Single event pages keep their navigation. */
body.single-post.fmg-termine-breit .entry-meta,
body.single-post.fmg-termine-breit .entry-footer,
body.single-post.fmg-termine-breit .post-navigation {
	display: none;
}

/* Empty paragraphs around the shortcode in the page content add further gaps,
   as does a leftover <p><code> wrapper from the old MEC shortcode. */
body.fmg-termine-breit .entry-content > p:empty,
body.fmg-termine-breit .entry-content > p:has(> code:empty:only-child) {
	display: none;
}

/* pictures */

.fmg-termine-kompakt th.fmg-termin-icon-zelle,
.fmg-termine-kompakt td.fmg-termin-icon-zelle {
	width: 40px;
	padding-right: 4px;
	vertical-align: middle;
}

.fmg-termin-icon {
	display: block;
	width: 40px;
}

.fmg-termin-icon img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.fmg-termin-bild {
	float: right;
	margin: 0 0 10px 16px;
	max-width: 40%;
}

.fmg-termin-bild img {
	display: block;
	height: auto;
	max-width: 100%;
	border-radius: 4px;
}

.fmg-termin-info {
	overflow: hidden;
}

@media screen and (max-width: 30em) {
	.fmg-termin-bild {
		float: none;
		max-width: 100%;
		margin: 0 0 10px;
	}
}

.fmg-termine-kompakt {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.fmg-termine-kompakt th {
	border-bottom: 2px solid #ddd;
	padding: 8px;
}

.fmg-termine-kompakt td {
	border-bottom: 1px solid #ddd;
	padding: 8px;
	vertical-align: top;
}

.fmg-termine-kompakt td.fmg-termin-datum,
.fmg-termine-kompakt td.fmg-termin-zeit {
	white-space: nowrap;
}

/* Twenty Seventeen underlines content links with a box-shadow; keep the
   event titles plain and underline them on hover/focus only. */
.entry-content .fmg-termine-kompakt a,
.entry-content .fmg-termin-karte a,
.fmg-termine-kompakt a,
.fmg-termin-karte a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}

.entry-content .fmg-termine-kompakt a:hover,
.entry-content .fmg-termine-kompakt a:focus,
.entry-content .fmg-termin-karte a:hover,
.entry-content .fmg-termin-karte a:focus,
.fmg-termine-kompakt a:hover,
.fmg-termine-kompakt a:focus,
.fmg-termin-karte a:hover,
.fmg-termin-karte a:focus {
	text-decoration: underline;
	box-shadow: none;
}

.entry-content .fmg-termin-icon,
.entry-content .fmg-termin-icon:hover,
.entry-content .fmg-termin-icon:focus {
	text-decoration: none;
	box-shadow: none;
}

.fmg-termin-past {
	color: #888;
}

.fmg-termin-next {
	color: #1a4fd6;
	font-weight: bold;
}

.fmg-termin-cancelled td,
li.fmg-termin-cancelled .fmg-termin-datum,
li.fmg-termin-cancelled .fmg-termin-zeit {
	text-decoration: line-through;
	color: #888;
}

.fmg-termin-cancelled.fmg-termin-next td {
	color: #c00;
}

/* Cells shared by the consecutive days of one event carry the state of the whole
   run instead of inheriting the state of the first day's row. */
.fmg-termine-kompakt td.fmg-termin-geteilt {
	color: inherit;
	font-weight: normal;
	text-decoration: none;
	vertical-align: middle;
}

.fmg-termine-kompakt tr td.fmg-termin-geteilt {
	color: #222;
}

.fmg-termine-kompakt td.fmg-termin-geteilt.is-past {
	color: #888;
}

.fmg-termine-kompakt td.fmg-termin-geteilt.is-next {
	color: #1a4fd6;
	font-weight: bold;
}

.fmg-termin-abgesagt {
	display: inline-block;
	background: #c00;
	color: #fff;
	padding: 1px 6px;
	border-radius: 3px;
	font-weight: bold;
	font-size: 0.85em;
	margin-left: 6px;
	text-decoration: none;
}

.fmg-termin-ort,
.fmg-termin-bemerkung {
	display: inline-block;
	color: #666;
	font-size: 0.9em;
	font-weight: normal;
	margin-left: 6px;
}

.fmg-termine-leer {
	font-style: italic;
}

/* editing shortcuts, only rendered for users who may edit events */

.fmg-termine-verwalten {
	text-align: right;
	font-size: 0.85em;
	margin: 0 0 0.5em;
	color: #666;
}

.fmg-termin-bearbeiten {
	display: inline-block;
	margin-left: 6px;
	color: #999;
	font-size: 0.9em;
	opacity: 0.6;
}

.fmg-termine-kompakt tr:hover .fmg-termin-bearbeiten,
.fmg-termin-bearbeiten:hover,
.fmg-termin-bearbeiten:focus {
	opacity: 1;
	color: #1a4fd6;
}

/* cards */

.fmg-termine-karten {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
	margin: 0 0 1.5em;
}

.fmg-termin-karte {
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.fmg-termin-karte-poster img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
}

.fmg-termin-karte-inhalt {
	padding: 12px 14px 14px;
}

.fmg-termin-karte-kopf {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
}

.fmg-termin-karte-icon {
	flex: none;
	display: block;
	width: 48px;
	height: 48px;
}

.fmg-termin-karte-icon img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	display: block;
	border-radius: 4px;
}

.fmg-termin-karte h3 {
	margin: 0;
	font-size: 1.1em;
	line-height: 1.3;
}

.fmg-termin-karte .fmg-termin-ort {
	display: block;
	margin: 0 0 8px;
}

.fmg-termin-karte-tage {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fmg-termin-karte-tage li {
	margin: 0 0 2px;
	font-size: 0.95em;
}

.fmg-termin-karte-tage .fmg-termin-weitere {
	color: #666;
	font-size: 0.9em;
}

.fmg-termin-karte-text {
	margin: 10px 0 0;
	font-size: 0.95em;
	color: #444;
}

/* single view */

.fmg-termin-info {
	margin: 0 0 1.5em;
	padding: 12px 16px;
	background: #f6f7f9;
	border-left: 4px solid #1a4fd6;
}

.fmg-termin-info p {
	margin: 0 0 0.6em;
}

.fmg-termin-info-mitglieder {
	color: #666;
	font-style: italic;
}

.fmg-termin-tage {
	border-collapse: collapse;
	margin: 0;
}

.fmg-termin-tage td {
	padding: 4px 16px 4px 0;
	border: 0;
}

.fmg-termin-login-hinweis {
	padding: 12px 16px;
	border-left: 4px solid #1a4fd6;
	background: #eef3ff;
}
