/*
 * Mendels Öffnungszeiten – bewusst zurückhaltend: Schrift, Schriftfarbe und Links kommen vom Theme, damit es auf hellem
 * und dunklem Grund (z. B. im Fuß) passt; farbe="hell" für dunklen oder farbigen Grund. Anpassen über die Variablen;
 * ganz abschalten mit add_filter('mao_oez_stil', '__return_false').
 * Themes und Page-Builder (z. B. Elementor) gestalten Tabellen und Listen gern selbst – darum sind die Regeln für die
 * Tabelle bewusst genauer gefasst als übliche Theme-Regeln.
 */
.mao-oez {
	--mao-oez-offen: #4EB84F;
	--mao-oez-zu: #C9472F;
	--mao-oez-linie: rgba(128, 128, 128, .35);
	--mao-oez-abstand: 1rem;
	text-align: left;
}
/* Auf dunklem oder farbigem Grund (farbe="hell") */
.mao-oez.mao-oez-hell { --mao-oez-linie: rgba(255, 255, 255, .45); color: #fff; }
.mao-oez.mao-oez-hell a { color: inherit; }

.mao-oez p { margin: 0 0 .35em; }
.mao-oez-name { font-weight: 700; }

.mao-oez-status { display: flex; align-items: baseline; gap: .45em; }
.mao-oez-punkt {
	flex: none; align-self: flex-start;
	margin-top: .45em; margin-top: calc((1lh - .6em) / 2);
	width: .6em; height: .6em; border-radius: 50%;
	background: var(--mao-oez-zu);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);   /* bleibt auch auf grünem oder rotem Grund sichtbar */
}
.mao-oez-status.ist-offen .mao-oez-punkt { background: var(--mao-oez-offen); }
.mao-oez-status.ist-offen .mao-oez-status-text { font-weight: 600; }

/* Startseite: eine Karte je Filiale, so viele nebeneinander wie passen */
.mao-oez-start {
	display: grid; gap: var(--mao-oez-abstand);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.mao-oez-start .mao-oez-filiale {
	display: flex; flex-direction: column;
	padding: var(--mao-oez-abstand);
	border: 1px solid var(--mao-oez-linie); border-radius: .5rem;
}
.mao-oez-start .mao-oez-name { font-size: 1.15em; }
.mao-oez-bald { font-size: .9em; }
.mao-oez .mao-oez-mehr { margin-top: auto; padding-top: .5em; }

/* Fuß: knapp, Filialen nebeneinander */
.mao-oez-fuss { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; font-size: .9em; line-height: 1.45; }
.mao-oez-fuss p { margin-bottom: .2em; }
.mao-oez-fuss .mao-oez-status { margin-bottom: .3em; }
.mao-oez .mao-oez-zeiten { display: grid; grid-template-columns: auto 1fr; gap: 0 .75em; margin: 0; }
.mao-oez-zeiten br { display: none; }

/* Zentriert (ausrichtung="mitte") – Startseite und Fuß: Text mittig; Seite des Geschäfts: siehe unten */
.mao-oez-start.mao-oez-mitte, .mao-oez-fuss.mao-oez-mitte { text-align: center; }
.mao-oez-fuss.mao-oez-mitte { justify-content: center; }
.mao-oez-start.mao-oez-mitte .mao-oez-status, .mao-oez-fuss.mao-oez-mitte .mao-oez-status { justify-content: center; }
.mao-oez-fuss.mao-oez-mitte .mao-oez-zeiten { grid-template-columns: auto auto; justify-content: center; text-align: left; }

/* Seite des Geschäfts: so breit wie der Inhalt – steht im Abschnitt links, mittig oder rechts wie dessen Text */
.mao-oez.mao-oez-seite { display: inline-block; max-width: 100%; vertical-align: top; }
/* ausrichtung="mitte": Block mittig, unabhängig vom Abschnitt; die Zeilen darin bleiben bündig untereinander */
.mao-oez.mao-oez-seite.mao-oez-mitte { display: table; margin-left: auto; margin-right: auto; }
.mao-oez table.mao-oez-woche {
	width: auto; margin: .5em 0 1em; border: 0; border-collapse: collapse;
	background: none; font-size: inherit; line-height: inherit;
}
.mao-oez table.mao-oez-woche > tbody > tr > th,
.mao-oez table.mao-oez-woche > tbody > tr > td {
	padding: .3em 1.5em .3em 0; border: 0; border-bottom: 1px solid var(--mao-oez-linie);
	background: none; color: inherit; font-size: inherit; line-height: inherit;
	font-weight: 400; text-align: left; vertical-align: top;
}
.mao-oez table.mao-oez-woche > tbody > tr > td:last-child { padding-right: 0; }
.mao-oez table.mao-oez-woche > tbody > tr.ist-heute > th,
.mao-oez table.mao-oez-woche > tbody > tr.ist-heute > td { font-weight: 700; }
.mao-oez-woche small { display: block; opacity: .75; }
.mao-oez .mao-oez-ausnahmen { margin: .25em 0 1em 1.2em; padding: 0; text-align: left; }
.mao-oez-hinweis { font-style: italic; }
.mao-oez .mao-oez-adresse { margin-top: .5em; }
