/* Meldungen im Panel: Karte je neuer Anfrage, Zaehler an den Reitern, Ton-Schalter. Farbe a (Nachtblau, Gold, Creme).
   Laedt nach mh-farbe.css. Kontrast Schrift mindestens 7:1 (AAA), Tippziele 44 px, Bewegung nur ohne "weniger Bewegung". */
:root {
  --mm-karte: #FFFDF8;
  --mm-text: #13202C;
  --mm-leise: #4A4237;
  --mm-akzent: #112F4D;
  --mm-knopf: #112F4D;
  --mm-knopf-text: #F8F3EA;
  --mm-knopf-hover: #0A1F35;
  --mm-rand: #E3D8C3;
  --mm-zimmer: #112F4D;
  --mm-tisch: #A9792F;
  --mm-feier: #8A4A2B;
  --mm-zeichen-text: #FFFFFF;
  --mm-zaehler: #112F4D;
  --mm-zaehler-text: #F8F3EA;
  --mm-puls: rgba(180, 134, 63, 0.55);
  --mm-schatten: 0 2px 4px rgba(17, 47, 77, 0.08), 0 18px 36px -16px rgba(17, 47, 77, 0.38);
  --mm-fokus: #112F4D;
}
html[data-theme="dark"] {
  --mm-karte: #142536;
  --mm-text: #F8F3EA;
  --mm-leise: #D9CDB8;
  --mm-akzent: #E6BD68;
  --mm-knopf: #E6BD68;
  --mm-knopf-text: #0A1F35;
  --mm-knopf-hover: #F0CF89;
  --mm-rand: #2C4560;
  --mm-zimmer: #B9CFE8;
  --mm-tisch: #E6BD68;
  --mm-feier: #E7A27C;
  --mm-zeichen-text: #0A1F35;
  --mm-zaehler: #E6BD68;
  --mm-zaehler-text: #0A1F35;
  --mm-puls: rgba(230, 189, 104, 0.5);
  --mm-schatten: 0 18px 40px -14px rgba(0, 0, 0, 0.75);
  --mm-fokus: #E6BD68;
}

.mh-unsichtbar {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}

/* ---------- Karte ----------
   Drei Kennungen im Waehler: die Vorlage (pension-vorlage.css) und buchung-eintragen.css halten mit zwei und drei dagegen. */
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung {
  background: var(--mm-karte) !important; color: var(--mm-text) !important;
  border: 1px solid var(--mm-rand) !important; border-left: 6px solid var(--mm-zimmer) !important; border-radius: 14px !important;
  box-shadow: var(--mm-schatten) !important; padding: 14px 16px !important;
  font-family: var(--vr-font-body, Georgia, serif) !important; cursor: pointer; text-align: left !important;
}
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung.mh-meldung--tisch { border-left-color: var(--mm-tisch) !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung.mh-meldung--event { border-left-color: var(--mm-feier) !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__kopf { display: flex !important; align-items: center !important; gap: 10px !important; margin: 0 0 6px 0 !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__zeichen {
  flex: 0 0 auto !important; width: 32px !important; height: 32px !important; padding: 6px !important; border-radius: 50% !important;
  background: var(--mm-zimmer) !important; color: var(--mm-zeichen-text) !important; box-sizing: border-box !important;
}
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung.mh-meldung--tisch .mh-meldung__zeichen { background: var(--mm-tisch) !important; color: #0A1F35 !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung.mh-meldung--event .mh-meldung__zeichen { background: var(--mm-feier) !important; }
html[data-theme="dark"] body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung--event .mh-meldung__zeichen { color: #0A1F35 !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .live-popup__type {
  font: 700 14px/1.3 var(--vr-font-body, Georgia, serif) !important; letter-spacing: 0.05em !important; text-transform: uppercase !important;
  color: var(--mm-akzent) !important; margin: 0 !important; padding: 0 !important; background: none !important;
}
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .live-popup__name {
  font: 600 19px/1.3 var(--vr-font-display, Georgia, serif) !important; color: var(--mm-text) !important;
  margin: 0 0 6px 0 !important; padding: 0 !important; background: none !important; border: 0 !important; text-align: left !important;
}
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten { margin: 0 0 10px 0 !important; display: grid !important; gap: 2px !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten > div { display: flex !important; gap: 8px !important; align-items: baseline !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten dt { flex: 0 0 3.2em !important; margin: 0 !important; font: 400 14px/1.45 var(--vr-font-body, Georgia, serif) !important; color: var(--mm-leise) !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten dd { margin: 0 !important; font: 500 16px/1.45 var(--vr-font-body, Georgia, serif) !important; color: var(--mm-text) !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .live-popup__vermerk { font-size: 14px !important; margin: 0 0 10px 0 !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__ansehen {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; min-height: 44px !important; min-width: 44px !important;
  padding: 0 22px !important; margin: 0 !important; border: 0 !important; border-radius: 10px !important;
  background: var(--mm-knopf) !important; color: var(--mm-knopf-text) !important; box-shadow: none !important;
  font: 700 15px/1 var(--vr-font-body, Georgia, serif) !important; letter-spacing: 0.04em !important; text-transform: none !important; cursor: pointer !important;
}
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__ansehen:hover { background: var(--mm-knopf-hover) !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__ansehen:focus-visible { outline: 3px solid var(--mm-fokus) !important; outline-offset: 3px !important; }
html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung.is-pulsing { animation: mh-leuchten 2.4s ease-in-out 2 !important; }
@keyframes mh-leuchten {
  0%, 100% { box-shadow: var(--mm-schatten), 0 0 0 0 var(--mm-puls); }
  50% { box-shadow: var(--mm-schatten), 0 0 0 8px var(--mm-puls); }
}
/* Leiste unten bis 1040 px: kompakte Karte, Zeichen und Knopf neben dem Text, "Was" nur fuer Vorleser. */
@media screen and (max-width: 1040px) {
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung {
    display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto !important; grid-template-areas: "z t k" "z n k" "z d k" !important;
    column-gap: 10px !important; row-gap: 1px !important; align-items: center !important; padding: 10px 12px !important;
    min-width: min(21rem, calc(100vw - 72px)) !important; flex: 0 0 auto !important; max-width: 26rem !important;
  }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__kopf { display: contents !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__zeichen { grid-area: z !important; align-self: center !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .live-popup__type { grid-area: t !important; font-size: 13px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .live-popup__name { grid-area: n !important; font-size: 17px !important; margin: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten { grid-area: d !important; margin: 0 !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten > div { display: block !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten dt, html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten > div + div {
    position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important;
  }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten dd { font-size: 15px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .live-popup__vermerk { grid-column: 2 !important; margin: 2px 0 0 0 !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__ansehen { grid-area: k !important; padding: 0 14px !important; }
  body.pv-stapel-eng #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung .mh-meldung__daten {
    position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important;
  }
}

/* ---------- Zaehler an den Reitern ---------- */
.adm-tabs button .mh-zaehler {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 8px;
  border-radius: 999px; background: var(--mm-zaehler); color: var(--mm-zaehler-text);
  font: 700 14px/1 var(--vr-font-body, Georgia, serif); letter-spacing: 0; vertical-align: middle; box-sizing: border-box;
}
.adm-tabs button.mh-reiter-neu .mh-zaehler { animation: mh-puls 2.6s ease-in-out infinite; }
@keyframes mh-puls {
  0%, 100% { box-shadow: 0 0 0 0 var(--mm-puls); }
  50% { box-shadow: 0 0 0 6px rgba(0, 0, 0, 0); }
}
/* Das alte Blinken und die alte Zahl der Vorlage bleiben aus. */
.adm-tabs button.live-tab-pending--tisch, .adm-tabs button.live-tab-pending--zimmer, .adm-tabs button.live-tab-pending--event { animation: none !important; opacity: 1 !important; }

/* ---------- Ton-Schalter im Kopf ---------- */
.adm-header__right .mh-ton {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 1px solid var(--mm-akzent); border-radius: 8px; background: transparent; color: var(--mm-text);
  font: 600 14px/1 var(--vr-font-body, Georgia, serif); letter-spacing: 0.02em; cursor: pointer; white-space: nowrap;
}
.adm-header__right .mh-ton .mh-ton__zeichen { width: 20px; height: 20px; flex: 0 0 auto; color: var(--mm-akzent); }
.adm-header__right .mh-ton[aria-pressed="false"] { border-style: dashed; }
.adm-header__right .mh-ton:hover { background: rgba(180, 134, 63, 0.12); }
.adm-header__right .mh-ton:focus-visible { outline: 3px solid var(--mm-fokus); outline-offset: 3px; }
@media (max-width: 768px) {
  .adm-header__right .mh-ton { padding: 0 10px; }
}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .adm-tabs button.mh-reiter-neu .mh-zaehler, html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung.is-pulsing { animation: none !important; }
  html body #live-popup-stack#live-popup-stack#live-popup-stack > .live-popup.mh-meldung { transition: opacity .2s ease !important; }
}

/* ---------- Fenster "Ansehen": Beschriftung leise, Wert gross ---------- */
html body .live-overlay-backdrop .live-overlay .live-overlay__type { display: flex !important; align-items: center !important; gap: 8px !important; }
html body .live-overlay-backdrop .live-overlay .live-overlay__type .mh-meldung__zeichen { width: 22px !important; height: 22px !important; flex: 0 0 auto !important; }
html body .live-overlay-backdrop .live-overlay .live-overlay__row span {
  font: 400 14px/1.4 var(--vr-font-body, Georgia, serif) !important; letter-spacing: 0.02em !important; text-transform: none !important; color: var(--mm-leise) !important;
}
html body .live-overlay-backdrop .live-overlay .live-overlay__row b {
  font: 600 17px/1.4 var(--vr-font-body, Georgia, serif) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--mm-text) !important;
  overflow-wrap: anywhere !important;
}
/* Fenster nie hoeher als der Bildschirm (am Handy lagen Stornieren und Bearbeiten sonst unerreichbar unter dem Rand). */
html body .live-overlay-backdrop .live-overlay {
  max-height: calc(100vh - 24px) !important; max-height: calc(100dvh - 24px) !important;
  overflow-y: auto !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
/* Dunkel: Bestaetigen in Gold, alle Knoepfe mit sichtbarem Rand (mindestens 3:1 gegen das Fenster). Die allgemeine Knopfregel
   des dunklen Panels traegt eine Kennung in :not(), deshalb hier ebenfalls eine (:not(#mh-nie)) und mehr Klassen. */
html[data-theme="dark"] body .live-overlay-backdrop .live-overlay .live-overlay__actions button.live-overlay__btn:not(#mh-nie) { border: 1px solid #6F849A !important; }
html[data-theme="dark"] body .live-overlay-backdrop .live-overlay .live-overlay__actions button.live-overlay__btn.live-overlay__btn--confirm:not([disabled]):not(#mh-nie) { background-color: #E6BD68 !important; color: #0A1F35 !important; border-color: #E6BD68 !important; }
html[data-theme="dark"] body .live-overlay-backdrop .live-overlay .live-overlay__actions button.live-overlay__btn.live-overlay__btn--cancel:not([disabled]):not(#mh-nie) { color: #F2B8AE !important; border-color: #C9776B !important; }
html[data-theme="dark"] body .live-overlay-backdrop .live-overlay .live-overlay__actions button.live-overlay__btn.live-overlay__btn--edit:not(#mh-nie) { border-color: #6F849A !important; }

/* ---------- Grundmasse im ganzen Panel: Felder 16 px (sonst zoomt iOS), Tippziele mindestens 44 px ---------- */
html body :is(#adm-shell, #adm-login, .adm-edit-backdrop) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]), select, textarea) {
  font-size: 16px !important; min-height: 44px !important; box-sizing: border-box !important;
}
html body :is(#adm-shell, .adm-edit-backdrop) :is(.adm-btn, .adm-mini, .adm-filter button) { min-height: 44px !important; min-width: 44px !important; }
/* Telefon und Mail in den Karten: groessere Flaeche zum Antippen, das Bild bleibt gleich. */
html body #adm-shell :is(a[href^="tel:"], a[href^="mailto:"]) { display: inline-block; padding-block: 14px; margin-block: -14px; }
/* WebKit zeichnet ein select mit eigenem Aussehen nur 24 px hoch und uebergeht min-height: eigenes Aussehen, feste Hoehe, Pfeil aus zwei Verlaeufen. */
html body #adm-shell select.um-auswahl {
  -webkit-appearance: none !important; appearance: none !important; height: 44px !important; padding-right: 38px !important;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%) !important;
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50% !important; background-size: 6px 6px, 6px 6px !important; background-repeat: no-repeat !important;
}
