/* GENERAL */

.occupancy {
  border: none;
  display:flex;
  /* flex-flow: row wrap; */
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  /* --free: #aee8c3; */
  --free: #a2c617;
  --occupied: #882948;
}

div.occupancy>div{
  margin-bottom: 15px;
}

/* DATE SELECTION */

.occupancy div.occupancy-date-select {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 100%;
}

.occupancy .cbop-buttons{
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0);
  fill: var(--occupied);
  border-radius: 0;
  border:none;
  cursor: pointer;
  flex-shrink: 0;
  transition: fill .5s;
  padding: 0px;
}

.occupancy .cbop-buttons:hover {
  background-color: rgba(255,255,255,0);
  fill: #000;
}


.occupancy .cbop-buttons svg {
  width: 100%;
  height: 100%;
  fill: inherit;
  display: block;
  pointer-events: none;
}

.occupancy .cbop-buttons:disabled {
  visibility: hidden;
}

.occupancy div.occupancy-date-select>div.occupancy-select-container{
  display:flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

.occupancy div.occupancy-date-select div.occupancy-select-wrapper{
  padding: 0;
  margin: 2px 3px;
  position: relative;
}

.occupancy div.occupancy-date-select div.occupancy-select-wrapper::before {
  font-family: dashicons; 
  content: "\f347";
  font-size: 17px;
  position: absolute;
  right: 10px;
  top: 7px;
  color: rgb(76, 76, 76);
  pointer-events: none;
} 

.occupancy div.occupancy-date-select select {
  flex-shrink: 1;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  transition-duration: 0.5s;
  border-color: rgba(0,0,0,0) !important;
  color: black !important;
  border-width: 2px !important;
  border-style: solid !important;
  box-shadow: 0px 3px 15px 2px rgba(0, 0, 0, 0.15);
  height: 40px;
  padding-left: 7px;
  padding-right: 30px;
  margin: 0;
  font-size: 16px;
  background-color: #fff;
  outline: none;
  cursor: pointer;
}

.occupancy div.occupancy-date-select select>option{
  background-color: #FFF;
}

.occupancy div.occupancy-date-select select:hover{
  background-color: #ededed;
}

.occupancy div.occupancy-date-select select:active{
  background-color:#d2d2d2;
}

.occupancy div.occupancy-date-select select::-ms-expand {
  display: none;
}

.occupancy div.occupancy-date-select select:focus::-ms-value {
  background-color: transparent;
}

/* TABLE */
  
.occupancy div.occupancy-table{
    flex-basis: 75%;
    flex-grow: 1;
    position:relative;
}

.occupancy .occupancy-table table{
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 8px;
    border-radius: 5px;
    box-shadow: 0px 5px 15px 2px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.occupancy .occupancy-table td{
  pointer-events: none;
  font-size: 13px;
  text-align: end;
  vertical-align: top;
  padding-right: 5px;
  height: 50px;
  background-color: var(--free);
  border: none;
  border-radius: 2px;
}

.occupancy .occupancy-table td.today{
  font-weight: bold;
}

.occupancy .occupancy-table td.history{
  -webkit-filter: saturate(40%) opacity(60%);
  -moz-filter: saturate(40%) opacity(60%);
  -o-filter: saturate(40%) opacity(60%);
  -ms-filter: saturate(40%) opacity(60%);
  filter: saturate(40%) opacity(60%);
}

.occupancy .occupancy-table td.full{
  color: white;
  background-color: var(--occupied);
}

.occupancy .occupancy-table td.full-start{
  color: white;
  background-image: url("data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCI+DQo8cGF0aCBzdHlsZT0iZmlsbDojODgyOTQ4OyIgZD0iTTAgMGgzMHYzMHoiLz4NCjwvc3ZnPg==");
  background-repeat: no-repeat;
  -webkit-background-size: 100% 100%;
  background-size: 100% 100%;
}

.occupancy .occupancy-table td.full-end{
  color: white;
  background-image: url("data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCI+PHBhdGggc3R5bGU9ImZpbGw6Izg4Mjk0ODsiIGQ9Ik0wIDBoMzBMMCAzMHoiLz48L3N2Zz4=");
  background-repeat: no-repeat;
  -webkit-background-size: 100% 100%;
  background-size: 100% 100%;
}

.occupancy .occupancy-table td.date-overflow{
opacity: .25;
  color: var(--border-gray);
  background-color: #dddddd;
}

/* NO JAVASCRIPT ERROR */

.occupancy .no-js{
    /* -webkit-filter: blur(5px) grayscale(50%);
    -moz-filter: blur(5px) grayscale(50%);
    -o-filter: blur(5px) grayscale(50%);
    -ms-filter: blur(5px) grayscale(50%);
    filter: blur(5px) grayscale(50%); */
    transition: all 0.5s linear;
    -webkit-transition: all 0.5s linear;
    -o-transition: all 0.5s linear;
    -ms-transition: all 0.5s linear;
}

.occupancy .js-message{
    padding: 10px;
    text-align: center;
    position: absolute;
    top: 50%;
    /* left: 50%; */
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    background-color: #d68989;
    opacity: 0.8;
    margin: 0 25px;
}

.occupancy .js-message > a{
    font-size: 0.6em;
}

/* CAPTIONS */

.occupancy .occupancy-captions{
    border: solid 1px var(--border-gray);
    width: -moz-fit-content;
    width: fit-content;
}

.occupancy .occupancy-captions>div{
    display: flex;
    align-items: center;
    margin: 10px;
}

.occupancy .occupancy-captions>div>span{
    margin-left: 10px;
}

/* TABLE RESPONSIVE */

@media only screen and (max-width: 1200px) {
  .occupancy .occupancy-table td{
    height: 37px;
  }
}

@media only screen and (max-width: 765px) {
  .occupancy .occupancy-table td{
    height: 60px;
  }
}

@media only screen and (max-width: 360px) {
  .occupancy .occupancy-table td{
    height: 40px;
  }
  .occupancy .occupancy-table thead {
    font-size: 12px;
  }
}

/* 
        Loader
-------------------------
 */
.loader,
.loader:before,
.loader:after {
  background: #882948;
  -webkit-animation: load1 1s infinite ease-in-out;
  animation: load1 1s infinite ease-in-out;
  width: 1em !important;
  height: 4em;
}
.loader {
  opacity: 0;
  color: #882948;
  text-indent: -9999em;
  /* margin: 88px auto; */
  position: absolute;
  top: 50%;
  left: 50%;
  /* transform: translateY(-50%) scale(2.5); */
  /* opacity: 0; */
  font-size: 11px;
  -webkit-transform: translateY(-50%) translateZ(0);
  -ms-transform: translateY(-50%) translateZ(0);
  transform: translateY(-50%) translateZ(0);
  -webkit-animation-delay: -0.16s;
  animation-delay: -0.16s;
  transition: opacity 0.4s linear;
  -webkit-transition: opacity 0.4s linear;
  -o-transition: opacity 0.4s linear;
  -ms-transition: opacity 0.4s linear;
}
.loader:before,
.loader:after {
  position: absolute;
  top: 0;
  content: '';
}
.loader:before {
  left: -1.5em;
  -webkit-animation-delay: -0.32s;
  animation-delay: -0.32s;
}
.loader:after {
  left: 1.5em;
}
@-webkit-keyframes load1 {
  0%,
  80%,
  100% {
    box-shadow: 0 0;
    height: 4em;
  }
  40% {
    box-shadow: 0 -2em;
    height: 5em;
  }
}
@keyframes load1 {
  0%,
  80%,
  100% {
    box-shadow: 0 0;
    height: 4em;
  }
  40% {
    box-shadow: 0 -2em;
    height: 5em;
  }
}
