.calendar-mode-selection button:hover,
.calendar-direction-controls > button:enabled:hover,
a.polaroid:hover {
  cursor: pointer;
  text-decoration: underline;
}

.calendar-mode-selection button.selected,
form fieldset select,
div.sort-by-wrapper select,
form fieldset button,
form fieldset input {
  background-color: #fff;
}

form fieldset select,
div.sort-by-wrapper select,
form fieldset button,
form fieldset input {
  padding: 10px;
  border: 1px solid #000;
  border-radius: 10px;
}

a.polaroid > figure > figcaption,
.calendar-direction-controls {
  display: flex;
  align-items: center;
  justify-content: center;
}

form fieldset label,
a.polaroid > figure > figcaption > span,
div.sort-by-wrapper label {
  display: block;
}

.calendar-direction-controls > button,
form fieldset {
  border: none;
}

form fieldset select,
div.sort-by-wrapper select,
form fieldset button,
.calendar-direction-controls > button {
  background-color: transparent;
}

.calendar-direction-controls,
.calendar-result-wrapper {
  margin-top: 20px;
}

.calendar-mode-selection {
  margin-top: 50px;
}

.calendar-mode-selection button {
  padding: 10px 20px;
  background-color: #808080;
  border: 0;
  border-radius: 10px 10px 0 0;
  position: relative;
  bottom: 0;
}

.calendar-mode-selection button,
form fieldset select,
div.sort-by-wrapper select,
form fieldset button {
  color: #000;
}

.calendar-mode-selection button:first-of-type {
  margin-left: 20px;
}

.calendar-mode-selection button.selected {
  padding: 20px 30px 10px 30px;
}

form fieldset {
  border-radius: 10px;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

form fieldset:nth-of-type(2) {
  margin-left: 10px;
}

form fieldset select,
form fieldset input {
  margin-right: 10px;
}

form fieldset label {
  flex-basis: 100%;
}

body main div.box {
  margin: 0;
}

body main div.box h2 {
  margin-top: 0;
}

body main div.sort-by-wrapper {
  margin-top: 16px;
}

body footer h2 {
  margin-top: 50px;
}

.calendar-direction-controls > button {
  padding: 20px 50px;
  color: #fff;
}

.calendar-direction-controls > button:disabled {
  color: #808080;
}

.calendar-direction-controls > button,
.calendar-direction-controls > span {
  font-size: 25px;
}

.calendar-direction-controls > span {
  text-align: center;
}

a.polaroid {
  width: auto;
  text-decoration: none;
  margin-bottom: 20px;
}

a.polaroid > figure {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

a.polaroid > figure > figcaption {
  flex-direction: column;
}

@media (min-width: 500px) {
  a.polaroid {
    margin: 0;
  }

  .calendar-result-wrapper {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 850px) {
  .calendar-result-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}
