@font-face {
  font-family: "Liberation Sans";
  font-weight: 400;
  font-style: normal;
  src: url("font/LiberationSans-Regular.ttf") format("opentype");
}

@font-face {
  font-family: "Liberation Sans";
  font-weight: 400;
  font-style: italic;
  src: url("font/LiberationSans-Italic.ttf") format("opentype");
}

@font-face {
  font-family: "Liberation Sans";
  font-weight: 700;
  font-style: normal;
  src: url("font/LiberationSans-Bold.ttf") format("opentype");

}

@font-face {
  font-family: "Liberation Sans";
  font-weight: 700;
  font-style: italic;
  src: url("font/LiberationSans-BoldItalic.ttf") format("opentype");
}

body {
  background-color: #222222;
  color: #eeeeee;
  font-family: "Liberation Sans";
}

header {
  text-align: center;
}

img#logo {
  display: block;
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  width: 80px;
}

h1 {
  margin: 16px 0;
  text-align: center;
}

a, a:visited {
  color: #eeeeee;
  z-index: 2;
  position: relative;
}

ul#eventList { margin-top: 0; }

ul#eventList li {
  display: inline;
  text-align: center;
  padding: 10px;
  border: 1px solid;
  width: 105px;
}

ul#eventList li img {
  display: block;
  margin: auto;
}

ul#eventList, ul#dayList {
  list-style-type: none;
  display: inline-flex;
  justify-content: center;
  padding-left: 0;
}

ul#dayList li {
  cursor: pointer;
  display: inline;
  z-index: 2;
  border: 1px solid;
  padding: 10px;
  font-size: 20px;
}

ul#dayList li:hover {
  background-color: #333333;
}

ul#dayList li.current {
  color: #222222;
  background-color: #eeeeee;
  border-color: #eeeeee;
}

div.timetable {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid;
  margin: 0 auto;
  padding: 10px;
  width: 1260px;
}

.hidden, div.timetable.hidden {
  display: none;
}

div.event {
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
  padding: 10px;
  margin: 10px;
  height: 170px;
  width: 170px;
  transition: box-shadow 0.1s;
}

.talk { background-color: #195c94; }
.workshop { background-color: #a72a24; }
.misc { background-color: #e69f00; }

div.event.talk:hover {
  box-shadow: inset -5px -5px #0e3353;
  transition: box-shadow 0.1s;
}

div.event.workshop:hover {
  box-shadow: inset -5px -5px #681a16;
  transition: box-shadow 0.1s;
}

div.event.misc:hover {
  box-shadow: inset -5px -5px #9a6a00;
  transition: box-shadow 0.1s;
}

div.event strong {
  font-size: 15px;
}

span.time {
  font-size: 24px;
  font-weight: bold;
}

span.author {
  flex-grow: 1;
}

div.event div {
  display: flex;
}

ul#eventList li img, div.event img {
  width: 32px;
}

span.place {
  align-self: flex-end;
  font-weight: bold;
  margin-left: auto;
}

div#overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  height: 100%;
  width: 100%;
}

div#modal {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 3;
  background-color: #eeeeee;
  color: #222222;
  height: 0;
  width: 100%;
  max-height: 0;
  overflow-y: scroll;
  transition: all 0.5s ease;
}

div#modal.upfront {
  height: 40%;
  max-height: 40%;
  transition: all 0.5s ease;
}

div#modal div#modalContent {
  margin: 0 5%;
}

div#modal span {
  display: block;
  font-size: 18px;
  text-align: center;
  margin-bottom: 16px;
}

div#modal div.description {
  margin: 0;
  text-align: center;
}

div#modal div.description ul {
  padding-left: 0;
}

div#modal div.description a {
  color: #222222;
}

div#modal button {
  display: block;
  background-color: #eeeeee;
  color: #222222;
  border: 1px solid #222222;
  font-family: "Liberation Sans";
  font-size: 18px;
  height: 40px;
  width: 120px;
  margin: 16px auto;
  cursor: pointer;
}

footer {
  margin: 16px;
  text-align: center;
}

/* some values are from the Bootstrap project */

/* we must specify pixel sizes in order to
   avoid blank spaces on the right side
   (because i suck at flexboxes) */
@media only screen and (max-width: 1300px) {
  div.timetable { width: 1050px; }
}

@media only screen and (max-width: 1100px) {
  div.timetable { width: 840px; }
}

@media only screen and (max-width: 960px) {
  div.event {
    flex-grow: 1;
    flex-basis: 40%;
    width: auto;
  }
}

@media only screen and (max-width: 880px) {
  div.timetable { width: auto; }
}

@media only screen and (max-width: 720px) {
  div#modal h1 {
    font-size: 25px;
    margin-bottom: 5px;
  }

  div#modal span {
    font-size: 15px;
    margin-bottom: 5px;
  }

  div#modal.upfront {
    height: 50%;
    max-height: 50%;
  }
}

@media only screen and (max-width: 540px) {
  header h1 { font-size: 25px; }
  ul#dayList li { font-size: 17px; }

  ul#eventList li {
    font-size: 13px;
    width: 90px;
  }

  div#modal.upfront {
    height: 60%;
    max-height: 60%;
  }
}
