/**
 * Grundregeln für Seitenpanel, Filter und Kontextmenüs der Plantafel.
 */
/*===================================================================*/
/*                          Haupt-Container                          */
/*===================================================================*/

/* Linkes Seitenpanel mit Filteroptionen und der Objektliste */
.items-panel {
  user-select: none;
  background-color: white;
  position: absolute;
  border: groove 2px;
  top: 50px;
  width: 300px;
  bottom: 15px;
  padding: 0px 10px 0px 10px;
  z-index: 20;
  justify-content: space-around;
}

/* Container für die Filteroptionen */
/* Ist Child von .items-panel */
.filter-container {
  position: relative;
  top: 0px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border: inset 2px;
  padding: 10px;
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  background-color: #f5f5f5;
  width: 275px;
  user-select: none;
}

.filter-container input {
  user-select: text;
}

/* Container für die Auflistung der Terminobjekte */
/* Ist Child von .items-panel */
.objektliste {
  position: absolute;
  display: block;
  margin-top: 2vh;
  overflow-y: scroll;
  top: 225px;
  bottom: 10px;
  right: 10px;
  left: 10px;
  scrollbar-width: thin;
  background-color: #f5f5f5;
  border: inset 2px;
  padding-left: 5px;
  padding-top: 0px;
  & h3 {
    visibility: hidden;
    display: none;
  }
}

/*===================================================================*/
/*                          Filter-Container                          */
/*===================================================================*/

.filter-container * {
  font-size: 10pt;
}

.filter-checkboxes {
  margin-bottom: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.filter-checkboxes label {
  display: block;
  margin-bottom: 5px;
  width: 15vw;
}

.filter-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
  flex: 1;
}

.filter-dates input[type="text"] {
  margin-right: 10px;
  padding: 5px;
  border: 1px solid #ccc;
  flex: 1;
}

.filter-dates select {
  flex: 1;
  width: 10vw;
  padding: 5px;
  border: 1px solid #ccc;
}

.apply-filter-btn {
  background-color: #cecece;
  color: rgb(0, 0, 0);
  border: none;
  padding: 10px 20px;
  text-align: center;
  font-size: auto;
  margin-top: 100px;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 1em;
}

.apply-filter-btn:hover {
  background-color: #747474;
}

.has-emoji {
  font-weight: bold;
  background-color: #f0f8ff;
}

.tooltip-content {
  font-size: 12px;
  color: #333;
}

.tooltip-content b {
  color: #000;
}

.tooltip-content i {
  color: #555;
}

/* ================================================================== */
/*                          Item-Auflistung                           */
/* ================================================================== */

/* UL-Container für die Auflistung der Items */
/* Ist Child von .objektliste */
.items {
  display: block;
  font-size: 2vh;
  justify-content: space-around;
  padding: 0vh 1vw;
  float: left;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  scrollbar-gutter: stable;
  overflow-x: hidden;
  list-style-type: none;
  padding: 0;
}
ul {
  columns: 3;
  -webkit-columns: 3;
  -moz-columns: 3;
}

/* Einzelnes Item in der Auflistung */
/* Ist Child von UL .items */
.items li {
  flex-basis: 100%;
  margin-bottom: 10px;
  padding: 2px;
}

/* Allgemeine Formatierung für Items */
/* Die weitere Formatierung erfolgt in den spezifischen Klassen je nach item-typ*/
/* Die Unterscheidung zwischen item und object-item erfolgt nur Aufgrund der 
   verschiedenen Timeline-internen Datentypen*/
li.item {
  display: block;
  list-style: none;
  width: 12vw;
  color: #1a1a1a;
  background-color: #d5ddf6;
  border: 1px solid #97b0f8;
  margin-top: 0px;
  padding: 5px 5px;
  cursor: grab;
  -webkit-box-shadow: 6px 6px 5px -3px rgba(0, 0, 0, 0.42);
  box-shadow: 4px 4px 5px -3px rgba(0, 0, 0, 0.42);
  margin-left: 5px;
  margin-right: -10px;
  pointer-events: all;
}
li.item:active {
  cursor: grabbing;
  pointer-events: bounding-box;
}

.objektlisteheader {
  font-size: 13.5pt;
  text-shadow: 0 -2px 0px white;
  color: #333;
  font-weight: 600;
  margin-bottom: -1.75vh;
  margin-top: 1vh;
}

li.object-item:active {
  cursor: grabbing;
}
li.object-item {
  display: block;
  list-style: none;
  width: 13vw;
  color: #1a1a1a;
  background-color: #d5ddf6;
  border: 1px solid #97b0f8;
  margin-bottom: 5px;
  padding: 10px 10px 10px 10px;
  cursor: grab;
  -webkit-box-shadow: 8px 8px 5px -3px rgba(0, 0, 0, 0.42);
  box-shadow: 8px 8px 5px -3px rgba(0, 0, 0, 0.42);
}

/* Formatierung für Aufträge */
li.item-auftrag:before {
  font-family: Arial, sans-serif;
  display: inline-block;
  font-size: inherit;
  cursor: grab;
}

/* Formatierung für Fahrzeuge */
li.item-fahrzeug:before {
  font-family: Arial, sans-serif;
  display: inline-block;
  font-size: inherit;
  cursor: grab;
}
li.item-fahrzeug {
  background-color: #d6d6d6 !important;
  border: 1px solid #a09c9c;
  & infohead {
    display: table-cell;
    height: 1.3em;
    vertical-align: top;
  }
}

/* Formatierung für Mitarbeiter */
li.object-item-mitarbeiter:before {
  font-family: Arial, sans-serif;
  display: inline-block;
  font-size: inherit;
  cursor: grab;
}
li.item-mitarbeiter {
  background-color: #f5c0a8;
  border: 1px solid #ff9870;
}

/* Formatierung für Technik */
li.object-item-technik:before {
  font-family: Arial, sans-serif;
  display: inline-block;
  font-size: inherit;
  cursor: grab;
}

/* ================================================================== */
/*                     Inhalt der einzelnen Items                     */
/* ================================================================== */

.infoheadwrapper {
  position: relative;
  width: 100%;
  text-wrap: nowrap;
  display: inline-block;
}

.terminobjekt {
  font-size: 9pt;
  width: 100%;
}

.terminobjekt infohead {
  font-weight: bold;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  height: 12pt;
}

.terminobjekt infotext {
  display: block;
  font-size: 8pt;
  margin-top: -2pt;
}

.terminobjekt infotermin {
  font-size: 8pt;
  float: left;
}

.terminobjekt inforef {
  float: right;
  font-family: "Arial", sans-serif;
  font-size: 9pt;
}

.item-mitarbeiter inforef {
  margin-top: -11pt;
}

/* ================================================================== */
/*                     Kontextmenü für Terminobjekte                   */
/* ================================================================== */

/* Kontextmenü für nicht eingeplante Terminobjekte */
.iteminfobtn {
  width: 11pt;
  height: 11pt;
  float: right;
  position: absolute;
  margin: 0;
  padding: 0;
  top: -1.5pt;
  right: 1px;
  cursor: pointer;
  filter: drop-shadow(1px 1px 1px #00000088);
  overflow-clip-margin: border-box;
}

#itemkontext {
  position: fixed;
  display: none;
  left: 4000px;
  top: unset;
  height: fit-content;
  width: fit-content;
  bottom: 10000px;
  z-index: 150;
  background-color: #f5f5f5;
  /*border-radius: 5px 5px 5px 0px;*/
  padding: 0.3vw;
  font-family: "MS Sans Serif";
  text-wrap: pretty;
  /*outline: solid 1px black;*/
  box-shadow: 2px 3px 10px 5px #00000066;

  & #ecke,
  #eckeschatten {
    background-color: #f5f5f5;
    height: 12px;
    width: 12px;
    position: absolute;
    bottom: 2px;
    left: -7px;
    border-left: solid 1px gray;
    border-bottom: solid 1px gray;
    rotate: 45deg;
    z-index: 50;
  }

  & table {
    margin: 0;
    padding: 0;
    display: block;
    & tr {
      & td {
        padding-left: 5px;
        padding-right: 5px;
        vertical-align: top;
      }
      & #nowidth {
        width: 0px;
      }
    }

    & #Hauptadresse,
    #Lieferadresse,
    #Kontaktadresse,
    #Auftragstext {
      font-size: 10pt;
      display: block;
      background-color: white;
      border: inset 1px;
      padding: 3px;
      margin-bottom: 4px;
    }

    & #Auftragsinfo {
      font-size: 12pt;
      user-select: none;
    }

    & h3 {
      margin: 0;
      font-size: 10pt;
      font-weight: normal;
      text-indent: 1.75px;
      user-select: none;
    }

    & h2 {
      margin: 0;
      display: inline-block;
      margin-right: 0px;
      font-size: 12pt;
      user-select: none;
    }
  }

  & .kontextclose {
    position: absolute;
    right: 10px;
    top: 4px;
    height: 11pt;
    border: outset 2px;
    background-color: darkgray;
    cursor: pointer;
  }
}
