.mtd-calendar-public-navigation {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mtd-calendar-view-switch {
  display: flex;
  flex: 0 0 100%;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.mtd-calendar-view-button {
  min-height: 2.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  background: hsl(var(--background));
  padding: 0.55rem 0.9rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 700;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.mtd-calendar-view-button:hover {
  border-color: hsl(var(--primary));
  color: hsl(var(--foreground));
}

.mtd-calendar-view-button.is-active {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.mtd-calendar-text-view {
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--card));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.mtd-calendar-text-group {
  padding: 1.6rem 1.25rem;
}

.mtd-calendar-text-group + .mtd-calendar-text-group {
  border-top: 1px solid hsl(var(--border));
}

.mtd-calendar-text-date {
  margin: 0 0 1rem;
  color: hsl(var(--foreground));
  font-family: Rajdhani, sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.045em;
}

.mtd-calendar-text-events {
  display: grid;
  gap: 0.75rem;
}

.mtd-calendar-text-event {
  border-left: 4px solid var(--mtd-event-color, #1976d2);
  border-radius: 0.4rem;
  background: hsl(var(--background) / 0.58);
  padding: 0.85rem 1rem;
  font-family: Inter, sans-serif;
}

.mtd-calendar-text-series,
.mtd-calendar-text-details,
.mtd-calendar-text-notes {
  margin: 0;
}

.mtd-calendar-text-series {
  color: hsl(var(--foreground));
  font-size: 1rem;
  font-weight: 700;
}

.mtd-calendar-text-details {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 0.3rem 1.25rem;
  margin-top: 0.3rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
}

.mtd-calendar-text-circuit::before {
  content: "Strecke: ";
  color: hsl(var(--foreground) / 0.72);
  font-weight: 600;
}

.mtd-calendar-text-round::before {
  content: "Runde: ";
  color: hsl(var(--foreground) / 0.72);
  font-weight: 600;
}

.mtd-calendar-text-finale-note {
  color: #ef4444;
  font-weight: 700;
}

.mtd-calendar-text-notes {
  margin-top: 0.55rem;
  white-space: pre-line;
  color: hsl(var(--muted-foreground));
  font-size: 0.83rem;
  line-height: 1.55;
}

.mtd-calendar-text-message {
  margin: 0;
  padding: 2rem 1.25rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
}

[hidden].mtd-calendar-original-view,
[hidden].mtd-calendar-text-view,
[data-mtd-text-hidden="true"] {
  display: none !important;
}

@media (min-width: 768px) {
  .mtd-calendar-text-group {
    padding: 2rem 2.25rem;
  }

  .mtd-calendar-text-date {
    font-size: 1.8rem;
  }

  .mtd-calendar-text-events {
    gap: 0.85rem;
  }
}

@media (max-width: 767px) {
  .mtd-calendar-public-navigation {
    width: 100%;
    justify-content: flex-start;
  }

  .mtd-calendar-view-switch {
    justify-content: flex-start;
  }

  .mtd-calendar-view-button {
    flex: 1 1 0;
    padding-inline: 0.55rem;
  }

  .mtd-calendar-text-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}
