#main-container.container.container-wide {
  max-width: 100%;
}
#main-container.container.container-semi-wide {
  max-width: 1400px;
}
#navigator {
  position: fixed;
  left: 0;
  margin-top: 50px;
  background-color: $offwhite;
  padding: 8px 16px;
  box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.16), 0 5px 8px 0 rgba(0, 0, 0, 0.12);
  z-index: 100;

  &:hover {
    .days {
      margin-top: 4px;
      display: flex;
      flex-direction: column;
    }
  }

  .days {
    display: none;
  }
}
#legend {
  position: fixed;
  left: 0;
  margin-top: 100px;
  background-color: $offwhite;
  padding: 8px 16px;
  box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.16), 0 5px 8px 0 rgba(0, 0, 0, 0.12);
  z-index: 50;

  &:hover {
    ul.tracks {
      margin-top: 4px;
      margin: 0;
      padding: 0 8px;
      display: flex;
      flex-direction: column;
    }
  }

  ul.tracks {
    display: none;
  }
}
header {
  word-break: normal;
}
.schedule-header {
  display: flex;
  align-items: flex-end;
  > span, > a, > div {
    margin-left: 8px;
  }
  a i.fa {
    padding-right: 0;
  }
}

#schedule-nav {
  display: flex;
  flex-direction: row;
  align-content: space-between;

  a {
    font-size: 16px;
    font-weight: normal;
    margin: 0;
    &.active {
    }
  }

  form {
    max-width: 250px;
  }

  .header-right {
    margin-left: auto;
  }
}

#fahrplan {
  display: flex;
  flex-direction: column;
  flex-grow: 1;

  .day {
    background: $gray-lightest;
    margin-bottom: 16px;
    width: auto;

    .header-row {
      background: $gray-lightest;
      display: flex;
      flex-direction: row;
      font-weight: bold;

      .header {
        border-bottom: 4px solid $brand-primary;
        background: inherit;
      }

      .room-header {
        border-left: 2px solid lighten($gray-800, 55%);
        border-bottom: 4px solid $brand-primary;
        flex: 1 0;
        font-size: 16pt;
        text-align: center;
        padding: 8px 0;
        overflow-wrap: break-word;
        overflow: hidden;
      }
    }

    .time-column {
      flex: 0 0 4em;

      .hour {
        height: 120px;
        line-height: 30px;
        padding-right: 16px;
        text-align: right;
      }

      background: repeating-linear-gradient(to bottom, $gray-200, $gray-200 2px, $white 2px, $white 30px, $gray-200 30px, $gray-200 31px, $white 31px, $white 60px);
    }

    .rooms {
      display: flex;
      flex-direction: row;

      .room {
        border-left: 2px solid #ccc;
        flex: 1 0;
        background: repeating-linear-gradient(to bottom, $gray-200, $gray-200 2px, $white 2px, $white 30px, $gray-200 30px, $gray-200 31px, $white 31px, $white 60px);

        .talk-container {
          position: relative;
        }

        .talk {
          border: 1px solid lighten($brand-primary, 25%);
          border-left: 4px solid lighten($brand-primary, 25%);
          background-color: rgba(255, 255, 255, 0.76);
          box-sizing: border-box;
          color: rgba(0, 0, 0, 0.87);
          display: block;
          padding: 5px 10px;
          padding-top: 0;
          position: absolute;
          margin: 0 8px;
          width: calc(100% - 16px);

          &:hover .popover {
            display: block;
          }

          .talk-content {
            height: 100%;
            overflow: hidden;

            .do-not-record {
              color: rgba(180, 20, 23, 0.87);
            }

            .talk-title {
              line-height: 26px;
              font-weight: bold;
            }

            .talk-speakers {
              line-height: 26px;
            }
          }

          &:hover {
            background-color: $gray-200;
            height: auto !important;
            z-index: 6;
            box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.16), 0 5px 8px 0 rgba(0, 0, 0, 0.12);

            &::before {
              position: absolute;
              background-color: $brand-primary;
              border-radius: 2px;
              color: rgba(255, 255, 255, 0.87);
              content: attr(data-time);
              font-weight: bold;
              line-height: 1;
              padding: 8px 16px;
              top: -44px;
              white-space: nowrap;
            }

            &::after {
              position: absolute;
              content: '';
              left: 24px;
              width: 0;
              height: 0;
              border-left: 8px solid transparent;
              border-right: 8px solid transparent;
              border-top: 8px solid $brand-primary;
              top: -14px;
            }
          }
        }

        .talk.talk-personal, .talk.active {
          background-color: rgba(155, 255, 155, 0.76);
        }

        .talk.search-fail {
          color: $gray-light;
          border-color: $gray-light;
        }
      }
    }

    .no-talks {
      text-align: center;
    }
  }
}
#talk-buttons {
  display: flex;
  justify-content: flex-end;
  .btn {
    margin-left: 8px;
  }
}

.btn-sm .fa {
  padding-right: 5px;
}

#exporttimestamp {
  margin-bottom: 1em;
}

.export-icon {
  width: 1.5em;
  display: inline-block;
}

@media (max-width: 1000px) {
  header {
    text-align: right;
    flex-direction: column;
  }
  #navigator {
    top: 10px;
    margin-top: 0;
  }
  #legend {
    top: 50px;
    margin-top: 0;
  }
  #fahrplan {
    width: 100%;

    .day {
      .no-talks {
        margin-top: 0;
        text-align: center;
        padding: 10px;
      }
    }
  }
}

@media (max-width: 640px) {
  #fahrplan {
    .day {
      overflow-y: hidden;
      overflow-x: auto;
    }

    .room, .room-header {
      min-width: 150px;
    }
  }
}
@media print {
  body {
    background: none;
    overflow: visible !important;
    height: auto;
  }
  #navigator, #legend,
  #schedule-nav,
  #main-card .user-row,
  header, footer,
  .schedule-header .btn,
  #event-nonpublic {
    display: none;
  }
  h3:not(:first-of-type) { /* improve look of day captions after page break */
    margin-top: 5em;
  }
  .container {
    max-width: 100%;
  }
  #fahrplan, .card {
    display: block;
    overflow: visible !important;
  }
  .day {
    page-break-after: always;
    overflow: visible !important;
  }
}
.heading-with-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  &>:last-child {
    margin-left: auto;
  }
}
