* {
  box-sizing: border-box;
}

html,
body {
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  letter-spacing: 0.5px;
  line-height: 1.7;
  font-weight: 300;
  background-color: grey;
}

body,
input,
button {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

#renderCanvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.skedes {
  z-index: 999;
  position: absolute;
  top: 10px;
  right: 430px;
  width: calc(100% - 440px);
  display: flex;
  justify-content: center;
  color: #fff;
}

.skedes div {
  margin: 0 10px;
  cursor: pointer;
}

#timeline {
  z-index: 999;
  position: absolute;
  bottom: 10px;
  right: 430px;
  width: calc(100% - 440px);
  padding: 28px 3% 20px;
  background: rgb(255 255 255 / 90%);
}

.timeline {
  position: relative;
  padding: 10px 0;
}

.thumb {
  position: absolute;
  top: 0;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.thumb .line {
  position: absolute;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  height: calc(100% + 40px);
  background-color: #b1b2b3;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
}

.thumb .date {
  position: absolute;
  top: -26px;
  left: 0;
  background-color: #b1b2b3;
  padding: 2px 5px;
  border-radius: 20px;
  font-size: 0.8em;
  pointer-events: auto;
  white-space: nowrap;
  transform: translateX(-50%);
}

.slider,
.grid,
.gantt {
  display: flex;
}

.slider input,
.grid .months,
.gantt .chart {
  flex: 1;
}

.grid .months {
  display: flex;
  position: relative;
}

.grid .months .month {
  flex: 1;
  text-align: center;
  position: relative;
}

.datePos {
  z-index: 2;
  position: absolute;
  width: 3px;
  height: 100%;
  margin-left: -1.5px;
  pointer-events: none;
}

.datePos > div {
  position: absolute;
  top: -32px;
  left: 0;
  transform: translateX(-50%);
}

.grid .months .datePos:before {
  content: "";
  width: 1px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.07);
  position: absolute;
  top: 0;
  left: 1px;
}

.grid,
.slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

input[type="range"] {
  margin: 0;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  outline: none;
  opacity: 0.7;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
}

input[type="range"]:hover {
  opacity: 1;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 3px;
  height: 0;
}

input[type="range"]::-moz-range-thumb {
  width: 3px;
  height: 0;
}

.gantt .chart {
  display: flex;
  flex-direction: column;
}

.gantt .chart > div {
  position: relative;
  height: 100%;
}

.gantt .block {
  z-index: 2;
  top: 2px;
  position: absolute;
  height: calc(100% - 4px);
  border: 1px solid #fff;
  cursor: pointer;
}

.gantt .block > div {
  z-index: 2;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  position: absolute;
  background-color: #fff;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 0.8em;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.gantt .block > div:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background-color: #fff;
}

.gantt .block:hover > div {
  opacity: 1;
}

.etapp_1 .block {
  background-color: #f8c756;
}

.etapp_2 .block {
  background-color: #68cffc;
}

.etapp_3 .block {
  background-color: #745df7;
}

.skede_uppehåll {
  display: none;
}

.gantt .title > div {
  padding-right: 14px;
  white-space: nowrap;
  font-size: 0.9em;
  line-height: 1.8;
}

.calendarWrapper {
  display: flex;
  justify-content: space-between;
}

.calendarWrapper button {
  border: none;
  outline: none;
  background-color: transparent;
  padding: 0;
  cursor: pointer;
  width: 24px;
  height: 24px;
}

.calendarWrapper button#prev {
  transform: translateX(-100%);
}

.calendarWrapper button#next {
  transform: translateX(100%);
}

.calendarWrapper button svg {
  fill: rgba(0, 0, 0, 0.5);
  width: 100%;
  margin-top: -5px;
}

.calendarWrapper button#prev svg {
  transform: rotate(180deg);
}

#calendar {
  border: none;
  outline: 0;
  position: relative;
  background-color: transparent;
  margin: 0;
  padding: 0;
  text-align: center;
}

#calendar::-webkit-datetime-edit-day-field:focus,
#calendar::-webkit-datetime-edit-month-field:focus,
#calendar::-webkit-datetime-edit-year-field:focus {
  background-color: transparent;
  outline: none;
}

/* #calendar::-webkit-datetime-edit {} */

/* #calendar::-webkit-datetime-edit-fields-wrapper {} */

#calendar::-webkit-datetime-edit-year-field,
#calendar::-webkit-datetime-edit-month-field,
#calendar::-webkit-datetime-edit-day-field,
#calendar::-webkit-datetime-edit-text {
  color: #fff;
  align-items: center;
}

#calendar::-webkit-inner-spin-button {
  display: none;
  -webkit-appearance: none;
}

#calendar::-webkit-calendar-picker-indicator {
  background: transparent;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.startPos {
  transform: translateX(-40%);
}

.endPos {
  transform: translateX(40%);
}

#sidebar {
  z-index: 999;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  overflow: auto;
  padding: 25px;
  background: rgba(255, 255, 255, 0.9);
}

#sidebar > h2 {
  margin: 10px 0 0;
}

#sidebar > p {
  margin: 0 0 22px;
  font-size: 0.98em;
}

#popups > div {
  position: relative;
  display: flex;
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s ease, max-height 0.3s ease-out;
}

#popups h4 {
  font-size: 1em;
  margin: 10px 0 0;
}

#popups p {
  margin: 6px 0 0;
}

#popups .info {
  border-radius: 10px;
  width: 100%;
  padding: 15px;
  background-color: #fff;
  line-height: 1.2;
  margin-bottom: 17px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.01);
}

#popups .date {
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 0.9em;
  letter-spacing: 0px;
  opacity: 0.6;
  text-transform: capitalize;
}

#popups .date .dot {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  margin-right: 6px;
}

#popups .date .float {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px 3px;
  border-radius: 16px;
  font-size: 0.9em;
}

#popups .etapp_1 .date > div {
  background-color: #f8c756;
}

#popups .etapp_2 .date > div {
  background-color: #68cffc;
}

#popups .etapp_3 .date > div {
  background-color: #745df7;
  color: #fff;
}

#popups > div.active {
  opacity: 1;
  max-height: 200px;
}
