.main_color .etdb-day a,
.main_color .etdb-day a:hover {
  color: #000;
}

/* ================= GRID ================= */
.etdb-grid {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 2rem;
  overflow: visible; /* wichtig für Hover-Expansion */
}

.etdb-grid-header {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.etdb-day {
  margin-top: 20px;
}

.etdb-track-header {
  text-align: center;
  padding: 10px;
  font-weight: 600;
  border-left: 1px solid #eee;
}

.etdb-grid-body {
  display: flex;
  flex-direction: column;
}

.etdb-row {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 8px;
  margin-bottom: 2px;
  position: relative; /* wichtig für absolute Hover-Position */
}

.etdb-row.fullwidth .etdb-event.fullwidth {
  background: #EA0017;
  color: #333;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.etdb-row.fullwidth a {
  grid-column: 1 / -1;
}

/* ================= EVENTS ================= */
.etdb-event.parallel {
  color: #333;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
  z-index: 1;
  margin: 0 2px 2px 0;
  display: flex;
  padding: 5px;
  flex-direction: column;
  border: 1px solid #ddd;
  /*justify-content: space-between;*/
}

.etdb-event.parallel > a {
  display: flex;
  flex-direction: column;
  /*justify-content: space-between;*/
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  cursor: pointer;
}

.etdb-event.parallel:hover {
  overflow: visible;
  height: auto !important;
  min-height: 100%;
  position: absolute;
  z-index: 100;
  left: 0;
  right: 0;
  transform: scale(1.05);
  transform-origin: center center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

.etdb-event.fullwidth:hover {
  overflow: visible;
  z-index: 100;
  transform: scale(1.05);
  transform-origin: center center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  max-width: 100%;
}

.etdb-event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  font-weight: 600;
  font-size: 12px;
  font-style: italic;
  margin-right: 5px;
}

@media (min-width: 768px) {
	.etdb-event-meta .meta_room {
	  display: none;
	}
}

@media (max-width: 769px) {
	.etdb-event-meta .meta_room {
	  display: contents;
	}
}

.etdb-event-title {
  font-weight: 500;
  font-size: 15px;
}

a .etdb-event-title {
  font-weight: 700;
}

a:hover .etdb-event-title {
  text-decoration: underline;
}

a .etdb-event-title::before {
  content: "↪ ";
  /*content: " ↩";*/
  /*content: "🔗 ";*/
}

.etdb-event-format {
  font-weight: 600;
  font-size: 12px;
  font-style: italic;
}

.etdb-event.placeholder {
  background: transparent;
  min-height: 100px;
}

.etdb-event-pseudo {
  background: transparent;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

/* ================= RESPONSIVE ================= */
/* ========== FINAL FIX: Mobile Layout + Herz sichtbar oben rechts ========== */
@media (max-width: 768px) {

  /* Header ausblenden */
  .etdb-grid-header {
    display: none !important;
  }

  /* Grid wird zu Spalten-Flow */
  .etdb-grid,
  .etdb-row,
  .etdb-grid-body {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  /* Events: volle Breite, nicht überlappen */
  .etdb-event,
  .etdb-event.parallel,
  .etdb-event.fullwidth {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
    margin: 0 0 1rem 0 !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 0.75rem 0.75rem 1.5rem 0.75rem !important;
    position: relative !important; /* ← WICHTIG fürs Herz oben rechts */
  }

  /* Parallele Events dürfen NICHT absolut sein */
  .etdb-event.parallel {
    position: relative !important;
  }

  /* Platzhalter ausblenden */
  .etdb-event-pseudo,
  .etdb-event.placeholder {
    display: none !important;
  }

  /* Herz-Button oben rechts sichtbar */
  .etdb-fav-btn {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    font-size: 20px !important;
    color: #888 !important;
    z-index: 10 !important;
  }

  .etdb-fav-btn.active {
    color: #e74c3c !important;
  }

  /* Etwas mehr Platz zwischen Events */
  .etdb-event + .etdb-event {
    margin-top: 1rem !important;
  }
}

/* ================= FILTERBAR ================= */
.etdb-filterbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 2px solid #e5e5e5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  padding: 0;
}

#etdb-filter-toggle {
  display: block;
  background: none;
  border: none;
  padding: 1rem;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: #0073aa;
  background-color: #f7f7f7;
}

#etdb-filter-toggle[aria-expanded="true"] {
  background-color: #e9f4fb;
  border-bottom: 1px solid #cde2f1;
}

.etdb-filter-content {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  width: 100%;
}

.etdb-filter-content.active {
  display: flex;
}

.etdb-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

@media (max-width: 768px) {
  .etdb-filter-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

.etdb-filter-label {
  font-weight: 600;
  color: #333;
}

.etdb-filterbar label {
  font-size: 0.9rem;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.etdb-filterbar input[type="checkbox"] {
  accent-color: #0073aa;
  width: 1rem;
  height: 1rem;
}

#etdb-reset-filters {
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s ease;
  float: right;
  width: 100%;
}

#etdb-reset-filters:hover {
  background: #005f8d;
}

/* ========== Format Buttons ========== */
.etdb-format-btn, .etdb-journey-btn {
  display: inline-block;
  background: var(--etdb-format-color, #888);
  color: #333;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 6px 6px 0;
  padding: 6px 25px;
  transition: all 0.15s ease;
}

.etdb-journey-btn {
  background: var(--etdb-journey-color, #ea0017);
}

/* Hover-Effekt */
.etdb-format-btn:hover, .etdb-journey-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Aktiver Button (Variante A, wie vorhin besprochen) */
.etdb-format-btn.etdb-active, .etdb-journey-btn.etdb-active {
  filter: grayscale(0%);
  opacity: 0.6;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.25);
  transform: scale(0.97);
  cursor: default;
}

.etdb-format-btn.etdb-active::before, .etdb-journey-btn.etdb-active::before {
  content: "✓";
  position: absolute;
  top: 4px;
  left: 6px;
  font-weight: bold;
  font-size: 14px;
  color: #000;
}

.etdb-format-buttons.is-sticky {
  position: fixed;
  top: 0;
  z-index: 9999;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  width: 100%;
  margin: 0 auto;
  max-width: 1030px;
}

@media only screen and (max-width: 768px) {
  .etdb-format-buttons.is-sticky {
    width: 85%;
    max-width: 85%;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    float: none;
  }
}

#etdb-reset-filters-link {
  margin-left: 8px;
  display: inline-block;
  text-decoration: underline;
  cursor: pointer;
}

/* ================= DAY NAV ================= */
.etdb-day-nav,
.etdb-format-buttons,
.etdb-filterbar {
  margin-bottom: 1em;
}

.etdb-day-link {
  background: #eee;
  border-radius: 6px;
  padding: 4px 8px;
  margin-right: 6px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.etdb-day-link:hover {
  background: #ddd;
}

/* --- FAVORITEN-STILE --- */


/* --- FAVORITEN-STILE --- */

/* Container relativ, damit das Herz (absolute) korrekt sitzt */
.etdb-event {
  position: relative;
}

/* Herz-Button */
.etdb-fav-btn {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  position: absolute;
  top: 2px;
  right: 2px;
  transition: color 0.2s ease, transform 0.1s ease;
  background-color: white;
  border-radius: 5px;
}
.etdb-fav-btn:hover { color: #e74c3c; }
.etdb-fav-btn:active { transform: scale(0.95); }
.etdb-fav-btn.active { color: #e74c3c; }
.etdb-fav-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Markierter Event sichtbar hervorheben */
.etdb-event.favorite {
  outline: 2px solid #e74c3c;
  outline-offset: 0px;
}

/* Optional: Export-/Filter-Buttons angleichen */
#etdb-show-favorites,
#etdb-export-favorites {
  background: #f5f5f5;
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
#etdb-export-favorites { background: #3498db; border-color: #2980b9; color: #fff; }
#etdb-show-favorites:hover { background: #eee; }
#etdb-export-favorites:hover { background: #2980b9; }



/* ========== FIX: "Nur Favoriten anzeigen" funktioniert auch auf Mobile ========== */

/* Wenn JS ein Element versteckt (display:none inline), soll das auch greifen */
.etdb-event[style*="display: none"],
.etdb-event-pseudo[style*="display: none"],
.etdb-row[style*="display: none"] {
  display: none !important;
}

/* --- Favoriten-Button (Herz-Stil) --- */
#etdb-show-favorites {
  display: inline-block;
  background: #e74c3c; /* Herzrot */
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 6px 6px 0;
  padding: 6px 25px;
  transition: all 0.25s ease;
}

/* Deutlicher Hover-Effekt */
#etdb-show-favorites:hover {
  background: #c0392b;        /* dunkleres Rot */
  box-shadow: 0 0 6px rgba(231, 76, 60, 0.6);
  transform: translateY(-1px);
}

/* Aktiver Zustand (gedrückt, wie bei .etdb-format-btn.etdb-active) */
#etdb-show-favorites.etdb-active {
  background: #c0392b; /* dunkler Rotton */
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.6), inset 0 2px 4px rgba(0,0,0,0.3);
  transform: scale(0.97);
  cursor: default;
}

/* Hover auf aktivem Zustand – leicht leuchtend */
#etdb-show-favorites.etdb-active:hover {
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.9), inset 0 2px 5px rgba(0,0,0,0.3);
}

/* Optional: Darkmode leicht angepasst */
@media (prefers-color-scheme: dark) {
  #etdb-show-favorites {
    background: #ff5b5b;
  }
  #etdb-show-favorites:hover {
    background: #ff3b3b;
  }
  #etdb-show-favorites.etdb-active {
    background: #e04040;
    border-color: rgba(255,255,255,0.4);
  }
}

.etdb-grid-header {
	display: grid;
	grid-template-columns: repeat(var(--cols), 1fr);
}

.etdb-grid-body {
	display: grid;
	grid-auto-rows: 20px;
	grid-template-columns: repeat(var(--cols), 1fr);
}

/* LIVE */

.etdb-event--current::before {
  content: "Now";
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 11px;
  font-weight: bold;
  background: #d00;
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
}
