* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding-bottom: 20px;
  height: 100%;
  width: 100%;
  font-family: sans-serif;
  background: #f9f9f9;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

.top-bar {
  height: 40px;
  background: #fff;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  font-size: clamp(14px, 2vw, 20px);
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

.main-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 40px);
  overflow: hidden;
}

.sidebar {
  width: 132px;
  background: #f9f9f9;
  border-right: 1px solid #ddd;
  padding: 1rem;
  flex-shrink: 0;
  font-size: clamp(12px, 1vw, 14px);
  overflow-y: auto;
}

.scheduler-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.time-column {
  flex: 0 0 41px;
  display: flex;
  flex-direction: column;
  background-color: #fafafa;
  border: 3px solid blue;
  z-index: 2;
  height: 100%;
  position: relative;
}

.time-column.right {
  border-left: 2px solid #ccc;
  border-right: none;
}

.time-header-placeholder {
  height: 40px;
  flex-shrink: 0;
}

.time-slot {
  height: 30px;
  flex: 1;
  font-size: clamp(9px, 0.8vw, 11px);
  color: #555;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.3rem;
  border-bottom: 2px dashed #ccc;
  position: relative;
}

.time-column.right .time-slot {
  justify-content: flex-start;
  padding-left: 0.3rem;
}

.scheduler {
  flex: 1;
  display: flex;
  height: 100%;
  overflow: auto;
  position: relative;
}

.day {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  border-right: 2px solid #bbb;
  min-width: 0;
  height: 100%;
  position: relative;
}

.day:last-child {
  border-right: none;
}

.day h3 {
  height: 40px;
  margin: 0;
  padding: 0;
  font-size: clamp(11px, 1vw, 14px);
  text-align: center;
  background: #f0f0f0;
  line-height: 40px;
  flex-shrink: 0;
}

.slots {
  flex: 1;
  position: relative;
  height: 100%;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 28px,
    #ccc 28px,
    #ccc 30px
  );
  background-size: 100% 30px;
  background-repeat: repeat;
  z-index: 0;
}

.time-block {
  height: 30px;
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  flex: 0 0 auto;
  z-index: 1;
}


  

.user-schedule {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;


  border-radius: 4px;
  padding: 2px;
  overflow: hidden;
  border: 1px dashed black;
  width: calc((100% - 8px)/ var(--lane-count));
  left: calc(var(--lane-index) * (100% / var(--lane-count)));
  z-index: 1;
  
  box-sizing: border-box;   /* includes padding in the width */
  /*white-space: normal;      /* allow line-breaks if the text is long */

  /*word-break: break-word;   /* break long words if needed */
  /*text-overflow: ellipsis; /* shows "…" when too narrow */
  font-size: clamp(0.3rem, 1vw, 0.54rem); /* responsive font size */
}

.scheldule_text {
  display: flex;
  align-items: center;
  justify-content: center;
}




.time-block .user-schedule {
  height: 100%;
  width: calc(100% / var(--slot-count));
  left: calc(var(--slot-index) * (100% / var(--slot-count)));
}

.user-a { background-color: #3b82f6; }
.user-b { background-color: #10b981; }
.user-c { background-color: #8b5cf6; }
/*.user-d { background-color: #ef4444; }*/
.user-e { background-color: #888888; }

.Def { background-color: #CCCCCC; }
.Skole { background-color: #FF99CC; }
.Pause { background-color: #888888; }
.Sfo { background-color: #008040; }
.Forberedelse { background-color: purple; }

.hidden {
  display: none !important;
}