/* ============================================================================
 whiteboard_worker.css - ホワイトボード用スタイルシート
 ============================================================================ */

/* ページ全体のリセット・基本 */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: "Segoe UI", sans-serif;
  background: #f9fafb;
  color: #111827;
  display: flex;
  flex-direction: column;
}

/* ヘッダー */
header {
  background: #e0f2fe;
  padding: 10px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #0369a1;
  border-bottom: 1px solid #bae6fd;
  z-index: 100;
}

/* ツールバー */
#toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #f1f5f9;
  border-bottom: 1px solid #e5e7eb;
  z-index: 90;
}

#toolbar button {
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  height: 32px;
}

#toolbar button:hover {
  background: #f0f9ff;
}

#saveButton {
    margin-left: auto;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    background-color: #38bdf8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    pointer-events: auto;
}

#saveButton:hover {
  background-color: #0ea5e9;
}

/* 計画セクション */
#plan-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  background: #e0f2fe;
  border-bottom: 1px solid #bae6fd;
  position: relative;
  z-index: 80;
}

.plan-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.plan-item input,
.plan-item select {
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

/* キャンバス領域 */
#boardWrap {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
  background: #fff;
}

#board {
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* テキスト入力レイヤー */
#textContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

#textContainer input {
  pointer-events: auto;
  position: absolute;
  min-width: 120px;
  min-height: 24px;
  font-size: 16px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #fff;
  color: #000;
  padding: 2px 4px;
  z-index: 20;
}

/* 固定ラベルのコンテナ */
#fixedLabels {
  position: absolute;
  top: 120px;
  left: 50px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 25px; /* 行間の調整 */
}

.label-group {
    display: flex;
    align-items: center;
    gap: 15px; /* ラベルと生産性表示の間のスペース */
}

.label-group span {
    font-family: sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #1a202c;
    position: relative;
}

.average-productivity {
    font-size: 14px;
    color: #4b5563;
    font-weight: normal;
}


/* === 作業員エリアのスタイル === */
#workerArea {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20%;
  background-color: rgba(255, 255, 255, 0.8);
  border-left: 2px solid #38bdf8;
  z-index: 12;
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
}

#workerArea h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    text-align: center;
}

#workerArea .worker-item {
    padding: 5px;
    margin-bottom: 5px;
    background-color: #e0f2fe;
    border: 1px solid #90cdf4;
    border-radius: 4px;
    cursor: grab;
}

#workerArea .worker-item:active {
    cursor: grabbing;
}