/*
  CI von Effizienzmaster fuer Cal.diy (termin.effizienzmaster.de), Fassung "Website".
  Vorlage ist die neue Website (Marcus 22.11.2026: "das ist unsere Mastervorlage"): Grund in
  tiefem Petrol mit Lichtflecken Tuerkis und Gold, Schrift Geist, Ueberschriften und Hervorhebungen
  im Verlauf Tuerkis nach Gold (220 %, 9 s, wie .wort-marke-verlauf), Hauptknoepfe als Pille im
  Verlauf, Schalter in Gold. Werte aus src/styles/em.css der Website.
  Wird vom vorgeschalteten nginx in jede HTML-Seite eingesetzt, Cal.diy bleibt unveraendert.
  Nichts wird von fremden Adressen geladen.
*/

@font-face {
  font-family: "Geist Variabel";
  src: url("/em-ci/geist-sans-variabel.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html:root,
html.light,
html.dark,
html .light,
html .dark {
  --em-verlauf: linear-gradient(95deg, #4ec8c3 0%, #d4b863 100%);

  --cal-bg: #0f2a30;
  --cal-bg-subtle: #0a1c22;
  --cal-bg-muted: #133038;
  --cal-bg-emphasis: #1d404c;
  --cal-bg-inverted: #eaf2f1;
  --cal-bg-primary: #4ec8c3;
  --cal-bg-primary-emphasis: #6fd4cf;
  --cal-bg-primary-muted: #133038;
  --cal-bg-brand: #4ec8c3;
  --cal-bg-brand-emphasis: #6fd4cf;
  --cal-bg-brand-muted: #133038;

  --cal-border: #24474f;
  --cal-border-emphasis: #3f6b73;
  --cal-border-subtle: #1b3a41;
  --cal-border-muted: #163339;
  --cal-border-booker: #1f4048;

  --cal-text-emphasis: #eaf2f1;
  --cal-text: #d3e3e1;
  --cal-text-subtle: #a8bfbe;
  --cal-text-muted: #86a3a2;
  --cal-text-inverted: #06191a;

  --cal-brand: #4ec8c3 !important;
  --cal-brand-emphasis: #6fd4cf !important;
  --cal-brand-text: #06191a !important;

  --font-sans: "Geist Variabel", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cal: "Geist Variabel", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

html,
body {
  background-color: #0a1c22 !important;
  color: #d3e3e1;
}
body,
body * {
  font-family: "Geist Variabel", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body {
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(78, 200, 195, 0.12), transparent 60%),
    radial-gradient(90% 60% at 90% 10%, rgba(212, 184, 99, 0.07), transparent 65%),
    radial-gradient(70% 55% at 0% 100%, rgba(78, 200, 195, 0.06), transparent 70%) !important;
  background-attachment: fixed !important;
}

/* Kopf nur auf den oeffentlichen Seiten (Buchung, Profil, Anmeldung). Das Dashboard hat eine
   Navigation und behaelt seinen eigenen Aufbau. */
body:not(:has(nav)) {
  padding-top: 92px;
}
body:not(:has(nav))::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 80px;
  background: linear-gradient(180deg, #06191a 0%, #0a2024 100%);
  z-index: 40;
  pointer-events: none;
}
/* Logo im Kopf: Zahnrad als Bild (dreht), Wortmarke als echter Text in der Laufschrift der
   Website (.leiste-wortmarke: Geist 600, Laufweite 0,17 em, Verlauf 220 %, 9 s hin und zurueck). */
html:not(:has(nav))::before {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% - 132px);
  transform: translateX(-50%);
  width: 72px;
  height: 50px;
  background: url("/em-ci/em-zahnrad.svg") center / contain no-repeat;
  z-index: 41;
  pointer-events: none;
}
html:not(:has(nav))::after {
  content: "EFFIZIENZMASTER";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 80px;
  line-height: 80px;
  padding-left: 82px;
  font-family: "Geist Variabel", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.17em;
  white-space: nowrap;
  color: #4ec8c3;
  background: var(--em-verlauf) 0 0 / 220% 100% no-repeat content-box;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: em-verlauf-lauf 9s ease-in-out infinite alternate;
  z-index: 41;
  pointer-events: none;
}
body:not(:has(nav))::after {
  content: "";
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(78, 200, 195, 0) 0%, #4ec8c3 25%, #d4b863 75%, rgba(212, 184, 99, 0) 100%);
  box-shadow: 0 0 14px 1px rgba(78, 200, 195, 0.45);
  z-index: 40;
  pointer-events: none;
}
body:not(:has(nav)) .fixed.top-4 {
  top: 96px !important;
}

/* Verlauf wie "Das Besondere" und die Ueberschriften der Website: Tuerkis nach Gold, laeuft.
   Die Schriftfarbe bleibt echt (fuer Vorleser und Kontrastmessung), nur die Fuellung ist der
   Verlauf. */
h1,
[data-testid="event-title"],
[data-testid="name-title"],
.text-center > h1.font-cal::after {
  font-family: "Geist Variabel", system-ui, sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: #4ec8c3 !important;
  background: var(--em-verlauf);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: em-verlauf-lauf 9s ease-in-out infinite alternate;
}
@keyframes em-verlauf-lauf {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

/* Logo bei jedem Ereignistyp (neben Bild und Name) und ueber dem Profil. */
[data-testid="event-meta"]::before,
[data-testid="name-title"]::before {
  content: "";
  display: block;
  width: 190px;
  height: 38px;
  margin-bottom: 14px;
  background: url("/em-ci/em-kopf.svg") left center / contain no-repeat;
  -webkit-text-fill-color: initial;
}
[data-testid="name-title"]::before {
  margin: 0 0 14px;
}

/* Dein Bild groesser, mit Ring im Verlauf wie das Bild auf der Startseite der Website. */
html:not(:has(nav)) [data-testid="avatar-href"],
html:not(:has(nav)) [data-testid="avatar"],
html:not(:has(nav)) .rounded-xl.border-subtle.bg-default span.aspect-square:has(> img) {
  width: 84px !important;
  height: 84px !important;
  min-width: 84px !important;
}
html:not(:has(nav)) .rounded-xl.border-subtle.bg-default span.aspect-square:has(> img) {
  width: 128px !important;
  height: 128px !important;
  min-width: 128px !important;
}
html:not(:has(nav)) [data-testid="avatar"],
html:not(:has(nav)) .rounded-xl.border-subtle.bg-default span.aspect-square:has(> img) {
  padding: 3px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #4ec8c3 0%, #d4b863 100%) !important;
  box-shadow: 0 0 28px rgba(78, 200, 195, 0.30) !important;
}
html:not(:has(nav)) [data-testid="avatar"] img,
html:not(:has(nav)) .rounded-xl.border-subtle.bg-default span.aspect-square > img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 999px !important;
  object-fit: cover;
}

/* Interne Ansicht: Menuepunkte in Weiss (Marcus 22.11., 20:20), Seitentitel im Verlauf. */
aside nav a > span,
aside nav button > span {
  color: #eaf2f1 !important;
}
h3.font-cal.text-emphasis {
  color: #4ec8c3;
  background: var(--em-verlauf);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: em-verlauf-lauf 9s ease-in-out infinite alternate;
  font-weight: 600;
}

/* Glas: Buchungsfenster und die Karten auf dem Profil liegen als Milchglas ueber den Lichtflecken.
   Die Unschaerfe sitzt auf einer eigenen Ebene (::before). Laege backdrop-filter auf dem Fenster
   selbst, wuerden fest positionierte Teile darin (Ansichtswahl oben rechts) am Fenster haengen.
   Nur auf den oeffentlichen Seiten: Im Dashboard legte sich die Unschaerfe ueber den Seitenkopf. */
html:not(:has(nav)) [data-testid="booker-container"],
html:not(:has(nav)) [data-testid="event-types"],
html:not(:has(nav)) main .rounded-xl.border-subtle.bg-default,
html:not(:has(nav)) .rounded-xl.border-subtle.bg-default {
  position: relative;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 45%, rgba(78, 200, 195, 0.05) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top-color: rgba(255, 255, 255, 0.24) !important;
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(78, 200, 195, 0.05) !important;
}
html:not(:has(nav)) [data-testid="booker-container"]::before,
html:not(:has(nav)) [data-testid="event-types"]::before,
html:not(:has(nav)) .rounded-xl.border-subtle.bg-default::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  z-index: -1;
  pointer-events: none;
}
html:not(:has(nav)) [data-testid="booker-container"] .bg-default,
html:not(:has(nav)) [data-testid="booker-container"] .bg-muted,
html:not(:has(nav)) [data-testid="booker-container"] .bg-subtle,
html:not(:has(nav)) [data-testid="event-type-link"] {
  background-color: transparent !important;
}
html:not(:has(nav)) [data-testid="event-type-link"]:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}
html:not(:has(nav)) [data-testid="event-type-link"] {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Mehr Licht hinter dem Glas, damit die Unschaerfe sichtbar wird. */
body {
  background-image:
    radial-gradient(42rem 30rem at 22% 30%, rgba(78, 200, 195, 0.16), transparent 70%),
    radial-gradient(36rem 28rem at 80% 62%, rgba(212, 184, 99, 0.12), transparent 70%),
    radial-gradient(120% 80% at 50% -10%, rgba(78, 200, 195, 0.10), transparent 60%) !important;
}

/* Freie Tage: Tuerkis-Schimmer, gewaehlter Tag im Verlauf. */
[data-testid="day"]:not([disabled]) {
  background-color: rgba(78, 200, 195, 0.12);
  color: #eaf2f1;
  font-weight: 600;
}
[data-testid="day"]:not([disabled]):hover {
  background-color: rgba(78, 200, 195, 0.22);
}
[data-testid="day"][data-active="true"],
[data-testid="day"][aria-pressed="true"] {
  background: var(--em-verlauf) !important;
  color: #06191a !important;
}

/* Uhrzeiten: Rand in Tuerkis beim Zeigen. */
[data-testid="time"] {
  border-color: rgba(78, 200, 195, 0.25) !important;
  background-color: rgba(10, 28, 34, 0.4) !important;
}
[data-testid="time"]:hover {
  border-color: #4ec8c3 !important;
}

/* Hauptknoepfe: Pille im Verlauf mit Schimmer, wie "Erstgespraech" auf der Website. */
[data-testid="confirm-book-button"],
[data-testid="login-form"] button[type="submit"],
button[class*="bg-brand-default"]:not([role="switch"]),
a[class*="bg-brand-default"] {
  background: var(--em-verlauf) !important;
  background-size: 160% 100% !important;
  color: #06191a !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 22px rgba(78, 200, 195, 0.22) !important;
  transition: background-position 0.6s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
[data-testid="confirm-book-button"]:hover,
[data-testid="login-form"] button[type="submit"]:hover,
button[class*="bg-brand-default"]:not([role="switch"]):hover,
a[class*="bg-brand-default"]:hover {
  background-position: 100% 50% !important;
  box-shadow: 0 12px 30px rgba(78, 200, 195, 0.32) !important;
  transform: translateY(-1px);
}

/* Schalter (ein und aus) in Gold. */
button[role="switch"][data-state="checked"] {
  background-color: #d4b863 !important;
}
button[role="switch"][data-state="checked"] > span {
  background-color: #06191a !important;
}

/* Beschriftungen und Knoepfe in Feldern lesbar auf dunklem Grund. */
label,
[data-testid="login-form"] label {
  color: #d3e3e1 !important;
}
[data-testid="login-form"] button[type="button"],
[data-testid="login-form"] button[type="button"] *,
[data-testid="login-form"] *:has(> input[type="password"]) > :not(input),
[data-testid="login-form"] *:has(> input[type="password"]) > :not(input) * {
  background-color: transparent !important;
  color: #a8bfbe !important;
}

/* Eingabefelder auf dunklem Grund. */
input:not([type="radio"]):not([type="checkbox"]),
textarea,
select {
  background-color: #0a1c22 !important;
  border-color: #24474f !important;
  color: #eaf2f1 !important;
}
input:focus,
textarea:focus {
  border-color: #4ec8c3 !important;
  box-shadow: 0 0 0 3px rgba(78, 200, 195, 0.18) !important;
}

/* Anmeldeseite: Name statt "Cal.diy", ohne das graue Kachelmuster. */
.text-center > h1.font-cal {
  font-size: 0 !important;
  background: none !important;
  animation: none !important;
}
.text-center > h1.font-cal::after {
  content: "Effizienzmaster Termine";
  display: inline-block;
  font-size: 1.6rem;
}
svg:has(#gridShadow) {
  display: none !important;
}

@media (max-width: 640px) {
  body:not(:has(nav)) { padding-top: 72px; }
  body:not(:has(nav))::before { height: 62px; }
  html:not(:has(nav))::before { top: 13px; left: calc(50% - 92px); width: 52px; height: 36px; }
  html:not(:has(nav))::after { height: 62px; line-height: 62px; font-size: 15px; padding-left: 60px; }
  body:not(:has(nav))::after { top: 62px; }
  body:not(:has(nav)) .fixed.top-4 { top: 74px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html::after,
  aside nav a > span,
  aside nav button > span,
  h3.font-cal.text-emphasis,
  h1,
  [data-testid="event-title"],
  [data-testid="name-title"],
  .text-center > h1.font-cal::after { animation: none !important; }
}
