/* BOOKINGS */
#bookings {
  margin: 40px 0;
  background: #ffffff8a;
  color: #1c311d;
}
#bookings h3 {
  text-align: center;
  background: #ffffff8a;
  padding: 10px 0;
}
#bookings table {
  margin: 0 auto;
  text-align: right;
}
#bookings table tr {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid black;
}
#bookings table th {
  display: none;
}
#bookings table td {
  display: block;
  padding: 0 7px;
}
#bookings table td::before {
  float: left;
  font-weight: bold;
}
#bookings table td:nth-child(1)::before {
  content: "Date: ";
}
#bookings table td:nth-child(2)::before {
  content: "Time: ";
}
#bookings table td:nth-child(3)::before {
  content: "Game: ";
}
#bookings table td:nth-child(4)::before {
  content: "Players: ";
}
#bookings table td:nth-child(5) {
  text-align: center;
}
#bookings table td:nth-child(5)::before {
  content: "";
}
#bookings table td:nth-child(6)::before {
  content: "Cancel: ";
}
@media all and (min-width: 600px) {
  #bookings table tr {
    display: table-row;
  }
  #bookings table th, #bookings table td {
    display: table-cell;
    text-align: center;
  }
  #bookings table td::before {
    display: none;
  }
}




h1, h2, p.instructions {
  text-align: center;
  margin-bottom: 30px;
  font-family: 'Baskerville', serif;
}
#cancelForm {
  text-align: center;
}
#cancelForm table {
  margin-bottom: 15px;
  border-collapse: collapse;
}
#cancelForm table td, #cancelForm table th {
    padding: 5px;
}
#cancelForm td:last-child, #cancelForm th:last-child {
  color: red;
}
#cancelForm table button {
  color: red;
  font-weight: bold;
  background-image: linear-gradient(145deg, white, #aaa);
  border: 1px solid #888;
  border-radius: 3px;
}
#cancelForm table button:hover {
  background-image: linear-gradient(145deg, #ccc, #888);
}
#cancelForm table tbody tr:nth-child(4n), #cancelForm table tbody tr:nth-child(4n-1), #cancelForm thead tr {
  background-color: #ccc;
}
#reservationList h4 {
  margin: 15px 0;
  color: black;
  font-family: 'Baskerville', serif;
  font-size: 1.2em;
}

h2 {
  font-size: 1.3em;
}
p.instructions {
  font-size: 1.1em;
}
p.instructions a {
  text-decoration: underline;
  font-family: 'Baskerville';
  font-weight: bold;
}


#bookingCalendar {
  margin: 0 auto;
  width: 95vw;
  max-width: 800px;
}

.monthDiv:not(.displayed) {
  display: none;
}

.monthHeader {
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: center;
}

.monthHeader div {
  display: flex;
  justify-content: center;
}

.monthHeader h3 {
  min-width: 190px;
  text-align: center;
}

.monthHeader button {
  color: white;
  border-radius: 50%;
  background: black;
  border: none;
  display: block;
  padding: 0;
  cursor: pointer;
}
.monthHeader button:hover {
  color: rgb(248, 238, 180);
}
.monthHeader button:disabled {
  color: #999;
  background-color: #555;
}

.monthHeader svg {
  display: block;
}

.weekdayDiv {
  text-align: center;
}

.dayDiv {
  height: 110px;
  text-align: center;
  border: 1px solid #b7b7b7;
  background-color: white;
  color: black;
  padding: 2px;
}

.dayDiv.greyDay {
  display: none;
  background-color: grey;
  color: white;
}

.dayDiv.lightgreyDay {
  display: none;
  background-color: lightgrey;
}

.dayDiv.today {
  background-color: rgb(255 239 184);
  font-weight: bold;
}

.dayDiv button {
  margin: 0 auto;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #666;
  background: white;
  transition: background-color 0.5s;
}
.dayDiv.ownBookings button {
  background: #6df0ff;
}
.dayDiv:hover button {
  background: gold;
}
.ordinalSuffix {
  font-size: 0.8em;
  position: relative;
  bottom: 0.3em;
  left: 0.04em;
}


.weekdaysHeader {
  font-variant: small-caps;
}
.weekday-initial, .weekday-short, .weekday-full {
  display: none;
}

@media all and (min-width: 500px) {
  .dayContainer, .weekdaysHeader {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  }

  .weekday-initial, .weekday-short {
    display: inline;
  }

  .dayDiv.greyDay, .dayDiv.lightgreyDay {
    display: block;
  }
  .weekdayName {
    display: none;
  }
  .ordinalSuffix {
    display: none;
  }
}
@media all and (min-width: 800px) {
  .weekday-full {
    display: inline;
  }
}



#bookingModal, #cancelModal {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #000a;
  z-index: 1000;
  display: none;
  overflow-y: auto;
}

#bookingModal.displayed, #cancelModal.displayed {
  display: flex;
  justify-content: center;
  align-items: center;
}

#bookingForm, #cancelForm {
  position: relative;
  z-index: 1001; /* for detecting clicks on #bookingModal */
  display: flex;
  flex-direction: column;
  background-color: white;
  padding: 15px;
  border-radius: 10px;
  border: 3px solid #333;
  max-width: 500px;
}

#bookingForm div, #cancelForm .bookingHeader div, #cancelForm .bookingHeader h3 {
  margin: 20px 0;
}
div.bookingHeader {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}
div.bookingCancelContainer {
  margin: 0;
  text-align: right;
}
#bookingCancel, #cancelClose {
  background-color: transparent;
  color: #444;
  border-radius: 50%;
  padding: 5px;
  box-sizing: content-box;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
}
#bookingCancel:hover, #cancelClose:hover {
  background-color: #e0e0e0;
  border: 1px solid #999;
  color: red;
}
div.titleContainer {
  margin: 0;
}

#bookingForm h3, #bookingForm .formInstructions, #cancelForm h3 {
  font-family: 'Baskerville', serif;
  color: #444;
}

#bookingForm label, #bookingForm select, #bookingForm textarea {
  display: block;
}


#bookingDate {
  font-size: 1.2em;
}
#bookingGame {
  max-width: 300px;
}

#bookingMessage {
  width: 300px;
  height: 100px;
}


#bookingForm div.form-submit {
  text-align: center;
  margin-bottom: 0;
}
#bookingSend, #newBookingButton {
  padding: 10px;
  background-image: linear-gradient(#fff3d7, #fff0b4);
  border-radius: 5px;
  border: 2px solid #222;
  box-shadow: 1px 1px 2px 1px #aaa;
  font-weight: bold;
  color: #222;
}
#bookingSend:hover, #newBookingButton:hover {
  background-image: linear-gradient(#ffedc0, #ffeb98);
}



.slotsDiv {
  width: 100%;
  display: flex;
}
.slotsDiv>div {
  flex: 1;
}
.reservedSlot {
  background-color: grey;
  border: 1px solid black;
  height: 10px;
}
.reservedSlot.own {
  background-color: #46acff;
}
.reservedSlot.own.verified {
  background-color: orange;
}
.firstSlot .reservedSlot.double {
  border-right-width: 0;
}
.secondSlot .reservedSlot.double {
  border-left-width: 0;
}

.unavailable-warning {
  color: red;
  display: none;
}
input:disabled + .unavailable-warning {
  display: inline;
}

.smallcaps {
  font-variant: small-caps;
}


#endTime:invalid {
  background-color: pink;
}
#endTime option {
  background-color: white;
}


.warningMessage, .warningMessage a {
  animation: warningMessage 0.6s;
  animation-iteration-count: infinite;
}
@keyframes warningMessage {
  0% {color: white}
  40% {color: rgb(255, 141, 121)}
  60% {color: white}
}