:root{
  --tueh-bg:#ffffff;
  --tueh-fg:#1d2327;
  --tueh-border:#d0d7de;
  --tueh-accent-open:#16a34a;
  --tueh-accent-closed:#b91c1c;
}
.tueh-card{border:1px solid var(--tueh-border);background:var(--tueh-bg);color:var(--tueh-fg);border-radius:14px;padding:14px 16px;box-shadow:0 2px 6px rgba(0,0,0,.04);max-width:560px;line-height:1.35;font-size:16px}
.tueh-card .tueh-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.tueh-card .tueh-badge{display:inline-block;font-weight:700;border-radius:999px;padding:6px 12px;border:1px solid var(--tueh-border)}
.tueh-card.open .tueh-badge{color:var(--tueh-accent-open);border-color:var(--tueh-accent-open)}
.tueh-card.closed .tueh-badge{color:var(--tueh-accent-closed);border-color:var(--tueh-accent-closed)}
.tueh-card .tueh-event{margin:6px 0 2px 0;font-style:italic}
.tueh-card .tueh-next{margin-top:6px}
.tueh-card .tueh-next .tueh-next-label{opacity:.8;margin-right:4px}
.tueh-card .tueh-date{margin-top:4px;opacity:.7;font-size:.95em}
.tueh-card.variant-compact{padding:10px 12px;font-size:15px}
.tueh-card.variant-compact .tueh-badge{padding:4px 10px}
/* Themes */
.tueh-card.theme-dark{--tueh-bg:#0b1220;--tueh-fg:#e5e7eb;--tueh-border:#293548}
.tueh-card.theme-light{--tueh-bg:#ffffff;--tueh-fg:#111827;--tueh-border:#e5e7eb}

.tueh-floating{position:fixed;z-index:9999}
.tueh-floating .tueh-close{position:absolute;top:-10px;right:-10px;border:0;background:#111;color:#fff;width:24px;height:24px;border-radius:999px;cursor:pointer;line-height:24px;text-align:center}
@media (max-width: 640px){
  .tueh-floating{left:12px !important; right:12px !important; bottom:12px !important; top:auto !important}
  .tueh-floating .tueh-card{max-width:none;width:100%}
}


/* Floating glass style override */
.tueh-floating { z-index: 9999; border-radius: 20px; }
.tueh-floating .tueh-card{
  background: rgba(11, 11, 11, 0.65);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 18px 20px;
  max-width: 520px;
}
.tueh-floating .tueh-card .tueh-head { justify-content: center; margin-bottom: 8px; }
.tueh-floating .tueh-card .tueh-badge{
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
  letter-spacing: .2px;
}
.tueh-floating .tueh-card.open .tueh-badge{ color: #4ade80; border-color: rgba(74,222,128,.5); }
.tueh-floating .tueh-card.closed .tueh-badge{ color: #f87171; border-color: rgba(248,113,113,.45); }
.tueh-floating .tueh-card .tueh-event{ opacity:.95; font-weight:600; text-align:center; }
.tueh-floating .tueh-card .tueh-next{ text-align:center; }
.tueh-floating .tueh-card .tueh-next .tueh-next-label{ opacity:.85; }
.tueh-floating .tueh-card .tueh-date{ text-align:center; }
.tueh-floating .tueh-close{
  position:absolute; top:-10px; right:-10px;
  width:28px; height:28px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.7);
  color:#fff; line-height:26px; text-align:center; font-size:18px;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.tueh-floating .tueh-close:hover{ background: rgba(0,0,0,0.85); }

/* === TUEH Theme: winterdorf (transparent bg, white text) === */
.tueh-card.theme-winterdorf{
  --tueh-bg: transparent;
  --tueh-fg: #ffffff;
  --tueh-border: rgba(255,255,255,.35);
  /* keep the default accents for open/closed for clarity */
  /* --tueh-accent-open and --tueh-accent-closed inherit from :root */
  box-shadow: none;
}
.tueh-card.theme-winterdorf .tueh-date{ opacity: .9; }
/* Floating variant also fully transparent */
.tueh-floating .tueh-card.theme-winterdorf{ --tueh-bg: transparent; box-shadow: none; }

/* Center content for winterdorf theme */
.tueh-card.theme-winterdorf{
  text-align: center;
}
.tueh-card.theme-winterdorf .tueh-header,
.tueh-card.theme-winterdorf .tueh-body,
.tueh-card.theme-winterdorf .tueh-footer{
  text-align: center;
  justify-content: center;
  align-items: center;
}
.tueh-card.theme-winterdorf .tueh-actions,
.tueh-card.theme-winterdorf .tueh-status,
.tueh-card.theme-winterdorf .tueh-date{
  text-align: center;
}

/* Center the status badge ("Heute geöffnet/geschlossen") for winterdorf */
.tueh-card.theme-winterdorf .tueh-head{
  justify-content: center;
}
.tueh-card.theme-winterdorf .tueh-badge{
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
/* Make sure compact variant is centered as well */
.tueh-card.theme-winterdorf.variant-compact .tueh-head{
  justify-content: center;
}

/* Fade-on-scroll behavior for bottom-center floating */
.tueh-fade-on-scroll{
  transition: opacity .28s ease, transform .28s ease;
}
.tueh-fade-on-scroll.tueh-hide{
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
@media (max-width: 640px){
  /* keep usability on mobile: don't fully hide */
  .tueh-fade-on-scroll.tueh-hide{ opacity:.2; pointer-events:auto; }
}

/* Ensure true center for bc/tc on mobile by overriding full-width rules */
@media (max-width: 640px){
  .tueh-corner-bc,
  .tueh-corner-tc{
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
  .tueh-corner-bc .tueh-card,
  .tueh-corner-tc .tueh-card{
    width: var(--tueh-mobile-width, 90vw) !important;
    max-width: 95vw !important;
  }
}
