/* events */
.calToggle {
  text-align: right;
}

#listToggle {
  margin-right: .5em;
}

.calToggle a {
  opacity: .5;
}

.calToggle a.on, .calToggle a:hover {
  opacity: 1;
}

.eventCategory {
  line-height: 0;
  height: .5em;
  width: .5em;
}

.calNav {
  color: #CCC;
}

#content .eventsCalendar article h2,.eventsAgenda section>article p {
  color: rgba(0,0,0,.6);
}

/* agenda view */
.eventsAgenda {
  border-bottom: 1px solid rgba(0,0,0,.2);
  margin-bottom: 2em;
  margin-top: -2.5em;
}

.eventsAgenda section {
  border-top: 1px solid rgba(0,0,0,.2);
}

#content .eventsAgenda section>h2 {
  font-size: 1em;
  color: rgba(0,0,0,.5);
  font-style: italic;
  padding: 2px 5px;
  margin-bottom: 0;
  background: rgba(0,0,0,.1);
  border-top: 1px solid rgba(255,255,255,.5);
  border-bottom: 1px solid rgba(0,0,0,.05);
}

.eventsAgenda section>article {
  border-top: 1px solid rgba(0,0,0,.1);
}

.eventsAgenda section>h2+article {
  border-top: none;
}

.eventsAgenda section>article a {
  padding: .5em 5px;
  display: block;
  position: relative;
  overflow: auto;
}

.eventsAgenda section>article a>* {
  margin-left: 1em;
}

.eventsAgenda section>article a:hover,.eventsAgenda section>article a:active,.eventsAgenda section>article a:focus {
  background: rgba(167,81,84,.15);
}

.eventsAgenda section>article p {
  margin-bottom: 0;
}

#content .eventsAgenda article h2 {
  font-size: 1em;
  margin-bottom: 0;
  float: left;
  color: #000;
}

.eventsAgenda section>article time {
  float: right;
}

.eventsAgenda section>article p {
  float: left;
  clear: left;
}

.eventsAgenda article .eventCategory {
  margin-left: 0;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(0,0,0,.15);
  position: absolute;
  left: .5em;
  top: .85em;
}

/* calendar view */
.eventsCalendar {
  margin-bottom: 2em;
  margin-top: -2.5em;
}

.eventsCalendar table {
  width: 100%;
  border-top: solid 1px rgba(0,0,0,.2);
  border-bottom: solid 1px rgba(0,0,0,.15);
  margin-top: 0;
}

.eventsCalendar th {
  padding: .5em .4em;
  text-align: left;
  text-transform: uppercase;
  font-size: .8em;
  line-height: 1em;
  color: rgba(0,0,0,.6);
  background: rgba(0,0,0,.1);
}

.eventsCalendar td {
  border-top: solid 1px rgba(0,0,0,.15);
  border-left: solid 1px rgba(0,0,0,.15);
  height: 100px;
  vertical-align: top;
  width: 14%;
}

.eventsCalendar td:first-child {
  border-left: 0;
}

.eventsCalendar td.disable {
  opacity: .2;
}

.eventsCalendar td.today {
  background-color: rgba(0,0,0,.05);
}

.eventsCalendar td>* {
  display: block;
  float: left;
  width: 100%;
}

.eventsCalendar td>time {
  padding: .2em .3em;
  font-size: 1.15em;
  line-height: 1em;
  display: block;
  color: rgba(0,0,0,1);
}

.eventsCalendar article {
  border-top: 1px dotted rgba(0,0,0,.15);
}

.eventsCalendar article>a {
  padding: .5em .3em;
  display: block;
  float: left;
  width: 100%;
}

.eventsCalendar article>a:hover {
  background: rgba(167,81,84,.15) !important;
}

.eventsCalendar article>a>* {
  display: block;
  float: left;
  width: 100%;
}

.eventsCalendar article time {
  font-size: .8em;
  line-height: 1.2em;
}

.eventsCalendar article time span {
  white-space: nowrap;
}

#content .eventsCalendar article h2 {
  font-size: .9em;
  margin-bottom: 0;
  float: left;
  line-height: 1.2em;
}

/* Calendar Thumbs */
.eventsMiniCal {
  position: relative;
  overflow: auto;
  width: 100%;
  margin-top: 2em;
}

.eventsCalendar .eventsMiniCal a {
  display: block;
  float: left;
  text-decoration: none;
}

.eventsMiniCal table {
  width: 100%;
  margin-top: 0;
}

.eventsMiniCal a:first-child {
  margin-right: 20px;
}

.eventsMiniCal td {
  height: 1.4em;
  width: 1.4em;
  padding: .2em;
  line-height: 1em;
}

.eventsMiniCal td time {
  height: 1em;
  padding: 0;
  font-size: .8em;
}

.eventsMiniCal a:hover th {
  color: #fff;
  background: var(--ws-dk-gray);
}

/* categories */
.eventsAgenda .eventCategory.eventCat1,.eventsCatKey .eventCat1 {
  background: rgba(0,51,255,.3);
  border: 1px solid rgba(0,0,153,.15);
}

.eventsCalendar article>a.eventCat1 {
  background: rgba(0,51,255,.03);
}

.eventsAgenda .eventCategory.eventCat2,.eventsCatKey .eventCat2 {
  background: rgba(255,102,0,.3);
  border: 1px solid rgba(255,102,0,.15);
}

.eventsCalendar article>a.eventCat2 {
  background: rgba(255,102,0,.03);
}

.eventsAgenda .eventCategory.eventCat3,.eventsCatKey .eventCat3 {
  background: rgba(0,102,0,.15);
  border: 1px solid rgba(0,102,0,.15);
}

.eventsCalendar article>a.eventCat3 {
  background: rgba(0,102,0,.03);
}

.eventsAgenda .eventCategory.eventCat4,.eventsCatKey .eventCat4 {
  background: rgba(153,0,255,.15);
  border: 1px solid rgba(153,0,255,.15);
}

.eventsCalendar article>a.eventCat4 {
  background: rgba(153,0,255,.03);
}

#content .eventsCalendar .eventsCatKey {
  float: left;
}

#content .eventsCatKey li {
  background-image: none;
  font-style: italic;
}

.eventsCatKey .eventCategory {
  display: inline-block;
  margin: 0 .3em .1em 0;
  position: relative;
  left: auto;
  top: auto;
}

@media screen and (max-width: 750px) {
  .eventsAgenda, .eventsCalendar {
    margin-top: 0;
  }

  /* Force list view: */
  .eventsAgenda {
    display: block !important;
  }

  .eventsMap,
  .eventsCalendar {
    display: none !important;
  }

  .calToggle {
    display: none;
  }

  .key {
    margin: 0 0 3.5em;
    text-align: center;
  }

  .key>span {
    display: block;
    margin: 0 0 .3125em
  }

  hgroup {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-content: stretch;
    align-items: flex-start;
  }

  hgroup time:nth-child(1) {
    order: 2;
    flex: 0 1 auto;
    align-self: auto;
  }

  hgroup h2:nth-child(2) {
    order: 1;
    flex: 0 1 auto;
    align-self: auto;
  }

  hgroup p:nth-child(3) {
    order: 3;
    flex: 0 1 auto;
    align-self: auto;
  }
}
