/* Mediatech Support-Chat und Meine Anfragen. Farben und Schrift der Startseite (Weinrot, Inter), Abstaende aus der
   Fibonacci-Reihe 3 5 8 13 21 34 55 89 144 233 377 610. */
.mtchat, .mtchat *, .mtchat__knopf, .mtportal, .mtportal * { box-sizing: border-box; }
.mtchat, .mtchat__knopf, .mtportal {
  --mt-wein: #8f2f22; --mt-wein-hell: #b8432f; --mt-wein-tief: #6e2318; --mt-grund: #f7f4f2; --mt-karte: #ffffff;
  --mt-text: #2b2523; --mt-leise: #5f5654; --mt-linie: #e4dcd8; --mt-gruen: #1f7a4d; --mt-system: #efe8e4; --mt-fehler: #a3231a;
  --f3: 3px; --f5: 5px; --f8: 8px; --f13: 13px; --f21: 21px; --f34: 34px; --f55: 55px; --f89: 89px;
  --mt-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.mtchat[hidden], .mtchat [hidden] { display: none !important; }
.mtchat {
  /* 08.10.2026: Knopf sitzt 89 px hoch (Nach-oben-Knopf und Cookie-Einstellung liegen darunter), Fenster oberhalb des Knopfs */
  position: fixed; right: var(--f21); bottom: calc(var(--f89) + var(--f55) + var(--f13)); z-index: 99990;
  width: 377px; max-width: calc(100vw - 2 * var(--f13)); height: min(610px, calc(100vh - 233px)); min-height: 377px;
  font-family: var(--mt-sans); font-size: 15px; line-height: 1.5; color: var(--mt-text);
}
.mtchat__fenster {
  display: flex; flex-direction: column; height: 100%; background: var(--mt-karte); border-radius: var(--f21); overflow: hidden;
  box-shadow: 0 var(--f13) var(--f55) rgba(43, 37, 35, .28), 0 0 0 1px rgba(43, 37, 35, .06);
}
.mtchat__kopf {
  display: flex; align-items: center; gap: var(--f8); min-height: var(--f55); padding: var(--f8) var(--f8) var(--f8) var(--f13);
  background: linear-gradient(135deg, var(--mt-wein-tief) 0%, var(--mt-wein) 55%, var(--mt-wein-hell) 100%); color: #fff;
}
.mtchat__logo { width: 89px; height: auto; flex: 0 0 auto; display: block; }
.mtchat__kopf-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mtchat__kopf-text strong { font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtchat__kopf-text span { font-size: 12px; opacity: .9; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtchat__unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mtchat__sprache select {
  height: var(--f34); border: 0; border-radius: var(--f8); background: rgba(0, 0, 0, .22); color: #fff; font: 600 12px/1 var(--mt-sans);
  padding: 0 var(--f5); cursor: pointer; appearance: auto;
}
.mtchat__sprache select option { color: var(--mt-text); background: #fff; }
.mtchat__ikon {
  flex: 0 0 var(--f34); width: var(--f34); height: var(--f34); border: 0; border-radius: 50%; background: rgba(0, 0, 0, .22); color: #fff;
  font-size: 21px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .15s;
}
.mtchat__ikon:hover, .mtchat__sprache select:hover { background: rgba(0, 0, 0, .4); }
.mtchat__ikon:focus-visible, .mtchat__sprache select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mtchat__neu { font-size: 18px; }
.mtchat__thema .mtchat__sonne { display: none; }
.mtchat[data-thema="dunkel"] .mtchat__thema .mtchat__sonne { display: block; }
.mtchat[data-thema="dunkel"] .mtchat__thema .mtchat__mond { display: none; }

.mtchat__verlauf { flex: 1; overflow-y: auto; padding: var(--f13); background: var(--mt-grund); display: flex; flex-direction: column; gap: var(--f8); }
.mtchat__zeile { display: flex; gap: var(--f8); align-items: flex-end; max-width: 100%; }
.mtchat__zeile--kunde { flex-direction: row-reverse; }
.mtchat__avatar {
  flex: 0 0 var(--f34); width: var(--f34); height: var(--f34); border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff; background: var(--mt-wein);
}
.mtchat__blase {
  max-width: calc(100% - var(--f55)); padding: var(--f8) var(--f13); border-radius: var(--f13); background: var(--mt-karte);
  box-shadow: 0 1px var(--f3) rgba(43, 37, 35, .08); overflow-wrap: anywhere;
}
.mtchat__text { white-space: pre-wrap; }
.mtchat__zeile--team .mtchat__text { white-space: normal; }
.mtchat__text p { margin: 0 0 var(--f8); } .mtchat__text p:last-child { margin-bottom: 0; }
.mtchat__text ul, .mtchat__text ol { margin: 0 0 var(--f8); padding-left: var(--f21); }
.mtchat__text a { color: var(--mt-wein); text-decoration: underline; }
.mtchat__zeile--kunde .mtchat__blase { background: var(--mt-wein); color: #fff; border-bottom-right-radius: var(--f3); }
.mtchat__zeile--kunde .mtchat__text a { color: #fff; }
.mtchat__zeile--team .mtchat__blase { border-bottom-left-radius: var(--f3); }
.mtchat__zeile--system { justify-content: center; }
.mtchat__zeile--system .mtchat__blase { max-width: 100%; background: var(--mt-system); color: var(--mt-text); font-size: 13px; }
.mtchat__zeile--unterwegs { opacity: .7; }
.mtchat__wer { display: block; font-size: 11px; color: var(--mt-leise); margin-bottom: var(--f3); }
.mtchat__zeile--kunde .mtchat__wer { color: rgba(255, 255, 255, .85); text-align: right; }
.mtchat__tippt { display: inline-flex; gap: var(--f3); align-items: center; margin-left: var(--f8); vertical-align: middle; }
.mtchat__tippt i { width: var(--f5); height: var(--f5); border-radius: 50%; background: var(--mt-wein); animation: mtchatPunkt 1.2s infinite; }
.mtchat__tippt i:nth-child(2) { animation-delay: .2s; } .mtchat__tippt i:nth-child(3) { animation-delay: .4s; }
@keyframes mtchatPunkt { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .mtchat__tippt i { animation: none; opacity: .7; } }

.mtchat__karte { background: var(--mt-karte); border-radius: var(--f13); padding: var(--f13); box-shadow: 0 1px var(--f3) rgba(43, 37, 35, .08); display: flex; flex-direction: column; gap: var(--f8); margin: 0; }
.mtchat__karte p { margin: 0; }
.mtchat__willkommen { font-size: 15px; }
.mtchat__eingabefeld {
  width: 100%; min-height: 44px; padding: var(--f8) var(--f13); border: 1px solid var(--mt-linie); border-radius: var(--f8);
  font: inherit; font-size: 16px; color: var(--mt-text); background: #fff; resize: vertical;
}
textarea.mtchat__eingabefeld { min-height: 89px; }
.mtchat__eingabefeld:focus { outline: 2px solid var(--mt-wein-hell); outline-offset: 1px; border-color: var(--mt-wein-hell); }
.mtchat__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.mtchat__cta {
  min-height: 44px; padding: 0 var(--f21); border: 0; border-radius: var(--f8); background: var(--mt-wein); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; transition: background .15s;
}
.mtchat__cta:hover { background: var(--mt-wein-tief); }
.mtchat__cta:disabled { opacity: .55; cursor: wait; }
.mtchat__cta:focus-visible { outline: 3px solid var(--mt-wein-hell); outline-offset: 2px; }
.mtchat__fehler { color: var(--mt-fehler); font-size: 13px; }
.mtchat__klein { font-size: 12px; color: var(--mt-leise); }
.mtchat__klein a { color: var(--mt-leise); text-decoration: underline; }

.mtchat__fuss { border-top: 1px solid var(--mt-linie); background: var(--mt-karte); padding: var(--f8) var(--f13); }
.mtchat__eingabe { display: flex; gap: var(--f8); align-items: flex-end; }
.mtchat__eingabe textarea {
  flex: 1; min-height: 44px; max-height: 144px; resize: none; padding: var(--f8) var(--f13); border: 1px solid var(--mt-linie);
  border-radius: var(--f13); font: inherit; font-size: 16px; color: var(--mt-text); background: #fff;
}
.mtchat__eingabe textarea:focus { outline: 2px solid var(--mt-wein-hell); outline-offset: 1px; }
.mtchat__senden {
  flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--mt-wein); color: #fff; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.mtchat__senden:disabled, .mtchat__eingabe textarea:disabled { opacity: .5; cursor: default; }
.mtchat__leiste { display: flex; justify-content: space-between; align-items: center; gap: var(--f8); margin-top: var(--f5); flex-wrap: wrap; }
.mtchat__mensch {
  min-height: 34px; padding: 0 var(--f13); border: 1px solid var(--mt-wein); border-radius: var(--f34); background: transparent;
  color: var(--mt-wein); font: 600 13px/1 var(--mt-sans); cursor: pointer;
}
.mtchat__mensch:hover { background: var(--mt-wein); color: #fff; }
.mtchat__konto { font-size: 13px; color: var(--mt-wein); text-decoration: underline; min-height: 34px; display: inline-flex; align-items: center; }

.mtchat__knopf {
  position: fixed; right: var(--f21); bottom: var(--f89); z-index: 99991; width: var(--f55); height: var(--f55); border: 0; border-radius: 50%;
  background: var(--mt-wein); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0;
  box-shadow: 0 var(--f8) var(--f21) rgba(143, 47, 34, .38); transition: transform .15s, background .15s;
}
.mtchat__knopf:hover { background: var(--mt-wein-tief); transform: translateY(-2px); }
.mtchat__knopf:focus-visible { outline: 3px solid var(--mt-wein-hell); outline-offset: 3px; }
.mtchat__punkt { position: absolute; top: var(--f5); right: var(--f5); width: var(--f13); height: var(--f13); border-radius: 50%; background: var(--mt-gruen); border: 2px solid #fff; }
.mtchat__punkt[hidden] { display: none; }

/* Dunkle Darstellung */
.mtchat[data-thema="dunkel"] { --mt-grund: #1d1918; --mt-karte: #2a2422; --mt-text: #f1ebe8; --mt-leise: #c2b6b2; --mt-linie: #463c39; --mt-system: #3a312e; }
.mtchat[data-thema="dunkel"] .mtchat__eingabefeld, .mtchat[data-thema="dunkel"] .mtchat__eingabe textarea { background: #1d1918; color: var(--mt-text); }
.mtchat[data-thema="dunkel"] .mtchat__text a, .mtchat[data-thema="dunkel"] .mtchat__konto, .mtchat[data-thema="dunkel"] .mtchat__mensch { color: #f0a493; border-color: #f0a493; }
.mtchat[data-thema="dunkel"] .mtchat__mensch:hover { background: #f0a493; color: #1d1918; }
.mtchat[data-thema="dunkel"] .mtchat__zeile--kunde .mtchat__blase { background: var(--mt-wein-hell); }

/* Telefon: Fenster ueber die ganze Breite, Knopf ueber einer klebenden Kaufleiste */
@media (max-width: 520px) {
  .mtchat { right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%; height: 100%; height: 100dvh; min-height: 0; }
  .mtchat__fenster { border-radius: 0; }
  .mtchat__logo { width: 72px; }
  .mtchat__kopf { padding-left: var(--f8); gap: var(--f5); }
  .mtchat__kopf-text span { display: none; }
  .mtchat__knopf { right: var(--f13); bottom: calc(var(--f89) + var(--f5)); width: 52px; height: 52px; }
  html.mtchat-offen .mtchat__knopf { display: none; }
  html.mtchat-offen, html.mtchat-offen body { overflow: hidden; }
}

/* Meine Anfragen (Kundenkonto) */
.mtportal { font-family: var(--mt-sans); color: var(--mt-text); }
.mtportal__einleitung, .mtportal__hinweis { margin: 0 0 var(--f21); }
.mtportal__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--f8); }
.mtportal__liste a {
  display: grid; grid-template-columns: 1fr auto; gap: var(--f5) var(--f13); padding: var(--f13) var(--f21); border: 1px solid var(--mt-linie);
  border-radius: var(--f13); background: #fff; color: var(--mt-text); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.mtportal__liste a:hover { border-color: var(--mt-wein); box-shadow: 0 var(--f3) var(--f13) rgba(43, 37, 35, .08); }
.mtportal__betreff { font-weight: 600; overflow-wrap: anywhere; }
.mtportal__meta { grid-column: 1 / -1; font-size: 13px; color: var(--mt-leise); margin: 0 0 var(--f13); }
.mtportal__liste .mtportal__meta { margin: 0; }
.mtportal__status { align-self: start; font-size: 12px; font-weight: 700; padding: var(--f3) var(--f8); border-radius: var(--f21); background: var(--mt-system); white-space: nowrap; }
.mtportal__status--new { background: #fbe9e5; color: var(--mt-wein-tief); }
.mtportal__status--indeterminate { background: #fdf3dc; color: #6b4b00; }
.mtportal__status--done { background: #e3f2ea; color: var(--mt-gruen); }
.mtportal__kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--f13); }
.mtportal__kopf h3 { margin: 0 0 var(--f5); font-size: 21px; overflow-wrap: anywhere; }
.mtportal__zurueck { color: var(--mt-wein); }
.mtportal__verlauf { list-style: none; margin: 0 0 var(--f21); padding: 0; display: flex; flex-direction: column; gap: var(--f13); }
.mtportal__eintrag { padding: var(--f13) var(--f21); border-radius: var(--f13); background: var(--mt-grund); max-width: 89%; }
.mtportal__eintrag--kunde { align-self: flex-end; background: #fbe9e5; }
.mtportal__wer { font-size: 12px; color: var(--mt-leise); margin-bottom: var(--f5); font-weight: 600; }
.mtportal__wer time { font-weight: 400; }
.mtportal__text p { margin: 0 0 var(--f8); } .mtportal__text p:last-child { margin: 0; }
.mtportal__text a { color: var(--mt-wein); }
.mtportal__antwort { display: flex; flex-direction: column; gap: var(--f8); }
.mtportal__antwort textarea { width: 100%; padding: var(--f8) var(--f13); border: 1px solid var(--mt-linie); border-radius: var(--f8); font: inherit; font-size: 16px; }
.mtportal__antwort button { align-self: flex-start; }
.mtportal__fehler { color: var(--mt-fehler); margin: 0; }
@media (max-width: 520px) { .mtportal__eintrag { max-width: 100%; } .mtportal__liste a { padding: var(--f13); } }

/* 08.10.2026: solange das Cookie-Banner offen ist, verdeckt der Chat-Knopf keine Banner-Schaltflaeche (gemessen am Handy: Banner 549 bis 844 px, Knopf 698 bis 750 px) */
html:has(#cmplz-cookiebanner-container.cmplz-show) .mtchat__knopf { display: none; }
