.calendar {
  display: flex;
  flex-direction: column;
  margin: auto;
  background-color: #fff;
  padding: 20px;
  width: 80%;
  min-width: 250px;
  height: 80%;
  max-height: 600px;
  min-height: 500px;
  box-shadow: 0px 0px 20px #a9a9a9;

  --calendar-border-radius: 10px;
  border-radius: var(--calendar-border-radius);
}

.calendar .day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar .grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  box-shadow: 0px 0px 2px #a9a9a9;
  border-radius: var(--calendar-border-radius);
}

.calendar .centered-loader {
  margin: auto;
}
.calendar {
  display: flex;
  flex-direction: column;
  margin: auto;
  background-color: #fff;
  padding: 20px;
  width: 80%;
  min-width: 250px;
  height: 80%;
  max-height: 600px;
  min-height: 500px;
  box-shadow: 0px 0px 20px #a9a9a9;

  --calendar-border-radius: 10px;
  border-radius: var(--calendar-border-radius);
}

.calendar .day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar .grid {
  flex: 1;
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  border-radius: var(--calendar-border-radius);
}

.calendar .grid > a {
  flex-basis: calc(100%/7 - 1px);
}

.calendar .centered-loader {
  margin: auto;
}
Use flow grid for calendar container
Use flow grid for calendar container
