/**
 * 手書きCanvasレイヤー & フローティングツールバー
 * 白基調クリーンデザイン & iOS セーフエリア対応
 */

/* ボトムナビゲーションバー内のボタンスタイル */


/* モードトグルボタン（手書き vs 操作: ペンアイコンのみ） */
.mode-toggle-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

/* 手書きモード時: 鮮やかなブルー（ON） */
.mode-toggle-icon-btn.mode-drawing {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* 操作モード時: 落ち着いたグレー（OFF） */
.mode-toggle-icon-btn.mode-nav {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #64748b;
}

/* ツールボタンスタイル（消しゴム・Undo・Redo・Clear） */
.tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tool-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.tool-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.tool-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* カラーパレット（少し大きめ＆誤タップ防止マージン） */
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  flex-shrink: 0;
}

.color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.15s ease;
  flex-shrink: 0;
  position: relative;
}

/* 誤タップ防止＆タップエリア拡大 */
.color-dot::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
}

/* 蛍光マーカードット（四角チップでマーカー感を演出） */
.color-dot.marker-dot {
  border-radius: 7px;
  opacity: 0.88;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: #0f172a;
  transform: scale(1.18);
  box-shadow: 0 0 7px rgba(0, 0, 0, 0.25);
  opacity: 1;
}

/* スタンプボタングループ */
.stamp-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.stamp-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.stamp-btn:hover {
  background: #f1f5f9;
  transform: scale(1.12);
}

.stamp-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
  transform: scale(1.12);
}

/* スマホ最適化（ナビバーの縦サイズをスリム化） */
@media (max-width: 640px) {
  .mode-toggle-icon-btn {
    width: 32px;
    height: 32px;
  }

  .tool-btn {
    width: 30px;
    height: 30px;
  }

  .color-picker-group {
    gap: 8px;
    padding: 0 2px;
  }

  .color-dot {
    width: 24px;
    height: 24px;
  }

  .color-dot.marker-dot {
    border-radius: 6px;
  }

  .stamp-btn-group {
    gap: 4px;
  }

  .stamp-btn {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }
}
