/* (A) ENTIRE PAGE */
* {
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}
body {
  position: relative;
  padding: 0; margin: 0;
  overflow-x: hidden;
}
:root {
  --bg-color-a: #016398; /* page header + form label */
  --bg-color-b: #3aa6c8; /* calendar header */
  --bg-color-c: #f0f0f0; /* buttons */
}
.hide { display: none !important; }

/* (B) PERIOD SELECTOR */
#calPeriod {
  padding: 15px;
  background: var(--bg-color-a);
  display: flex;
  border-radius: 30px;
  margin-bottom: 5px;
}
#calPeriod input, #calPeriod select {
  font-size: 24px;
  border: 0;
  outline: none;
  color: #fff;
  background: 0;
  cursor: pointer;
  width: auto;
  flex: 1;
}
#calPeriod option { color: #000; }
#calYear {
  width: 100px;
  margin-left: 10px;
}

/* (C) CALENDAR */
/* (C1) SHARED */
.calHead, .calRow { display: flex; }
.calCell {width: 14.2857%;position: relative;padding-top: 22px;display: flex;}

/* (C2) HEADER - DAY NAMES */
.calHead .calCell {
  color: #fff; background: var(--bg-color-b);
  font-weight: 700; text-align: center;
  padding: 10px 15px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  justify-content: center;
}

/* (C3) BODY - INDIVIDUAL DAYS */
.calBlank { background: #eee; }
.calToday { background: #feffd3; }
.calToday .cellDate { color: #ff9b9b; }
.calBody .calCell {
  border: 1px solid #f5f5f5;
  min-height: 100px;
}
.cellDate, .evt {padding: 5px;}
.cellDate {
  font-size: 14px;
  font-weight: 700;
  color: #b5b5b5;
  position: absolute;
  top: 0;
  left: 0;
  line-height: 14px;
}
.evt {
  font-size: 14px;
  white-space: nowrap; text-overflow: ellipsis;
  overflow: hidden;
  cursor: pointer;
}

/* (D) EVENT FORM */
.calForm {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  border: 0;
  background: rgba(0,0,0,0.5);
}
.calForm:is([open]) {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
}
.calForm .wrap {
  position: relative;
  width: 450px;
  padding: 30px;
  border-radius: 10px;
  background: #fff;
}
.calForm .close {
  position: absolute;
  top: 0; right: 0;
  padding: 10px;
  color: #b12020;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
}
#activityModal .wrap {
    width: 800px;
}
.calForm h2 { margin: 0 0 15px 0; }
.calForm label, .calForm input[type=text], .calForm textarea { width: 100%; }
.calForm label {
  color: #a1a1a1;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 5px;
}
.calForm input[type=text], .calForm textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #eee;
  background: #f5f5f5;
}
.calForm textarea {
  height: 100px;
  resize: none;
}
.calForm input[type=button], .calForm input[type=submit] {
  border: 0; padding: 10px; margin: 10px 2px 0 0;
  color: #fff; background: var(--bg-color-c);
  cursor: pointer;
}

.calPresences {
    flex: 0 30px;
    display: flex;
    flex-direction: column;
}

.calPresences > div {
    /* border: 1px solid; */
    flex: 1;
    margin: 3px;
    border-radius: 10px;
    background: #eee;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
}

.calPresences > div:not(:empty) {
    background: dimgrey;
    color: #fff;
}
.calPresences > div:hover {
    background: #aaa;
}

.activity {
    flex: 1;
    background: #eee;
    height: 20px;
    min-height: 20px;
    /*! width: 100%; */
    /*! border-radius: 10px; */
    margin-bottom: 5px;
    text-align: center;
    cursor: pointer;
    font-size: 11px;
    text-overflow: ellipsis;
    overflow: hidden;
    background-color: steelblue;
    color: #fff;
    padding: 6px;
    margin-left: -2px;
    margin-right: -2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.activity.first {
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  margin-left: 2px;
}

.activity.last {
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  margin-right: 2px;
}
.activities {
    flex: 1;
    display: inline-flex;
    flex-direction: column;
    /*! padding: 5px; */
}


.activity.open {
  background-color: #fff;
  color: #016398;
}