/*************************
 * GRID SCHEDULE LAYOUT
 *************************/
@media screen and (min-width:700px) {
  .schedule {
    display: grid;
    grid-gap: 1em;
    grid-template-rows:
      [days] auto
      [time-0900] 2fr
      [time-0920] 1fr
      [time-0930] 1fr
      [time-0940] 0.5fr
      [time-0945] 1.5fr
      [time-1000] 1.5fr
      [time-1015] 0.5fr
      [time-1020] 1fr
      [time-1030] 1fr
      [time-1040] 1fr
      [time-1100] 2fr
      [time-1115] 1.5fr
      [time-1130] 1fr
      [time-1140] 2fr
      [time-1200] 2fr
      [time-1220] 1fr
      [time-1230] 1fr
      [time-1240] 2fr
      [time-1300] 3fr
      [time-1330] 2fr
      [time-1350] 1fr
      [time-1400] 1fr
      [time-1410] 1fr
      [time-1420] 1fr
      [time-1430] 1fr
      [time-1440] 1fr
      [time-1450] 1fr
      [time-1500] 1fr
      [time-1510] 1fr
      [time-1520] 1fr
      [time-1530] 1.5fr
      [time-1545] 1.5fr
      [time-1600] 1.5fr
      [time-1615] 0.5fr
      [time-1620] 1fr
      [time-1630] 3fr
      [time-1700] 3fr
      [time-1730] 1fr
      [time-1830] 1fr
      [time-2130] 1fr;
      /* Note 1:
      Use 24hr time for gridline names for simplicity

      Note 2: Use "auto" instead of "1fr" for a more compact schedule where height of a slot is not proportional to the session length. Implementing a "compact" shortcode attribute might make sense for this!
      Try 0.5fr for more compact equal rows. I don't quite understand how that works :)
      */
    
    grid-template-columns:
      [times] 4em
      [day-1-start] 1fr
      [day-1-end day-2-start] 1fr
      [day-2-end day-3-start] 1fr
      [day-3-end];
  }
}

.time-slot {
  grid-column: times;
  display: none; /* hidden on small screens and browsers without grid support */
}

.day-slot {
  
}

@supports( display:grid ) {
  @media screen and (min-width:700px) {
    .day-slot {
      display: block;
      padding: 10px 5px 5px;
      position: sticky;
      top: 0;
      z-index: 1000;
      background-color: rgba(0,0,0,.7);
    }
    .time-slot {
      display: block;
    }
  }
}

/* Small-screen & fallback styles */
.session {
  margin-bottom:  1em;
}

@supports( display:grid ) {
  @media screen and (min-width: 700px) {
    .session {
      margin: 0;
    } 
  }
}

.session {
  padding: .5em;
  border-radius: 2px;
  font-size: 14px;
  box-shadow:
    rgba(255,255,255,.6) 1px 1px 0,
    rgba(0,0,0,.3) 4px 4px 0;
}

.session-title,
.session-subtitle,
.session-presenter,
.session-time {
  display: block;
}

.session-title {
  margin: 0;
  font-weight: bold;
  font-size: 1.2em;
}

.time-slot {
  margin: 0;
  font-weight: bold;
  font-size: 1em;
}

.session-title a {
  color: #fff;
  text-decoration-style: dotted;
  
  &:hover {
    font-style: italic;
  }
  
  &:focus {
    outline: 2px dotted rgba(255,255,255,.8);
  }
}

.day-slot {
  font-weight: bold;
  font-size:1.5em;
}

.topic-science {
  background-color: #1259B2;
  color: #fff;
}

.topic-scopesim {
  background-color: #687f00;
  color: #fff;
}

.topic-misc {
  background-color: #544D69;
  color: #fff;
}

.online {
  opacity: 0.8;
  background: repeating-linear-gradient( -45deg, #444cf7, #444cf7 5px, #1259B2 5px, #1259B2 25px );
}

.day-hidden,
.day-all {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ccc;
  color: #000;
  box-shadow: none;
}

@supports( display:grid ) {
  @media screen and (min-width:700px) {
    .day-hidden {
      display: none;
    }
  }
}

.text {
  max-width: 750px;
  font-size: 18px;
  margin: 0 auto 50px;
}

.meta {
  color: #555;
  font-style: italic;
}

.meta a {
  color: #555;
}

hr {
  margin: 40px 0;
}
